Close

Image comparison methods

A project log for Automated Elephant-detection system

Real-time machine-vision based detection of elephants in rural areas: providing warnings to locals and thus prevent human-elephant conflict

neil-k-sheridanNeil K. Sheridan 09/20/2016 at 19:060 Comments

After testing I found histogram comparison, FLANN-based matching, and brute-force matching to be not up to the task of animal detection. Histogram comparison was heavily confounded by lighting conditions! As I guess I should have expected.! I should also note that the SIFT and SURF algorithms for feature matching are no longer available in OpenCV (they are now in opencv_contrib https://github.com/opencv/opencv_contrib) so I'm not keen on using these. Especially as they are patented, and thus I'm not sure if I consider them open-source.

Anyway, I'm currently training a Haar feature-based cascade classifier (see openCV docs here) which I've had decent results on so far with detecting leaves! Actually, if you have OpenCV you can try one of these yourself to detect cat faces, since OpenCV has pre-trained Haar cascades (see git here)!! It's not great for cat faces, but it is reasonable..

I've added a list of useful resources for common problems when attempting to use Haar feature-based cascade classifiers here. Relative path is really common problem! Also training can take just for ever - and by for ever, I do mean weeks! I'm using an Amazon EC2 instance for my training.

Problems and solutions: http://stackoverflow.com/questions/38628504/opencv-exception-after-1-day-calculation

problems and solutions: http://answers.opencv.org/question/10872/cascade-training-error-opencv-244-train-dataset-for-temp-stage-can-not-filled-branch-training-terminated-cascade-classifier-cant-be-trained-check-the/

problems and solutions: http://answers.opencv.org/question/16868/error-in-train-casacde/?answer=53164#post-id-53164

problems and solutions: http://stackoverflow.com/questions/11412655/error-train-dataset-for-temp-stage-can-not-be-filled-while-using-traincascade

Discussions