Click here to Skip to main content
13,146,710 members (63,582 online)
Rate this:
Please Sign up or sign in to vote.
I'm a newer in computer vision field.

I found some code examples in EmguCV(.NET wrapper for OpenCV) which I`m trying to use.

Currently I'm working on triangle traffic sign recognition and I'm using cvMatchShapes function.

The function returns "zero" in ideal case, it means that the shapes are the same and the number is

close to zero if shapes are similar.

The problem is that in my case function returns me result which is out of logic. when function compares triangle with the circle, it returns figure which is less than figure, got after comparing two triangles.

Here is the function that I use and the images:

double ratio = CvInvoke.cvMatchShapes(modelSignTraffic, trafficSign, Emgu.CV.CvEnum.CONTOURS_MATCH_TYPE.CV_CONTOURS_MATCH_I3, 0);

modelSignTraffic - is a triangle template.

trafficSign - is an shape that should be compared to the template.

first compared shape-is a circle
second compared shape- is a triangle

For the first shape I get ratio 0.55 and for the second shape I get ratio 0.61 .

I would be very grateful if anybody could explain why do I get such illogical result and how I can fix it?

Thank you in advance.
Posted 25-Aug-12 2:52am
Updated 25-Aug-12 21:45pm
Christian Graus 25-Aug-12 9:02am
You can't 'fix' it in the sense that you're using a third party system, not actually learning how to do this task yourself. I suspect the result is correct, computer vision is a fuzzy task at best
Mich_90 25-Aug-12 9:33am
maybe i should use some other method to compare two shapes?
Christian Graus 25-Aug-12 9:42am
Perhaps, but I suspect the library you have is a good option, perhaps your best

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170915.1 | Last Updated 26 Aug 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100