Week 2 of the project focuses on learning edge detection, optical motion detection, and the application of Kalman Filter on object tracking. Some of them are not necessarily related to this project but it's always good to learn more because someday these knowledge will come in handy :)
1. Application of Kalman Filter:
In this video you can see at least 9 times, the predicted position (using Kalman Filter) went far away from the actual position, this phenomenon actually shows the idea behind Kalman Filter - predicting the next move by looking at previous moves. This algorithm gives the predicted position 'inertia'. To improve this, we can use video with higher frame rates so this algorithm can have more information and more opportunities to correct itself.
2. Edge Detection (with Gaussian Blur treatment):
- Canny
Canny algorithm is pretty good at separating larger objects and detecting their edges, like this lego man, however, when it comes to detecting the edge of tiny water patterns, Canny algorithm just isn't that good. (Canny often produces all black image when detecting water patterns.)
- Sobel(along the horizontal axis):
Sobel algorithm did an OK job detecting the lego man and when it comes to wave patterns, this algorithm also provides us with some information rather than a black image (like what Canny often does).
Although it's very noisy but you can still see a ripple-like pattern (this specific algorithm includes Gaussian Blur treatment before the picture is processed for edge detection, which improves Sobel's result).
3. Dense Optical Flow (DOF) Motion Detection
Different from last week's colour based detection, DOF algorithm detects motion vectors of pixels and marks moving area with different colour. It is very useful when you have no control over the colour of the background and the object, but a stationary camera or background is necessary.
(In the second video, you can see when the mouse is gone, it became very noisy, that's because the algorithm starts picking up very tiny movement of pixels after the large moving object is gone.)
Conclusion & Lesson:
- Canny is not the best algorithm at detecting small wave patterns, however, when the lighting and camera angle are perfect, you can pick up decent images like this one:
- Gaussian Blur is not always good for edge detection depending on your choice of algorithm and environment.
So, the next step is to create a wave tank environment that's perfect for Canny algorithm to pick up wave patters.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.