{"id":21397674,"url":"https://github.com/sijoma/crowddensityanalysis","last_synced_at":"2026-05-20T15:02:02.388Z","repository":{"id":85372711,"uuid":"108981354","full_name":"Sijoma/CrowdDensityAnalysis","owner":"Sijoma","description":"Project for the masters course \"Python in GIS\" course during the summer term 2017","archived":false,"fork":false,"pushed_at":"2018-12-17T08:04:53.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T02:25:31.556Z","etag":null,"topics":["crowd","density","gdal","image-recognition","movement-speed","opencv"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Sijoma.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-31T10:40:34.000Z","updated_at":"2018-12-17T08:04:54.000Z","dependencies_parsed_at":"2023-07-02T22:31:57.693Z","dependency_job_id":null,"html_url":"https://github.com/Sijoma/CrowdDensityAnalysis","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"f1a22343ef8b9a24252e74e01e71b662bd17eb32"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sijoma%2FCrowdDensityAnalysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sijoma%2FCrowdDensityAnalysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sijoma%2FCrowdDensityAnalysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sijoma%2FCrowdDensityAnalysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sijoma","download_url":"https://codeload.github.com/Sijoma/CrowdDensityAnalysis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243886010,"owners_count":20363649,"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":["crowd","density","gdal","image-recognition","movement-speed","opencv"],"created_at":"2024-11-22T14:43:58.735Z","updated_at":"2026-05-20T15:01:57.362Z","avatar_url":"https://github.com/Sijoma.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Introduction\r\nIn the context of the university course ”Python in GIS” two different data types were provided,\r\nimage data and smartphone trajectories including GPS points around the football stadium in\r\nMönchengladbach. We were asked to develop a simple research question, which should be\r\nanswered using the provided data.\r\nDr. Florian Hillen presented a formula * to calculate the crowd density out of the movement speed of\r\nthe persons. The second possibility to calculate the density is to use the image data and to do image\r\nrecognition to examine persons in the area of interest. Thus, there are two different methods\r\nto calculate the crowd density around the stadium. In our project, we wanted to compare\r\nthese two crowd density calculation methods and examine if there are differences in the\r\nresults. Hence, the research question for the project is \"Are the results of deriving the crowd density from image recognition coinciding with the results of the calculation using movement speed?”.\r\n\r\n## What do these scripts do?\r\n\r\nScript1DensemapGenerator.py : Generates a crowd density map of a georeferenced aerial image and copy's the projection.\r\nScript2ProcessShapes.py : Processes shapefiles that include a gps track of a person in a crowd. It calculates the speed of this person and calculates the crowd density around that object based on a formula* that includes the speed. Several plots that compare the formula density and the density from image processing, are created and stored as a png file.\r\n\r\nRemarks: Scripts have to be adjusted to work with other data properly. The used data is not supplied in this repository.\r\n\r\n*Hillen, Florian, Oliver Meynberg, and Bernhard Höfle. \"Routing in Dense Human Crowds\r\nUsing Smartphone Movement Data and Optical Aerial Imagery.\" ​ ISPRS International Journal\r\nof Geo-Information ​ 4.2 (2015): 974-988\r\n\r\n## Instructions\r\n\r\nThe following libraries need to be installed: numpy, gdal, matplotlib.\r\nAdditionally OpenCV and Scikit learn are required if you want to run the Script1DensemapGenerator, however this will take \r\ntake some time depending on your hardware. \r\n\r\nWhen the dependencies are installed, please run the script Script1DensemapGenerator.py and Script2ProcessShapes.py \r\nto reproduce the project. \r\n\r\nMake sure that you edit the first line of the scripts to match the path of your data directory and note that you need \r\nto use the data file provided with the code.\r\n\r\nIf you want to run 'Script2ProcessShapes.py' more than once you have to  copy the shapefiles in 'rawDataSave' to the 'smartphone_data' folder. This is necessary as the script deletes features.\r\n\r\n## Installation guide\r\n### OpenCV \r\n\r\n#### Windows\r\nOpenCV requires the following packages:\r\n -  Python-2.7.x. http://python.org/ftp/python/2.7.5/python-2.7.5.msi\r\n -  Numpy. (At least version 1.7.1) http://sourceforge.net/projects/numpy/files/NumPy/1.7.1/numpy-1.7.1-win32-superpack-python2.7.exe/download\r\n -  Matplotlib https://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.3.0/matplotlib-1.3.0.win32-py2.7.exe\r\n -  Download latest OpenCV (Version 3.2.0) release from sourceforge site and double-click to extract it.\r\n\r\nGoto opencv/build/python/2.7 folder.\r\nCopy cv2.pyd to C:/Python27/lib/site-packages.\r\n\r\n#### Linux, OSX\r\n`Pip install opencv-python`\r\n\r\nCheck if it is installed correctly:\r\nOpen Python IDLE and type following codes in Python terminal.\r\n\r\n`import cv2`\r\n\r\n`print cv2.__version__`\r\n\r\nIf the results are printed out without any errors, you have installed OpenCV-Python successfully.\r\n### Scikit learn \r\n#### Windows\r\n1. Open the following page: http://www.lfd.uci.edu/~gohlke/pythonlibs/#scikit-image\r\n2. Search for ‘Scikit Image’\r\n3. Download scikit_image‑0.13.0‑cp27‑cp27m‑win32.whl (Python 2.7.x)\r\n4. Install this .whl file with the command\r\n `pip install C:/your-dir/scikit_name-file.whl`\r\n\r\n#### Linux, OSX\r\n1. `pip install -U scikit-image`\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsijoma%2Fcrowddensityanalysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsijoma%2Fcrowddensityanalysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsijoma%2Fcrowddensityanalysis/lists"}