Imaging Series, Post 1: Otsu Thresholding for Horizon Line Extraction

in #vision6 years ago

A fun project I worked on back in the day involved using Horizon Lines as a localization method in cities and towns that have very distinctive horizon lines. Today, I will briefly outline a procedure my team used for horizon line extraction called Otsu Thresholding.

The procedure for each threshold in the image goes as follows:

  1. Define Two Classes, Horizon and Landscape
  2. Minimize intra-class variance (class defined by binarization), 𝝈(t)
  3. Start with initial histogram for a range of thresholds , p(i)
  4. Sum over histograms to generate class weights
  5. Compute weighted average
  6. Compute variance for each threshold value and compute
  7. Pick t that minimizes this variance and assign class based on where pixels fall on compared to threshold

Some equations that outline the procedure are shown:

Following this procedure, image filling is done to remove noise in the images. Edge detection is then performed so that horizon points can be connected in pixel space.

The process is shown below:

Coin Marketplace

STEEM 0.22
TRX 0.20
JST 0.034
BTC 93257.09
ETH 3124.16
USDT 1.00
SBD 3.15