Kinect For Azure Python API
List of all members
Image Class Reference

A class that represents an image from an imaging sensor in an Azure Kinect device. More...

Detailed Description

A class that represents an image from an imaging sensor in an Azure Kinect device.

Property Name Type R/W

Description

data numpy.ndarray R/W

The image data as a numpy ndarray.

image_format EImageFormat R

The format of the image.

size_bytes int R

The size in bytes of the data.

width_pixels int R

The width in pixels of the data.

height_pixels int R

The height in pixels of the data.

stride_bytes int R

The stride in bytes of the rows.

device_timestamp_usec int R/W

The device timestamp in microseconds.

  • Timestamps are recorded by the device and represent the mid-point of exposure. They may be used for relative comparison, but their absolute value has no defined meaning.
  • If the Image is invalid or if no timestamp was set for the image, this value will be 0. It is also possible for a 0 value to be a valid timestamp originating from the beginning of a recording or the start of streaming.

system_timestamp_nsec int R/W

The device timestamp in nanoseconds.

  • The system timestamp is a high performance and increasing clock (from boot). The timestamp represents the time immediately after the image buffer was read by the host PC.
  • Timestamps are recorded by the host. They may be used for relative comparision, as they are relative to the corresponding system clock. The absolute value is a monotonic count from an arbitrary point in the past.
  • The system timestamp is captured at the moment host PC finishes receiving the image.
  • On Linux the system timestamp is read from clock_gettime(CLOCK_MONOTONIC), which measures realtime and is not impacted by adjustments to the system clock. It starts from an arbitrary point in the past. On Windows the system timestamp is read from QueryPerformanceCounter(). It also measures realtime and is not impacted by adjustments to the system clock. It also starts from an arbitrary point in the past.
  • If the Image is invalid or if no timestamp was set for the image, this value will be 0. It is also possible for a 0 value to be a valid timestamp originating from the beginning of a recording or the start of streaming.

exposure_usec int R/W

The image exposure in microseconds.

  • This is only supported on color image formats.
  • If the Image is invalid or if no exposure was set for the image, this value will be 0. An exposure time of 0 is considered invalid.

white_balance int R/W

The image white balance in Kelvin.

  • This function is only valid for color captures, and not for depth or IR captures.
  • If the Image is invalid or if no white balance was set for the image, this value will be 0. A white balance of 0 is considered invalid.

iso_speed int R/W

The image ISO speed.

  • This function is only valid for color captures, and not for depth or IR captures.
  • If the Image is invalid or if no white balance was set for the image, this value will be 0. If the image is read from the device and this value is 0, this indicates the ISO speed was not available or an error occurred. An ISO of 0 is considered invalid.

Remarks
  • An Image manages an image buffer and associated metadata.
  • Do not use the Image() constructor to get an Image instance. It will return an object that does not have a handle to the image resources held by the SDK. Instead, use the create() function.
  • The memory associated with the image buffer in an Image may have been allocated by the Azure Kinect APIs or by the application. If the Image was created by an Azure Kinect API, its memory will be freed when all references to the Image are released. All images retrieved directly from a device will have been created by the API. An application can create an Image using memory that it has allocated using create_from_ndarray() and passing an numpy ndarray with a pre-allocated memory. In both cases, the memory is released when the all references to the Image object are released, either explicitly with del or it goes out of scope. Users do not need to worry about memory allocation and deallocation other than the normal rules for Python objects.
  • An image has a number of metadata properties that can be set or retrieved. Not all properties are applicable to images of all types. See the documentation for the individual properties for more information on their applicability and meaning.
  • Images may be of one of the standard EImageFormat formats, or may be of format EImageFormat.CUSTOM. The format defines how the underlying image buffer should be interpreted.
  • Images from a device are retrieved through a Capture object returned by Device.get_capture().
  • Images stored in a capture are referenced by the capture until they are replaced or the capture is destroyed.
  • An Image object may be copied or deep copied. A shallow copy shares the same data as the original, and any changes in one will affect the other. A deep copy does not share any resources with the original, and changes in one will not affect the other. In both shallow and deep copies, deleting one will have no effects on the other.

The documentation for this class was generated from the following file: