Click here to Skip to main content
Rate this: bad
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 3:52am
Edited 25-Aug-12 22:45pm
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)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 275
1 OriginalGriff 230
2 BillWoodruff 173
3 CPallini 155
4 Kamal Rocks 144
0 OriginalGriff 5,655
1 DamithSL 4,506
2 Maciej Los 3,997
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,180

Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 26 Aug 2012
Copyright © CodeProject, 1999-2014
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