Difference between revisions of "Bee counter software"
(→Summary) |
(→Summary) |
||
Line 18: | Line 18: | ||
#Threshold based on grey value. | #Threshold based on grey value. | ||
#Filter to smooth the noise. (The exact process changes from version to version but currently: | #Filter to smooth the noise. (The exact process changes from version to version but currently: | ||
− | ##[docs.opencv.org/doc/tutorials/imgproc/erosion_dilatation/erosion_dilatation.html Erode] the threshold image twice to remove legs, etc and try to seperate the bees. | + | ##[http://docs.opencv.org/doc/tutorials/imgproc/erosion_dilatation/erosion_dilatation.html Erode] the threshold image twice to remove legs, etc and try to seperate the bees. |
##Blur the image to smoth it. | ##Blur the image to smoth it. | ||
#Draw a color contour around each object and color code it based on size (area). | #Draw a color contour around each object and color code it based on size (area). |
Revision as of 01:08, 21 March 2015
Summary
beeTrack1 is a c++ program using openCV libraries. Here is an example of it processing video:
http://hivetool.org/counter/beeTrack1_2.mp4
Processing steps for each frame:
- Convert image to grey scale.
- Threshold based on grey value.
- Filter to smooth the noise. (The exact process changes from version to version but currently:
- Erode the threshold image twice to remove legs, etc and try to seperate the bees.
- Blur the image to smoth it.
- Draw a color contour around each object and color code it based on size (area).
- Check each existing track to see if one falls within a contour of an object.
- If so, append the center coordinates of the object to the track. If not, start a new track.
- When the track ends, increment the IN or OUT counter depending on where the track starts, ends and length.
Hivetool | |
---|---|
1 bee | Brown |
2 bees | Orange |
3 bees | Yellow |
4 bees | Blue |
5 bees | Violet |
Background
Open Computer Vision ([[1]]) is an open source computer vision and machine learning software library. The library has more than 2500 optimized algorithms, which includes a comprehensive set of both classic and state-of-the-art computer vision and machine learning algorithms.
Kyle Hounslow has posted several YouTube videos on using openCV for motion tracking:
https://www.youtube.com/watch?v=X6rPdRZzgjg
Note that what most videos call tracking, is really just object identification. Tracking the object from frame to frame is trivial if there is only one object, but becomes harder and more error prone if there are multiple objects, especially if they can touch or occlude each other.