Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 2015-07-23 04:43:50 -0600

Nbb gravatar image

"Meanshift"

Hello forum,

I have 2 images.

Mat frame ( 1920 x 1080 ) Mat small_image ( 20 x 20 )

I would like to find the center of the pixels of small_image, like meanshift. However, I would not like to use meanshift as it is not efficient as the size of frame is 1920 x 1080. I tried finding the moments of the small_image (to find the center point) by finding its contours first but I am getting more than 1 contour for some images.

Also, some images with very little white pixels give me an error while trying to find the center point (Meanshift worked for those images).

image description

Can anyone give me any ideas on how to solve this simple problem or should I just use meanshift but with a smaller window i.e. roi(window,frame)