/detect-squares

Search imagery for square-shaped features and export centroids as shapefile

Primary LanguageJupyter Notebook

Detect Squares

Makes use of the brilliant scikit-image library to detect the centers of basic square-like shapes in imagery and output these as points in a shapefile.

An application is shown below using a Landsat-8 panchromatic band as a test image. Although the resolution of the imagery does limit detection accuracy, a good number of squares were detected correctly providing a basic human population map. Landsat-8 imagery is freely available from USGS Earthexplorer.

Test image: alt text

Test image + detected squares (green points): alt text

Test image + heatmap of detected squares: alt text

Dependencies

  • GDAL
  • Numpy
  • Scipy
  • Shapely
  • Fiona
  • Skimage