Template Matching between two binary image.
Mostrar comentarios más antiguos
Sir,
I have two binary images. One is the main image and another is for template image. Now i want to match them to see if they are equal or not. What will be the best approach to do that for this kind of problem? For your well understanding i attach two images
this is the main binary image

And this is the template image

Please help sir.
Respuestas (1)
Image Analyst
el 16 de Nov. de 2014
Editada: Image Analyst
el 16 de Nov. de 2014
0 votos
Try using Hu's moments: http://www.youtube.com/watch?v=Nc06tlZAv_Q Hu's moments for the image will match if the image is rotated, translated, scaled, etc.
4 comentarios
Asif Hasan
el 16 de Nov. de 2014
Editada: Asif Hasan
el 16 de Nov. de 2014
Image Analyst
el 16 de Nov. de 2014
If you know for a fact that this, or some other, image will be an exact match pixel for pixel, then you can simply subtract them and check that all pixels are zero. If it's a pixel for pixel match but maybe just translated, then you can use normalized cross correlation, like in the attached demo. To me this looks like some biometric application that someone posted before about identifying individuals based on the blood vessel pattern in the sclera of their eye. If that's the case then neither of those two approaches would work well.
Asif Hasan
el 16 de Nov. de 2014
Image Analyst
el 16 de Nov. de 2014
I already suggested Hu's moments. I don't know why you rejected that. I actually haven't used it myself but it looks promising. There are other methods. Look up methods in Vision Bib on pattern recognition. Do a search on CBIR which uses a large variety of methods to match features and objects. I can't help much more, especially since soon I will be traveling for most of today and tomorrow.
Categorías
Más información sobre Image Processing Toolbox en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!