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.