我有一个短序列的灰度图像(20个图像),这是从相机收集的连续帧。我需要确定每个图像中一个小的移动物体的位置。我试图使用背景减法,并可以识别每个图像中的移动像素。如何继续检测移动物体的确切位置?
你可以试试这种方式。
(1)第一次使用模板匹配找到对象。
https://docs.opencv.org/3.0-beta/doc/tutorials/imgproc/histograms/template_matching/template_matching.html?highlight=template%20matching
(2)使用camshift或其他跟踪算法跟踪对象。 https://github.com/opencv/opencv/blob/master/samples/python/camshift.py