Software based horizon finder for SRV-1 Blackfin camera

Here's an updated version of the software-based horizon finder for SRV-1 Blackfin. An actual slope and intercept is now being computed, and some filtering has been added as well ...



Here was the original post ...


Noting the interesting discussion about optical flow and horizon finders in this thread, I undertook to add a simple horizon finder to the SRV-1 Blackfin Camera firmware. The algorithm uses a basic edge detection function that is already build into the SRV-1, dividing the image into 16 columns and searching from top-to-bottom for first edge hits. From the video, it appears that the edge threshold could be set a bit lower, but the results are pretty good without any tuning or filtering.
The Google Code project is here - http://code.google.com/p/surveyor-srv1-firmware/ . Next step is to add a least-squares fit to draw a line through the edge segments and then compute pitch and roll angles.

Views: 878

Comment by Robert Drone on May 16, 2009 at 9:51am
Very nice how do you plan to use that for nav?
Comment by Howard Gordon on May 16, 2009 at 9:55am
Using a least-squares fit to draw a line through the edge segments, we can directly convert the angle of the line to a roll angle and the height of the line to a pitch angle.

Developer
Comment by Jordi Muñoz on May 16, 2009 at 1:17pm
You can also use it to void mountain collision. I love it!
Comment by Jack Crossfire on May 16, 2009 at 2:16pm
But can it be reduced to the cost of 2 LISY300AL's?
Comment by Jack Crossfire on May 16, 2009 at 2:39pm
You'd have to use the camera for some other purpose in addition to attitude sensing.
Comment by Harry on May 16, 2009 at 2:43pm
Is there an outside link to the video? For some reason I cant view any videos on this site - big white blank where videos go.
Comment by Howard Gordon on May 16, 2009 at 2:54pm
Harry - try http://www.surveyor.com/images/horizon.mov or http://www.youtube.com/watch?v=MKp-b2nymKk

Jack - the camera chip by itself costs about half as much as a single LISY300AL, though you need to add a few bucks for the lens. It is attached to a 500MHz Blackfin processor. We already use the camera + processor for remote camera feed and autonomous control, so attitude sensing adds zero incremental cost. That said, you will get tighter control with the gyros, but I doubt that thermopiles would perform any better than the camera.
Comment by Jack Crossfire on May 16, 2009 at 8:51pm
Wow! The price of the LISY300AL's doubled in the last week. They used to be $6 at arrow & $8 at digikey. Now they're $10 & $15. Might be worth studying alternatives to IMU's at current inflation rates or saving up on Turkish Lyra.
Comment by Harry on May 18, 2009 at 11:31am
Nice, really sees the edges. It seems the horizon should be the fit that includes edges that arent real different in Y from neighbors. I suppose least squares would cover that?

BTW, videos embedded on diydrones work great with flash installed properly.
Comment by Harry on May 18, 2009 at 11:47am

Here's what I mean. I picked a frame, and fit it by eye. The horizon has some mountains and the edges seem to be in groups with the largest groups having 4 segments and the smallest have 3. That grouping would vary, but should the largest groups have the most weight? Would least squares account for that?

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service