Click here to Skip to main content
11,502,845 members (63,476 online)
Rate this: bad
good
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
Mich_901.6K
Edited 25-Aug-12 21:45pm
v3
Comments
Christian Graus at 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 at 25-Aug-12 9:33am
   
maybe i should use some other method to compare two shapes?
Christian Graus at 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)



Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 26 Aug 2012
Copyright © CodeProject, 1999-2015
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