Position estimation based on a horizon

Detect the horizon with a classification strategy, then compute the position relative to the horizon
291 Downloads
Updated 10 Sep 2015

View License

This algorithm computes the roll angel of an aircraft relative to the horizon, by detecting the
horizon with a classification strategy. It also tries to estimate how good the computed roll value is.
This example should show you how classification on an image basically works. There are also several test images to play around with.

How this approach works:

The image gets separated into white pixels which represent the sky and into black pixels which representing the ground.
This is done by an SVM Classifier which was trained with real data from several sky and ground pictures.
For training i have extracted several color and texture based features of the sky and of the ground.

In the binary resulting image you can now extract the horizon line who separates the black and white pixels. To calculate the roll angel of an aircraft relative to the horizon I computed a 1.order polynom, by looking on how good the polynom fit was you can say something about the accuracy of the computed roll angel.

To run the algorithm you first have to train the SVM Classifier with the
example images given in "Test_set_Training" by executing
"Train_Classifier.m"
it then generates the "SVM_Struckt.mat" which enables you to classify every
Test picture into Sky and Ground pixels.

After that you can run "main.m" and change the Test_Pictures from 1-9
to see what effect different pictures have on this algorithm

Notice I had to find some license free pictures to train the classifier and to
give you an example of how this algorithm works. For that reason the
pictures are not optimal and you may consider choosing other ones.

Cite As

Christian Wolf (2024). Position estimation based on a horizon (https://www.mathworks.com/matlabcentral/fileexchange/52955-position-estimation-based-on-a-horizon), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2015a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Guidance, Navigation, and Control (GNC) in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

position estimation based on a horizon/

Version Published Release Notes
1.0.0.0