Clear Filters
Clear Filters

How to plot horizon line in sea images

2 views (last 30 days)
Elf
Elf on 3 Jul 2017
Commented: Image Analyst on 3 Jul 2017
I am trying to find the horizon line in sea images. I did svm training and classification. In every image, I labeled some random background locations as negative and some locations on the horizon as positive. The algorithm is working. My question is how can I show horizon line in every image (like as straight line)? Because the horizon line is located differently in every image and sometimes there are objects such as ships in the middle of the horizon line. Here is the example what I am doing;
The first image is comparison of predicted labels and tested labels. Second and third images showing HoG feature extraction and the last image is ground truth of the original image.
Thank you.

Answers (1)

Image Analyst
Image Analyst on 3 Jul 2017
Please attach the original image so we can replace the gantrycrane image in the hough() documentation example to see if it works with your images. Also attach your worst case where the horizon is broken by ships but still largely visible (not totally obscured).
If hough() doesn't work then take your green points and run RANSAC on them.
  4 Comments
Elf
Elf on 3 Jul 2017
I have tried Hough before with canny edge but sometimes it considers waves as a line in the sea. I did not understand other question about websites.
Image Analyst
Image Analyst on 3 Jul 2017
Then order this paper and follow the algorithm in it:
El merabet, Y.[Youssef], Ruichek, Y.[Yassine], Ghaffarian, S.[Saman], Samir, Z.[Zineb], Boujiha, T.[Tarik], Touahni, R.[Raja], Messoussi, R.[Rochdi], Horizon Line Detection from Fisheye Images Using Color Local Image Region Descriptors and Bhattacharyya Coefficient-Based Distance, ACIVS16(58-70).

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!