.. |_nbsp| unicode:: 0xA0 0xA0 0xA0 0xA0
    :trim:

Annotators
==========

..
    The preview.png image is generated by following the next steps:
    * Run the `isaacsim.sensors.experimental.camera.tests.test_camera_sensor.TestCameraSensor.test_data` test case.
    * Rename the output image to keep only the annotator names (without the file extension).
    * Open the 'Files' explorer in the directory containing the generated images and enable 'Show grid' visualization.
    * Adjust the zoom level and the window size to get a good view of the images, then do a screenshot.

The sensor classes included in this extension support, depending on the implementation,
a subset of the following annotators (outputs/data products generated by the camera sensors):

Standard Annotators
-------------------

These annotators can be used in any rendering mode.
Annotator's description and outputs are listed in the table below.

.. list-table::
    :header-rows: 1

    * - Annotator
      - Description
      - Shape |_nbsp| |_nbsp| |_nbsp|
      - Type / Dtype
    * - ``"bounding_box_2d_loose"``
      - Loose 2D bounding boxes (regardless of occlusions) and their semantic IDs.
      - N/A
      - ``np.ndarray``
    * - ``"bounding_box_2d_tight"``
      - Tight 2D bounding boxes (only the visible pixels of entities, completely occluded entities are ommited) and their semantic IDs.
      - N/A
      - ``np.ndarray``
    * - ``"bounding_box_3d"``
      - 3D bounding boxes (regardless of occlusions) and their semantic IDs.
      - N/A
      - ``np.ndarray``
    * - ``"distance_to_camera"``
      - Depth map from objects to the position of the camera.
      - ``(H, W, 1)``
      - ``wp.array`` / ``float32``
    * - ``"distance_to_image_plane"``
      - Depth map from objects to the image plane of the camera.
      - ``(H, W, 1)``
      - ``wp.array`` / ``float32``
    * - ``"instance_id_segmentation"``
      - Instance segmentation that returns the renderer instance IDs.
      - ``(H, W, 1)``
      - ``wp.array`` / ``uint32``
    * - ``"instance_segmentation"``
      - Instance segmentation of each entity in the camera's field of view. Only semantically labelled entities are returned.
      - ``(H, W, 1)``
      - ``wp.array`` / ``uint32``
    * - ``"motion_vectors"``
      - Relative motion (dx, dy) of a pixel in the camera's field of view between frames, also known as optical flow.
      - ``(H, W, 2)``
      - ``wp.array`` / ``float32``
    * - ``"normals"``
      - Normals (x, y, z) of the surface at each pixel in the camera's field of view.
      - ``(H, W, 3)``
      - ``wp.array`` / ``float32``
    * - ``"pointcloud"``
      - Points sampled on the surface of the prims in the camera's field of view.
      - ``(N, 3)``
      - ``wp.array`` / ``float32``
    * - ``"rgb"``
      - Low dynamic range (LDR) RGB image.
      - ``(H, W, 3)``
      - ``wp.array`` / ``uint8``
    * - ``"rgba"``
      - Low dynamic range (LDR) RGBA image.
      - ``(H, W, 4)``
      - ``wp.array`` / ``uint8``
    * - ``"semantic_segmentation"``
      - Semantic segmentation of each entity in the camera's field of view.
      - ``(H, W, 1)``
      - ``wp.array`` / ``uint32``

Single View Depth Annotators
----------------------------

These annotators can be used in single view depth rendering mode.
Annotator's description and outputs are listed in the table below.

.. list-table::
    :header-rows: 1

    * - Annotator
      - Description
      - Shape |_nbsp| |_nbsp| |_nbsp|
      - Type / Dtype
    * - ``"depth_sensor_distance"``
      - Depth map from objects to the position of the camera.
      - ``(H, W, 1)``
      - ``wp.array`` / ``float32``
    * - ``"depth_sensor_imager"``
      - Low dynamic range (LDR) luminance.
      - ``(H, W, 1)``
      - ``wp.array`` / ``float32``
    * - ``"depth_sensor_point_cloud_color"``
      - RGBA color for each point cloud point.
      - ``(N, 4)``
      - ``wp.array`` / ``uint8``
    * - ``"depth_sensor_point_cloud_position"``
      - Points sampled relative to the left imager camera.
      - ``(N, 3)``
      - ``wp.array`` / ``float32``
