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.19
TRX 0.25
JST 0.037
BTC 96709.35
ETH 3340.46
USDT 1.00
SBD 3.16