0

I am new to AForge.net. I have several dot pattern images and i need to find the occurrence of each in another image. Using a fixed confidence level of around 0.9f i am unable to get results. However when i lower the confidence level i get invalid results. Please help me to select the appropriate algorithm for the given problem or a sample code. Thank you in advance.

Image

enter image description here

dot_pattern_1

enter image description here

dot_pattern_2

enter image description here

James Wong
  • 4,529
  • 4
  • 48
  • 65

1 Answers1

0

Your pattern and and image have different scale. Image black square has a width of 5 pixels, and pattern black square has a width of 6 pixels. Scaling is a problem for ExhaustiveTemplateMatching, it is just a moving window that compares images pixel by pixel.

Second, images provided by you are in jpeg format and have appropriate jpeg artifacts, it is better to use formats with lossless compression (for example .png) to test your algorithms.

Possible solution for your problem may be generating patterns with different scale and using ExhaustiveTemplateMatching for each of generated pattern.

halachkin
  • 37
  • 1
  • 7