Computer Vision for elephant-detection

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 04/21/2016 at 20:360 Comments

This is the most challenging part of the project. After discounting MathLab and GNU Octave, I've decided to use OpenCV in Python to compare images of suspected elephants with images of known elephants. Specifically I'm working on using feature matching ( Brute-Force matcher and FLANN Matcher); although this is rather slow. Perhaps just plain histogram comparison will be good enough. This is really fast, and elephants do have a distinct color!

Here's an outline of using FlannBasedMatcher and FLANN ( Fast Approximate Nearest Neighbor Search Library ) in OpenCV:

  1. Detect the keypoints using SURF Detector
  2. Calculate descriptors (feature vectors)
  3. Matching descriptor vectors using FLANN matcher
  4. Quick calculation of max and min distances between keypoints
  5. Report only "good" matches (i.e. whose distance is less than 2*min_dist, or a small arbitary value ( 0.02 ) in the event that min_dist is very small)