Skip to content

Commit

Permalink
Update image_apis.md
Browse files Browse the repository at this point in the history
This adds an extra section to the image type documentation about the new image types added in #3938
  • Loading branch information
zimmy87 authored Dec 7, 2021
1 parent de1c8ae commit 77a3be7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/image_apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ To change resolution, FOV etc, you can use [settings.json](settings.md). For exa
DisparityNormalized = 4,
Segmentation = 5,
SurfaceNormals = 6,
Infrared = 7
Infrared = 7,
OpticalFlow = 8,
OpticalFlowVis = 9
```

### DepthPlanar and DepthPerspective
Expand Down Expand Up @@ -287,5 +289,8 @@ The `simGetSegmentationObjectID` API allows you get object ID for given mesh nam
### Infrared
Currently this is just a map from object ID to grey scale 0-255. So any mesh with object ID 42 shows up with color (42, 42, 42). Please see [segmentation section](#segmentation) for more details on how to set object IDs. Typically noise setting can be applied for this image type to get slightly more realistic effect. We are still working on adding other infrared artifacts and any contributions are welcome.

### OpticalFlow and OpticalFlowVis
These image types return information about motion perceived by the point of view of the camera. OpticalFlow returns a 2-channel image where the channels correspond to vx and vy respectively. OpticalFlowVis is similar to OpticalFlow but converts flow data to RGB for a more 'visual' output.

## Example Code
A complete example of setting vehicle positions at random locations and orientations and then taking images can be found in [GenerateImageGenerator.hpp](https://github.com/Microsoft/AirSim/tree/master/Examples/DataCollection/StereoImageGenerator.hpp). This example generates specified number of stereo images and ground truth disparity image and saving it to [pfm format](pfm.md).

0 comments on commit 77a3be7

Please sign in to comment.