developmentseed / housing-passports-v2

Project in collaboration with WB to improve housing resilience.
https://devseed.com/housing-passports-v2/docs/index.html
MIT License
2 stars 2 forks source link

Mapillary images post processing #7

Open Rub21 opened 10 months ago

Rub21 commented 10 months ago

@srmsoumya, following our discussion about the heading angles for Mapillary images, we have been assessing the images for use in post-processing to match the predictions with the buildings, similar to our approach in the previous phases of the Housing Passport project.

The 'compass_angle' is an attribute calculated by Mapillary when 360-degree images are uploaded. According to Mapillary's documentation/GhatGPT, the 'compass_angle' represents as navigation angle in Mapillary. details : https://gist.github.com/Rub21/228f9b144ce1fe7ad1b1a83caf053bd3

To visualize what the navigation heading angle looks like, I created script to generate LineString extending from the start point to a specific distance. However, the heading direction doesn't seem to align with the road:

image

Uing chat GPT and documentation Junior, we figured out that the navigation angle could be converted to Cartesian angles for use. The Cartesian angle representation is shown below:

image

the cartesian angle make more sense in terms of roads alienation, we can also determine the angles to the left and right sides. Here's how it looks:

Screenshot 2023-10-18 at 5 15 12 PM

As per our methodology in previous phases of the Housing Passport project, we need the cartesian angles for the left an right side to do post processing.

Here the script that evaluates the angles. https://github.com/developmentseed/housing-passports-scripts/pull/5

lines_outputs_navi.geojson.zip

points_outputs_navi.geojson.zip

I would like you inputs around this , or also to do further investigation.

cc. @geohacker @yunica

srmsoumya commented 10 months ago

Thanks for working through this & detailed documentation @yunica @Rub21 - I did some reading around compass angle & their representations with true north. Convert compass angles to cartesian coordinates is the right approach.

Do we need any more information to align the points with building footprints?

srmsoumya commented 10 months ago

@Rub21 Can you fix the asset links?

Rub21 commented 10 months ago

@srmsoumya , I have just updated the images and files.