Search code examples
c++image-processingpattern-recognition

Pattern Recognition in C++


I have a simple template grayscale image, with white background and black shape over it, and I have several similar test images, I want to compare these two images and see if template matches any of the test images. Can you please suggest a simple(easy to use) pattern recognition library for C++ which takes two images and compares them and shows the result?


Solution

  • Just do image1-image2 for all pixels. Then sum up all the differences. The lower the results, the closer the images.

    If your pattern could be of several sizes, then you have to resize it and check it for each positions.