pyrealsense2.depth_frame

class pyrealsense2.depth_frame

Extends the video_frame class with additional depth related attributes and functions.

__init__(self: pyrealsense2.depth_frame, arg0: pyrealsense2.frame) None

Methods

__init__(self, arg0)

as_depth_frame(self)

as_frame(self)

as_frameset(self)

as_motion_frame(self)

as_points(self)

as_pose_frame(self)

as_video_frame(self)

extract_target_dimensions(self, arg0)

This will calculate the four target dimenson size(s) in millimeter on the specific target.

get_bits_per_pixel(self)

Retrieve bits per pixel.

get_bytes_per_pixel(self)

Retrieve bytes per pixel.

get_data(self)

Retrieve data from the frame handle.

get_data_size(self)

Retrieve data size from frame handle.

get_distance(self, x, y)

Provide the depth in meters at the given pixel

get_frame_metadata(self, frame_metadata)

Retrieve the current value of a single frame_metadata.

get_frame_number(self)

Retrieve the frame number.

get_frame_timestamp_domain(self)

Retrieve the timestamp domain.

get_height(self)

Returns image height in pixels.

get_profile(self)

Retrieve stream profile from frame handle.

get_stride_in_bytes(self)

Retrieve frame stride, meaning the actual line width in memory in bytes (not the logical image width).

get_timestamp(self)

Retrieve the time at which the frame was captured

get_units(self)

Provide the scaling factor to use when converting from get_data() units to meters

get_width(self)

Returns image width in pixels.

is_depth_frame(self)

is_frame(self)

is_frameset(self)

is_motion_frame(self)

is_points(self)

is_pose_frame(self)

is_video_frame(self)

keep(self)

Keep the frame, otherwise if no refernce to the frame, the frame will be released.

supports_frame_metadata(self, frame_metadata)

Determine if the device allows a specific metadata to be queried.

swap(self, other)

Swap the internal frame handle with the one in parameter

Attributes

bits_per_pixel

Bits per pixel.

bytes_per_pixel

Bytes per pixel.

data

Data from the frame handle.

frame_number

The frame number.

frame_timestamp_domain

The timestamp domain.

height

Image height in pixels.

profile

Stream profile from frame handle.

stride_in_bytes

Frame stride, meaning the actual line width in memory in bytes (not the logical image width).

timestamp

Time at which the frame was captured.

width

Image width in pixels.

get_distance(self: pyrealsense2.depth_frame, x: int, y: int) float

Provide the depth in meters at the given pixel

get_units(self: pyrealsense2.depth_frame) float

Provide the scaling factor to use when converting from get_data() units to meters