Difference between revisions of "Bee counter software"
Line 16: | Line 16: | ||
#Convert image to grey scale. | #Convert image to grey scale. | ||
#Threshold based on grey value. | #Threshold based on grey value. | ||
− | #Filter to | + | #Filter to smooth the noise. |
#Draw a contour around each object. | #Draw a contour around each object. | ||
#Calculate area of each object and color code it based on size | #Calculate area of each object and color code it based on size | ||
− | #Check each track to see if it falls within a contour | + | #Check each track to see if it 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. | #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 ends. | #When the track ends, increment the In or out counter depending on where the track ends. | ||
Line 30: | Line 30: | ||
5 green | 5 green | ||
6 blue | 6 blue | ||
− | 7 | + | 7 violet |
Revision as of 03:47, 19 March 2015
beeTrack1 is a c++ program using openCV libraries. Here is an example of it processing video:
http://hivetool.org/counter/beeTrack1_1.mp4
Processing steps for each frame:
- Convert image to grey scale.
- Threshold based on grey value.
- Filter to smooth the noise.
- Draw a contour around each object.
- Calculate area of each object and color code it based on size
- Check each track to see if it 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 ends.
1 brown
2 red
3 orange
4 yellow
5 green
6 blue
7 violet