Question

So far I've been able to detect key points from my training image within my query image very accurately using BFMatcher. However, I have dozens of instance of my training image (a bee) occurring within my query image (the frame of a beehive). Is it possible to use SIFT to look for multiple independent instances of another image?detecting a bee with SIFT and OpenCV

Ideally, I'm hoping to get to the point wit the above image where I can match 4 key points from my query image against multiple independent bees.

Was it helpful?

Solution

I don't know OpenCV well enough to know if it specifically offers routines to help. That said, the math to DIY isn't too bad if you have a numerical library for SVD e.g. numpy. In Lowe's 2004 paper, a match is determined by the ratio of the two closest matches. If you compute all keypoints in your 'query image' and then apply this criteria you will very easily return multiple results if they are present (any 2 keypoints in the database with the same ratio +/- epsilon are a match). However, this can result in spurious matches. So, in addition to the basic test from the Lowe paper, RANSAC can be used to discard candidate matches that are not consistent with a homography between your 'training image' and the 'query image'. See 'Distinctive Image Features from Scale-Invariant Keypoints' by David Lowe and google "RANSAC homography" for details. I'm not sure if your desire to match 4 keypoints specifically is critical. The technique I'm referring to will use 4 points to calculate the candidate homography at each RANSAC iteration, but the total number that match can easily be >4 if it so happens that they match and are consistent with the homography. Using 4 points only will be possible using only the ratio test, but will not be possible using RANSAC.

OTHER TIPS

I remember some works on bees that uses Eigenvector technique for detection (and particle filter for tracking), maybe could be helpful, maybe not : )

Khan, Z., Balch, T., & Dellaert, F. (2004, June). A rao-blackwellized particle filter for eigentracking. In Computer Vision and Pattern Recognition, 2004. CVPR 2004. Proceedings of the 2004 IEEE Computer Society Conference on (Vol. 2, pp. II-980). IEEE.

Anyway the researcher Zia Khan has done some wonderful works on tracking (and specially on particle filter) working on various types of bees and ants, have a look at his other works, it could help maybe!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top