Hello Reader,
Action Detection and Speed Estimation, this is what I wanted to do. I started making this bit in my Undergraduate final year, as a part of the curriculum. At that time I had no idea of either Computer Vision or anything related to that. I researched for quite a long time (on the Internet, of course). But all the methods that I found, were very complex and computationally very expensive. What I wanted was a very minimal system which can work "Real-Time" on very less computationally powerful devices. The device that I was targeting at that time was Raspberry Pi (a recent release at that time).
So, finally after months of research (I had sufficient knowledge of the field, and) putting everything aside I came up with a very simple solution (and very idiotic). Estimating and tracking speed of the action was always my first goal. So keeping everything aside, I divided speed of action in two parts, "Fast" and "Not Fast". In detecting these two things I took advantage of the capturing limit of the camera (640 * 480, 25fps). When there is a motion above some level, these kind of cameras are not able to capture and digitize it successfully.
Considering this camera limit, lets go to the steps which I took:
In the first image the hand is steady, and just about to start moving. Number of contours is 19. In second image, hand has started moving at a very fast speed. So, the camera is not able to capture it and digitize it properly. So number of contours we get is 9. Same thing is going to happen in next three images, number of contours found is 12, 10 and 9 respectively. Now, in the last image, hand has finished one cycle and has gone upwards again. Here, number of contours that we are detecting is 19.
These kind of events are the main base of the algorithm which estimates the speed of motion. Algorithm works this way:
I hope you liked and enjoyed the post.
I am still researching for ways to detect Human Action Recognition. So all suggestions are most most most welcome.
Please leave comments.
Thank You For Reading,
Hardik Madhu
Action Detection and Speed Estimation, this is what I wanted to do. I started making this bit in my Undergraduate final year, as a part of the curriculum. At that time I had no idea of either Computer Vision or anything related to that. I researched for quite a long time (on the Internet, of course). But all the methods that I found, were very complex and computationally very expensive. What I wanted was a very minimal system which can work "Real-Time" on very less computationally powerful devices. The device that I was targeting at that time was Raspberry Pi (a recent release at that time).
So, finally after months of research (I had sufficient knowledge of the field, and) putting everything aside I came up with a very simple solution (and very idiotic). Estimating and tracking speed of the action was always my first goal. So keeping everything aside, I divided speed of action in two parts, "Fast" and "Not Fast". In detecting these two things I took advantage of the capturing limit of the camera (640 * 480, 25fps). When there is a motion above some level, these kind of cameras are not able to capture and digitize it successfully.
Considering this camera limit, lets go to the steps which I took:
- Capture new frame and convert it to gray-scale (almost a first step everywhere)
- Subtract previous frame from the current frame (or we can say, calculate absolute difference between previous image and current image) (yeah, this is what we do to detect motion)
- Convert the difference image (which is gray-scale right now) to binary image using appropriate threshold (this can simplify the computation here onwards)
- Find contours of the difference image (okay, this will help us know the boundaries of things in motion)
- Estimate speed based on number of detected contours (you must be thinking : "HUH??")
These kind of events are the main base of the algorithm which estimates the speed of motion. Algorithm works this way:
- Wait for detection of contours more than a predefined maximum contour threshold
- Now, scan consecutive frames for number of contours
- If number of contours is less than a minimum contour threshold, keep scanning
- While scanning if the number of contours exceed the predefined maximum contour threshold, denote this event as a fast motion
I hope you liked and enjoyed the post.
I am still researching for ways to detect Human Action Recognition. So all suggestions are most most most welcome.
Please leave comments.
EDIT : Here is a full term project based on this. :)
Thank You For Reading,
Hardik Madhu
Great Research Dude
ReplyDeleteThanx :)
DeleteWell It is good project but when you did it...
ReplyDeleteHmmm....
Deletegood work dude...:-)
ReplyDeleteThanks.. And stay tuned for future posts.. :)
Delete