6

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??

1
  • Do you have a snippet of code showing what you have done so far? Commented Oct 20, 2013 at 17:45

1 Answer 1

7

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 :)

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks for getting back to me. Actually i looked in to template matching also when i was searching for a method. But when the size is different, i thought it is not possible to use template matching for accurate result.
by th way, the first link leads to a page that is private.
@ErikAllik - Thanks, its link must have changed somehow since I first posted this. I have removed it.
@user2389323, have you found a way to use template matching for differently sized images? I have a similar problem as you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.