diff --git a/image_apis/index.html b/image_apis/index.html index 4480952..046a691 100755 --- a/image_apis/index.html +++ b/image_apis/index.html @@ -370,7 +370,7 @@

Quick Tips

Ready to Run Complete Examples

Python

-

For a more complete ready to run sample code please see sample code in AirSimClient project for multirotors or HelloCar sample. This code also demonstrates simple activities such as saving images in files or using numpy to manipulate images.

+

For a more complete ready to run sample code please see sample code in AirSimClient project for multirotors or HelloCar sample. This code also demonstrates simple activities such as saving images in files or using numpy to manipulate images.

Available Cameras

Car

The cameras on car can be accessed by following names in API calls: front_center, front_right, front_left, fpv and back_center. Here FPV camera is driver's head position in the car.

@@ -388,7 +388,7 @@

"Computer Vision" Mode

"SimMode": "ComputerVision" } -

Here's the Python code example to move camera around and capture images.

+

Here's the Python code example to move camera around and capture images.

This mode was inspired from UnrealCV project.

Setting Pose in Computer Vision Mode

To move around the environment using APIs you can use simSetVehiclePose API. This API takes position and orientation and sets that on the invisible vehicle where the front-center camera is located. All rest of the cameras move along keeping the relative position. If you don't want to change position (or orientation) then just set components of position (or orientation) to floating point nan values. The simGetVehiclePose allows to retrieve the current pose. You can also use simGetGroundTruthKinematics to get the quantities kinematics quantities for the movement. Many other non-vehicle specific APIs are also available such as segmentation APIs, collision APIs and camera APIs.

@@ -403,7 +403,7 @@

Camera APIs

Gimbal

You can set stabilization for pitch, roll or yaw for any camera using settings.

-

Please see example usage.

+

Please see example usage.

Changing Resolution and Camera Parameters

To change resolution, FOV etc, you can use settings.json. For example, below addition in settings.json sets parameters for scene capture and uses "Computer Vision" mode described above. If you omit any setting then below default values will be used. For more information see settings doc. If you are using stereo camera, currently the distance between left and right is fixed at 25 cm.

{
@@ -467,8 +467,8 @@ 

Segmentation

To retrieve the color map to know which color is assign to each color index you can use:

colorMap = client.simGetSegmentationColorMap()
 
-

An example can be found in segmentation_test.py. -For a script that generates a full list of objects and their associated color, please see the script segmentation_generate_list.py.

+

An example can be found in segmentation_test.py. +For a script that generates a full list of objects and their associated color, please see the script segmentation_generate_list.py.

How to Find Mesh names?

To get desired ground truth segmentation you will need to know the names of the meshes in your Unreal environment. To do this, you can use the API:

currentObjectList = client.simListInstanceSegmentationObjects()
@@ -485,7 +485,7 @@ 

More information

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 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.

Example Code

-

A complete example of setting vehicle positions at random locations and orientations and then taking images can be found in GenerateImageGenerator.hpp. This example generates specified number of stereo images and ground truth disparity image and saving it to pfm format.

+

A complete example of setting vehicle positions at random locations and orientations and then taking images can be found in GenerateImageGenerator.hpp. This example generates specified number of stereo images and ground truth disparity image and saving it to pfm format.