diff --git a/docs/images/depth.png b/docs/images/depth.png new file mode 100644 index 0000000000..1b1612b479 Binary files /dev/null and b/docs/images/depth.png differ diff --git a/docs/images/point_cloud.png b/docs/images/point_cloud.png new file mode 100644 index 0000000000..2140120e32 Binary files /dev/null and b/docs/images/point_cloud.png differ diff --git a/docs/point_clouds.md b/docs/point_clouds.md new file mode 100644 index 0000000000..eb9e06cc19 --- /dev/null +++ b/docs/point_clouds.md @@ -0,0 +1,17 @@ +# Point Clouds + +Moved here from [https://github.com/microsoft/AirSim/wiki/Point-Clouds](https://github.com/microsoft/AirSim/wiki/Point-Clouds) + +A Python script [point_cloud.py](https://github.com/Microsoft/AirSim/blob/master/PythonClient/multirotor/point_cloud.py) shows how to convert the depth image returned from AirSim into a point cloud. + +The following depth image was captured using the Modular Neighborhood environment: + +![depth](images/depth.png) + +And with the appropriate projection matrix, the OpenCV `reprojectImageTo3D` function can turn this into a point cloud. The following is the result, which is also available here: [https://skfb.ly/68r7y](https://skfb.ly/68r7y). + +![depth](images/point_cloud.png) + +[SketchFab](https://sketchfab.com) can upload the resulting file `cloud.asc` and render it for you. + +PS: you may notice the scene is reflected on the Y axis, so I may have a sign wrong in the projection matrix. An exercise for the reader :-) diff --git a/mkdocs.yml b/mkdocs.yml index ed85c6529d..500f27dd4b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -92,7 +92,7 @@ nav: - "Autonomous Driving on Azure": 'https://aka.ms/AutonomousDrivingCookbook' - "Building Hexacopter": 'https://github.com/Microsoft/AirSim/wiki/hexacopter' - "Moving on Path Demo": 'https://github.com/Microsoft/AirSim/wiki/moveOnPath-demo' - - "Building Point Clouds": 'https://github.com/Microsoft/AirSim/wiki/Point-Clouds' + - "Building Point Clouds": 'point_clouds.md' - "Surveying Using Drone": 'drone_survey.md' - "Orbit Trajectory": "orbit.md" - "Misc":