Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Detect sub-image(Irrespective of scale/angle) and crop that part from main image

Hi everyone,

This is the issue of matching two images, one is the smaller one and other (main) image is the larger one.

Here, i see it can be done by Template Matching, but template matching cannot be of use here because it doesn't work with scaled or rotated images.

What I want to do is to look for template/sub-image in the bigger image and if it is detected, extract/crop that part from the main (larger) image.

As I am getting main image from camera and i have to look for my template in it, due to camera frame, it can be of different scale and orientation so i need to implement maybe SURF/SIFT and i have no idea how to use it with OpenCV for Unity.

I am attaching sample images.

Kindly help if anyone knows the solution/algorithm for it.

Detect sub-image(Irrespective of scale/angle) and crop that part from main image

Hi everyone,

This is the issue of matching two images, one is the smaller one and other (main) image is the larger one.

Here, i see it can be done by Template Matching, but template matching cannot be of use here because it doesn't work with scaled or rotated images.

What I want to do is to look for template/sub-image in the bigger image and if it is detected, extract/crop that part from the main (larger) image.

As I am getting main image from camera and i have to look for my template in it, due to camera frame, it can be of different scale and orientation so i need to implement maybe SURF/SIFT and i have no idea how to use it with OpenCV for Unity.

I am attaching sample images.

Kindly help if anyone knows the solution/algorithm for it.

Main Image(Camera Frame)

Template

Here it can be seen that, images can have variance in their size and color. Irrespective of these, how can we detect template and crop that colored part from main image?

Please help.