Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recognizing a pattern using OpenCV

This my problem.

I have a symbol written in black in a white background. As an example assume my symbol is "Z". But it does not has to be a letter always.

Now i have image of this pattern stored.

Then i draw another pattern. image size will be same as the above. Then i input this new pattern to my program and i want to check whether it matches to the stored pattern.

Even if the new patten has a similar shape but different size, it should be matched to the stored image. Therefor pattern shape is the differentiating factor. Obviously rotated patter means a different pattern.

Is there a way to do this in opencv??

I tried using feature matching. But it did not work. I think i can use a classifier but i do not have a good knowledge on that.

Can some one help me??

like image 549
user2389323 Avatar asked Oct 20 '13 16:10

user2389323


1 Answers

user2389323 - The short answer is yes, you can do what you described using OpenCV. Pattern matching using image processing techniques is a major piece of OpenCV. Here are some example conversations I have found dealing with this topic:

Edge Based Template Matching (includes source downloads)
Template Matching and Slice Alignment
Template Matching - Example code and tech description

I hope these links have something to help you. They were not hard to find using Pattern Matching using OpenCV in Google :)

like image 54
ryyker Avatar answered Nov 17 '22 07:11

ryyker