Keypoints in very small images

asked 2017-05-19 09:09:15 -0600

updated 2017-05-19 09:28:24 -0600

berak gravatar image

I want to find a very small image (20x20px) within a small image (~400x250) using OpenCV. Here is an example:

small image

very small image

The problem is as follows: I can't use template matching because of partial obstruction and sub-pixel rendering on the bigger image (which is rendered in-game and leads to 1-2 pixels difference.) However, keypoint extraction seems to fail with most methods, because the input image is very small (20x20px colored within a 32x32 template.) Simply increasing the 20px image in size did not really work.

Currently, I am out of ideas, although the task seems simple enough. Is there an algorithm within OpenCV that suits this problem?

edit retag flag offensive close merge delete


most keypoints need a certan patchsize already to extract features, like 32x32, so smaller patches won't find anything.

then, keypoint matching is NOT for object detection. you're the umpteenth person to try, see their skeletons in the trench ...

rather go back at the template matching, it should be fairly robust at occlusion or blurring

instead of having an alpha channel though (useless in comuter-vision), try to make a mask from that to use with the template matching, so the borders (or ay, anything outside your "object") don't influence it so much.

berak gravatar imageberak ( 2017-05-19 09:53:06 -0600 )edit

Alright, that's what i feared. I already worked without alpha channel, but the results weren't any better. But, knowing that keypoints are a dead end, I feel better putting effort into t. matching - thanks.

kn4llfrosch gravatar imagekn4llfrosch ( 2017-05-22 06:01:17 -0600 )edit

still, try the idea with the mask !

berak gravatar imageberak ( 2017-05-22 06:20:41 -0600 )edit