{"id":13735570,"url":"https://github.com/craic/count_shelters","last_synced_at":"2026-03-14T05:35:54.896Z","repository":{"id":5776708,"uuid":"6990466","full_name":"craic/count_shelters","owner":"craic","description":"Image Processing Scripts to quantify Temporary Shelters in Haiti","archived":false,"fork":false,"pushed_at":"2012-12-03T22:35:53.000Z","size":4164,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-04T03:05:11.793Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/craic.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-03T22:19:15.000Z","updated_at":"2021-07-14T14:11:20.000Z","dependencies_parsed_at":"2022-08-31T03:30:30.063Z","dependency_job_id":null,"html_url":"https://github.com/craic/count_shelters","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craic%2Fcount_shelters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craic%2Fcount_shelters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craic%2Fcount_shelters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craic%2Fcount_shelters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/craic","download_url":"https://codeload.github.com/craic/count_shelters/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224727181,"owners_count":17359532,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T03:01:08.364Z","updated_at":"2025-12-16T23:32:00.294Z","avatar_url":"https://github.com/craic.png","language":"Ruby","funding_links":[],"categories":["`Python` processing of optical imagery (non deep learning)"],"sub_categories":["Case studies / Projects"],"readme":"This project is an experiment in using simple image processing techniques\non satellite images downloaded from Google Maps in order to quantify the\nrelative density of temporary shelters in adjacent qudarants.\n\nThe initial focus of this work is Port-au-Prince in Haiti where there are\nlarge numbers of slum dwellings, many of which appear to be covered in blue\nplastic tarpaulins. These provide a very distinctive feature which can be\nquantified.\n\nTake a look at my write up of the approach in the file\nBlueTarpQuantificationReport.pdf\n\n\nThe image processing code is written in Python and uses the python interface\nto the excellent OpenCV library (http://opencv.org/). The code for downloading\nimages is written in Ruby.\n\n\nThis code is made freely available under the terms of the MIT license.\n\nThe github repository is https://github.com/craic/count_shelters\n\n\nIf you have any questions or comments please contact me\n- Robert Jones (jones@craic.com)\n\n\n\nPrerequisites:\n  The OpenCV library with python bindings must be installed\n\n\n\nFetching segments of satellite images from Google maps\n\n  This URL will fetch a 640x640 pixel image centered on the latitude and longitude\n  at a zoom level of 19:\n\n  http://maps.googleapis.com/maps/api/staticmap?center=18.543012,-72.339585\u0026zoom=19\u0026size=640x640\u0026maptype=satellite\u0026sensor=false\n\n  See google documentation for more information\n  A zoom level of 19 (at least in terms of imagery in Haiti) corresponds to\n  approximately 180 meters on the ground\n\n\nExample images\n\n  See the files test_image_1.png and test_image_2.png for two example images\n  Google owns the copyright to these images - I will be happy to remove them\n  upon request\n\n  Alternatively, use variants of the URL given above to fetch other images\n\n\nScripts\n\ndetect_blue_tarps.py\n  This script processes an input image and outputs the area of blue pixels along with\n  two derived images - a one bit deep (binary) thresholded image showing blue areas\n  as white on black\n  - and the original images in which blue regions are outlined in red.\n\ncount_blue_pixels.py\n  A stripped down version of detect_blue_tarps.py that simply returns the total area\n  of blue regions\n\nfetch_image_times.rb\n  A Ruby script that generates URLs to fetch adjacent image tiles that make up a\n  matrix. The script fetches those images, computes blue regions inn each and outputs\n  the results as a CSV file.\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraic%2Fcount_shelters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcraic%2Fcount_shelters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraic%2Fcount_shelters/lists"}