Tuesday, July 24, 2018

Red Lines on the Horizon

Not really too much to write about this week; I took AMOS back to Woolastook to capture some video footage:

https://youtu.be/1oR1ij-ENcQ


AMOS got caught in river grass a couple of times during the first part of this test. I'm going to have to figure out some way of shielding the propellers so that doesn't happen...

Later, I applied the feature detection (https://youtu.be/Q59GczzmsyY) and edge detection (https://www.youtube.com/watch?v=_Jexqwt0XSQ&feature=youtu.be) algorithms to the video frames to see how they worked for detecting features. As expected the features were quite susceptible to reflections and splashing in the water, but still might prove to be somewhat useful, perhaps if some form of filtering were used to remove features that don't actually correspond to obstacles in the water.

As a first step in obstacle detection, I worked on finding a way of figuring out where the horizon or coast line was in the various images. Then once that is found, other features can be considered important (i.e. obstacles) if they are below the horizon line.

Basically I looked for a color transition to indicate where the water ended and the trees / bush / sky began. I did this across the width of the image, and then found the linear line that matched up best with the found transition points. In most cases (I think > 90%, and close to 100% in open water) the horizon line was found correctly, even when there were other objects in the image, such as my kayak in the picture below, although the process used to find it was a bit computationally intensive, requiring anywhere between 0.2 to 2.5 seconds to find for each image.



The algorithm for finding the horizon / coast could still sometimes be fooled by reflections, or by large objects in the immediate foreground, including water droplets on the camera's Plexiglas window:




EDIT: Here is the video of the complete test with horizon lines added. Looking at the video, I can see that there are some issues when the waves are high and / or the sun is shining directly at the camera. Otherwise, in open water, the algorithm seems pretty good:

https://www.youtube.com/watch?v=P57pHC5y7lM&feature=youtu.be

No comments:

Post a Comment