Hi to all.
I am developing an application that do the next:
1- User take a template
2- A camera is taking photos each 600ms.
3- In each photo I find the template with pattern matching and then in that ROI I compare the photo with template using golden template and particle analisys (like in this example but without remove particles.
Now I would like to get an score of mattching.
What I do now is the next:
1- I get area ROI with pattern matching. ROI is the boundig box where the template is in the image.
2- Get are of boundig box
3- Do golden template and then with particle analisys vi I get Area of particles (defects). I generate the score like this:
Area bounding box ----------> 100% OK
Area of particles --------------> X%
score = 100 - (Area of particles*100)/Area bounding box
So I relate the Area of bounding box with the area of defects particles that "particle analysis" returns me.
The problem with this method is when for example I have a template wich is letters, for example: "Precaution". In image, letters are in white colour and background in black colour.
And now imagin that letter "n" in image does not exist. So score will give me around 100% (98% more or less) because "n" is compouse by a few pixels compare with bounding box.
And in this case I have to return a "bad picture"...
So exist another method to get a better score with particle analysis?? maybe related the pixel defects with another thing?
Thanks a lot.