Periphery (Camera)

Capture Depth Image

Retrieves depth (distance) data from the captured image.

  • In the json format, returns the per-pixel Euclidean range in the requested unit (pixels without geometry are returned as 0.0), the unit it is expressed in, and the camera intrinsics in pixels for the requested resolution, so callers can convert the range to planar depth themselves.
  • In the rgb_png format, returns a colorized visualization instead; a PNG carries neither intrinsics nor a unit.
get/periphery/cameras/capture/depth

Query parameters

result_type'json' | 'rgb_png' | 'jpeg' required

Format which will be used to represent the captured data. 'json' carries the measurements; 'rgb_png' and 'jpeg' are renderings to look at, and jpeg is lossy.

Format which will be used to represent the captured data. 'json' carries the measurements; 'rgb_png' and 'jpeg' are renderings to look at, and jpeg is lossy.

nearnumber nullable

Near end of the PNG colour ramp, in stage units. Leave it out to fit the ramp to the frame.

Near end of the PNG colour ramp, in stage units. Leave it out to fit the ramp to the frame.

farnumber nullable

Far end of the PNG colour ramp, in stage units. Leave it out to fit the ramp to the frame.

Far end of the PNG colour ramp, in stage units. Leave it out to fit the ramp to the frame.

unit'mm' | 'm'

Length unit for the returned depth values.

Length unit for the returned depth values.

camera_prim_pathstring nullable

Path of camera prim. Leave it out to capture through the active viewport camera.

Path of camera prim. Leave it out to capture through the active viewport camera.

widthinteger

Image width in px

Image width in px

heightinteger

Image height in px

Image height in px

Response

Successfully fetched depth data

unit'mm' | 'm'

Length unit the depth values are expressed in.

Changes