Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/craic/count_shelters
Image Processing Scripts to quantify Temporary Shelters in Haiti
https://github.com/craic/count_shelters
Last synced: 3 months ago
JSON representation
Image Processing Scripts to quantify Temporary Shelters in Haiti
- Host: GitHub
- URL: https://github.com/craic/count_shelters
- Owner: craic
- Created: 2012-12-03T22:19:15.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2012-12-03T22:35:53.000Z (almost 12 years ago)
- Last Synced: 2024-05-16T12:14:27.395Z (6 months ago)
- Language: Ruby
- Size: 3.97 MB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
- awesome-earthobservation-code - count blue pixels - This project is an experiment in using simple image processing techniques on satellite images downloaded from Google Maps in order to quantify the relative density of temporary shelters in adjacent qudarants. `Python` `Ruby` (`Python` processing of optical imagery (non deep learning) / Case studies / Projects)
README
This project is an experiment in using simple image processing techniques
on satellite images downloaded from Google Maps in order to quantify the
relative density of temporary shelters in adjacent qudarants.The initial focus of this work is Port-au-Prince in Haiti where there are
large numbers of slum dwellings, many of which appear to be covered in blue
plastic tarpaulins. These provide a very distinctive feature which can be
quantified.Take a look at my write up of the approach in the file
BlueTarpQuantificationReport.pdfThe image processing code is written in Python and uses the python interface
to the excellent OpenCV library (http://opencv.org/). The code for downloading
images is written in Ruby.This code is made freely available under the terms of the MIT license.
The github repository is https://github.com/craic/count_shelters
If you have any questions or comments please contact me
- Robert Jones ([email protected])Prerequisites:
The OpenCV library with python bindings must be installedFetching segments of satellite images from Google maps
This URL will fetch a 640x640 pixel image centered on the latitude and longitude
at a zoom level of 19:http://maps.googleapis.com/maps/api/staticmap?center=18.543012,-72.339585&zoom=19&size=640x640&maptype=satellite&sensor=false
See google documentation for more information
A zoom level of 19 (at least in terms of imagery in Haiti) corresponds to
approximately 180 meters on the groundExample images
See the files test_image_1.png and test_image_2.png for two example images
Google owns the copyright to these images - I will be happy to remove them
upon requestAlternatively, use variants of the URL given above to fetch other images
Scripts
detect_blue_tarps.py
This script processes an input image and outputs the area of blue pixels along with
two derived images - a one bit deep (binary) thresholded image showing blue areas
as white on black
- and the original images in which blue regions are outlined in red.count_blue_pixels.py
A stripped down version of detect_blue_tarps.py that simply returns the total area
of blue regionsfetch_image_times.rb
A Ruby script that generates URLs to fetch adjacent image tiles that make up a
matrix. The script fetches those images, computes blue regions inn each and outputs
the results as a CSV file.