Noting the interesting discussion about optical flow and horizon finders in this DIYdrones thread, we 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, then compute pitch and roll angles based on the line slope and intercept.