Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 308
rajat Avatar asked Mar 16 '26 09:03

rajat


2 Answers

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.

like image 178
bokan Avatar answered Mar 19 '26 06:03

bokan


Implement a Neural Network on the image. Inputs should be the greyscales of your image. you should train your network to a train set, chose proper regularization parameters using a cross validation set, and finally test your network on a test set.

http://www.codeproject.com/Articles/13582/Back-propagation-Neural-Net

(I have done this myself to train a network to recognise hand written digits - it works very well.)

like image 45
alexandreC Avatar answered Mar 19 '26 07:03

alexandreC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!