|
OrbbecSDK 2.5.5
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
|
Frame related function is mainly used to obtain frame data and frame information. More...
#include "ObTypes.h"Go to the source code of this file.
Functions | |
| OB_EXPORT ob_frame * | ob_create_frame (ob_frame_type frame_type, ob_format format, uint32_t data_size, ob_error **error) |
| Crate a frame object based on the specified parameters. | |
| OB_EXPORT ob_frame * | ob_create_frame_from_other_frame (const ob_frame *other_frame, bool should_copy_data, ob_error **error) |
| Create (clone) a frame object based on the specified other frame object. | |
| OB_EXPORT ob_frame * | ob_create_frame_from_stream_profile (const ob_stream_profile *stream_profile, ob_error **error) |
| Create a frame object according to the specified stream profile. | |
| OB_EXPORT ob_frame * | ob_create_video_frame (ob_frame_type frame_type, ob_format format, uint32_t width, uint32_t height, uint32_t stride_bytes, ob_error **error) |
| Create an video frame object based on the specified parameters. | |
| OB_EXPORT ob_frame * | ob_create_frame_from_buffer (ob_frame_type frame_type, ob_format format, uint8_t *buffer, uint32_t buffer_size, ob_frame_destroy_callback *buffer_destroy_cb, void *buffer_destroy_context, ob_error **error) |
| Create a frame object based on an externally created buffer. | |
| OB_EXPORT ob_frame * | ob_create_video_frame_from_buffer (ob_frame_type frame_type, ob_format format, uint32_t width, uint32_t height, uint32_t stride_bytes, uint8_t *buffer, uint32_t buffer_size, ob_frame_destroy_callback *buffer_destroy_cb, void *buffer_destroy_context, ob_error **error) |
| Create a video frame object based on an externally created buffer. | |
| OB_EXPORT ob_frame * | ob_create_frameset (ob_error **error) |
| Create an empty frameset object. | |
| OB_EXPORT void | ob_frame_add_ref (const ob_frame *frame, ob_error **error) |
| Increase the reference count of a frame object. | |
| OB_EXPORT void | ob_delete_frame (const ob_frame *frame, ob_error **error) |
| Delete a frame object. | |
| OB_EXPORT void | ob_frame_copy_info (const ob_frame *src_frame, ob_frame *dst_frame, ob_error **error) |
| Copy the information of the source frame object to the destination frame object. | |
| OB_EXPORT uint64_t | ob_frame_get_index (const ob_frame *frame, ob_error **error) |
| Get the frame index. | |
| OB_EXPORT ob_format | ob_frame_get_format (const ob_frame *frame, ob_error **error) |
| Get the frame format. | |
| OB_EXPORT ob_frame_type | ob_frame_get_type (const ob_frame *frame, ob_error **error) |
| Get the frame type. | |
| OB_EXPORT uint64_t | ob_frame_get_timestamp_us (const ob_frame *frame, ob_error **error) |
| Get the frame timestamp (also known as device timestamp, hardware timestamp) of the frame in microseconds. | |
| OB_EXPORT void | ob_frame_set_timestamp_us (ob_frame *frame, uint64_t timestamp_us, ob_error **error) |
| Set the frame timestamp (also known as the device timestamp, hardware timestamp) of a frame object. | |
| OB_EXPORT uint64_t | ob_frame_get_system_timestamp_us (const ob_frame *frame, ob_error **error) |
| Get the system timestamp of the frame in microseconds. | |
| OB_EXPORT void | ob_frame_set_system_timestamp_us (ob_frame *frame, uint64_t system_timestamp_us, ob_error **error) |
| Set the system timestamp of the frame in microseconds. | |
| OB_EXPORT uint64_t | ob_frame_get_global_timestamp_us (const ob_frame *frame, ob_error **error) |
| Get the global timestamp of the frame in microseconds. | |
| OB_EXPORT uint8_t * | ob_frame_get_data (const ob_frame *frame, ob_error **error) |
| Get the data buffer of a frame. | |
| OB_EXPORT void | ob_frame_update_data (ob_frame *frame, const uint8_t *data, uint32_t data_size, ob_error **error) |
| Update the data of a frame. | |
| OB_EXPORT uint32_t | ob_frame_get_data_size (const ob_frame *frame, ob_error **error) |
| Get the frame data size. | |
| OB_EXPORT uint8_t * | ob_frame_get_metadata (const ob_frame *frame, ob_error **error) |
| Get the metadata of the frame. | |
| OB_EXPORT uint32_t | ob_frame_get_metadata_size (const ob_frame *frame, ob_error **error) |
| Get the metadata size of the frame. | |
| OB_EXPORT void | ob_frame_update_metadata (ob_frame *frame, const uint8_t *metadata, uint32_t metadata_size, ob_error **error) |
| Update the metadata of the frame. | |
| OB_EXPORT bool | ob_frame_has_metadata (const ob_frame *frame, ob_frame_metadata_type type, ob_error **error) |
| check if the frame contains the specified metadata | |
| OB_EXPORT int64_t | ob_frame_get_metadata_value (const ob_frame *frame, ob_frame_metadata_type type, ob_error **error) |
| Get the metadata value of the frame. | |
| OB_EXPORT ob_stream_profile * | ob_frame_get_stream_profile (const ob_frame *frame, ob_error **error) |
| Get the stream profile of the frame. | |
| OB_EXPORT void | ob_frame_set_stream_profile (ob_frame *frame, const ob_stream_profile *stream_profile, ob_error **error) |
| Set (override) the stream profile of the frame. | |
| OB_EXPORT ob_sensor * | ob_frame_get_sensor (const ob_frame *frame, ob_error **error) |
| Get the sensor of the frame. | |
| OB_EXPORT ob_device * | ob_frame_get_device (const ob_frame *frame, ob_error **error) |
| Get the device of the frame. | |
| OB_EXPORT uint32_t | ob_video_frame_get_width (const ob_frame *frame, ob_error **error) |
| Get video frame width. | |
| OB_EXPORT uint32_t | ob_video_frame_get_height (const ob_frame *frame, ob_error **error) |
| Get video frame height. | |
| OB_EXPORT ob_pixel_type | ob_video_frame_get_pixel_type (const ob_frame *frame, ob_error **error) |
| Get video frame pixel format. | |
| OB_EXPORT void | ob_video_frame_set_pixel_type (ob_frame *frame, ob_pixel_type pixel_type, ob_error **error) |
| Set video frame pixel format. | |
| OB_EXPORT uint8_t | ob_video_frame_get_pixel_available_bit_size (const ob_frame *frame, ob_error **error) |
| Get the effective number of pixels (such as Y16 format frame, but only the lower 10 bits are effective bits, and the upper 6 bits are filled with 0) | |
| OB_EXPORT void | ob_video_frame_set_pixel_available_bit_size (ob_frame *frame, uint8_t bit_size, ob_error **error) |
| Set the effective number of pixels (such as Y16 format frame, but only the lower 10 bits are effective bits, and the upper 6 bits are filled with 0) | |
| OB_EXPORT ob_sensor_type | ob_ir_frame_get_source_sensor_type (const ob_frame *frame, ob_error **ob_error) |
| Get the source sensor type of the ir frame (left or right for dual camera) | |
| OB_EXPORT float | ob_depth_frame_get_value_scale (const ob_frame *frame, ob_error **error) |
| Get the value scale of the depth frame. The pixel value of the depth frame is multiplied by the scale to give a depth value in millimeters. For example, if valueScale=0.1 and a certain coordinate pixel value is pixelValue=10000, then the depth value = pixelValue*valueScale = 10000*0.1=1000mm. | |
| OB_EXPORT void | ob_depth_frame_set_value_scale (ob_frame *frame, float value_scale, ob_error **error) |
| Set the value scale of the depth frame. The pixel value of the depth frame is multiplied by the scale to give a depth value in millimeters. For example, if valueScale=0.1 and a certain coordinate pixel value is pixelValue=10000, then the depth value = pixelValue*valueScale = 10000*0.1=1000mm. | |
| OB_EXPORT float | ob_points_frame_get_coordinate_value_scale (const ob_frame *frame, ob_error **error) |
| Get the point coordinate value scale of the points frame. The point position value of the points frame is multiplied by the scale to give a position value in millimeters. For example, if scale=0.1, the x-coordinate value of a point is x = 10000, which means that the actual x-coordinate value = x*scale = 10000*0.1 = 1000mm. | |
| OB_EXPORT ob_accel_value | ob_accel_frame_get_value (const ob_frame *frame, ob_error **error) |
| Get accelerometer frame data. | |
| OB_EXPORT float | ob_accel_frame_get_temperature (const ob_frame *frame, ob_error **error) |
| Get the temperature when acquiring the accelerometer frame. | |
| OB_EXPORT ob_gyro_value | ob_gyro_frame_get_value (const ob_frame *frame, ob_error **error) |
| Get gyroscope frame data. | |
| OB_EXPORT float | ob_gyro_frame_get_temperature (const ob_frame *frame, ob_error **error) |
| Get the temperature when acquiring the gyroscope frame. | |
| OB_EXPORT uint32_t | ob_frameset_get_count (const ob_frame *frameset, ob_error **error) |
| Get the number of frames contained in the frameset. | |
| OB_EXPORT ob_frame * | ob_frameset_get_depth_frame (const ob_frame *frameset, ob_error **error) |
| Get the depth frame from the frameset. | |
| OB_EXPORT ob_frame * | ob_frameset_get_color_frame (const ob_frame *frameset, ob_error **error) |
| Get the color frame from the frameset. | |
| OB_EXPORT ob_frame * | ob_frameset_get_ir_frame (const ob_frame *frameset, ob_error **error) |
| Get the infrared frame from the frameset. | |
| OB_EXPORT ob_frame * | ob_frameset_get_points_frame (const ob_frame *frameset, ob_error **error) |
| Get point cloud frame from the frameset. | |
| OB_EXPORT ob_frame * | ob_frameset_get_frame (const ob_frame *frameset, ob_frame_type frame_type, ob_error **error) |
| Get a frame of a specific type from the frameset. | |
| OB_EXPORT ob_frame * | ob_frameset_get_frame_by_index (const ob_frame *frameset, uint32_t index, ob_error **error) |
| Get a frame at a specific index from the FrameSet. | |
| OB_EXPORT void | ob_frameset_push_frame (ob_frame *frameset, const ob_frame *frame, ob_error **error) |
| Push a frame to the frameset. | |
| OB_EXPORT uint32_t | ob_point_cloud_frame_get_width (const ob_frame *frame, ob_error **error) |
| Get point cloud frame width. | |
| OB_EXPORT uint32_t | ob_point_cloud_frame_get_height (const ob_frame *frame, ob_error **error) |
| Get point cloud frame height. | |
Frame related function is mainly used to obtain frame data and frame information.
Definition in file Frame.h.
| #define ob_video_frame_metadata ob_frame_get_metadata |
| #define ob_video_frame_metadata_size ob_frame_get_metadata_size |
| #define ob_frame_index ob_frame_get_index |
| #define ob_frame_format ob_frame_get_format |
| #define ob_frame_time_stamp_us ob_frame_get_timestamp_us |
| #define ob_frame_set_device_time_stamp_us ob_frame_set_timestamp_us |
| #define ob_frame_system_time_stamp_us ob_frame_get_system_timestamp_us |
| #define ob_frame_global_time_stamp_us ob_frame_get_global_timestamp_us |
| #define ob_frame_data ob_frame_get_data |
| #define ob_frame_data_size ob_frame_get_data_size |
| #define ob_frame_metadata ob_frame_get_metadata |
| #define ob_frame_metadata_size ob_frame_get_metadata_size |
| #define ob_video_frame_width ob_video_frame_get_width |
| #define ob_video_frame_height ob_video_frame_get_height |
| #define ob_video_frame_pixel_available_bit_size ob_video_frame_get_pixel_available_bit_size |
| #define ob_points_frame_get_position_value_scale ob_points_frame_get_coordinate_value_scale |
| #define ob_frameset_frame_count ob_frameset_get_count |
| #define ob_frameset_depth_frame ob_frameset_get_depth_frame |
| #define ob_frameset_color_frame ob_frameset_get_color_frame |
| #define ob_frameset_ir_frame ob_frameset_get_ir_frame |
| #define ob_frameset_points_frame ob_frameset_get_points_frame |
| #define ob_accel_frame_value ob_accel_frame_get_value |
| #define ob_accel_frame_temperature ob_accel_frame_get_temperature |
| #define ob_gyro_frame_value ob_gyro_frame_get_value |
| #define ob_gyro_frame_temperature ob_gyro_frame_get_temperature |
| #define ob_frameset_get_frame_count ob_frameset_get_count |
| #define ob_frame_time_stamp | ( | frame, | |
| err ) |
| #define ob_frame_system_time_stamp | ( | frame, | |
| err ) |
| #define ob_frame_set_system_time_stamp | ( | frame, | |
| system_timestamp, | |||
| err ) |
| #define ob_frame_set_device_time_stamp | ( | frame, | |
| device_timestamp, | |||
| err ) |
| OB_EXPORT ob_frame * ob_create_frame | ( | ob_frame_type | frame_type, |
| ob_format | format, | ||
| uint32_t | data_size, | ||
| ob_error ** | error ) |
Crate a frame object based on the specified parameters.
| frame_type | The frame object type. |
| format | The frame object format. |
| data_size | The size of the frame object data. |
| error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::FrameFactory::createFrame().
| OB_EXPORT ob_frame * ob_create_frame_from_other_frame | ( | const ob_frame * | other_frame, |
| bool | should_copy_data, | ||
| ob_error ** | error ) |
Create (clone) a frame object based on the specified other frame object.
The new frame object will have the same properties as the other frame object, but the data buffer is newly allocated.
| [in] | other_frame | The frame object to create the new frame object according to. |
| [in] | should_copy_data | If true, the data of the source frame object will be copied to the new frame object. If false, the new frame object will have a data buffer with random data. |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::FrameFactory::createFrameFromOtherFrame().
| OB_EXPORT ob_frame * ob_create_frame_from_stream_profile | ( | const ob_stream_profile * | stream_profile, |
| ob_error ** | error ) |
Create a frame object according to the specified stream profile.
| stream_profile | The stream profile to create the new frame object according to. |
| error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::FrameFactory::createFrameFromStreamProfile().
| OB_EXPORT ob_frame * ob_create_video_frame | ( | ob_frame_type | frame_type, |
| ob_format | format, | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| uint32_t | stride_bytes, | ||
| ob_error ** | error ) |
Create an video frame object based on the specified parameters.
| [in] | frame_type | Frame object type. |
| [in] | format | Frame object format. |
| [in] | width | Frame object width. |
| [in] | height | Frame object height. |
| [in] | stride_bytes | Row span in bytes. If 0, the stride is calculated based on the width and format. |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::FrameFactory::createVideoFrame().
| OB_EXPORT ob_frame * ob_create_frame_from_buffer | ( | ob_frame_type | frame_type, |
| ob_format | format, | ||
| uint8_t * | buffer, | ||
| uint32_t | buffer_size, | ||
| ob_frame_destroy_callback * | buffer_destroy_cb, | ||
| void * | buffer_destroy_context, | ||
| ob_error ** | error ) |
Create a frame object based on an externally created buffer.
| [in] | frame_type | Frame object type. |
| [in] | format | Frame object format. |
| [in] | buffer | Frame object buffer. |
| [in] | buffer_size | Frame object buffer size. |
| [in] | buffer_destroy_cb | Destroy callback, will be called when the frame object is destroyed. |
| [in] | buffer_destroy_context | Destroy context, user-defined context to be passed to the destroy callback. |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::FrameFactory::createFrameFromBuffer().
| OB_EXPORT ob_frame * ob_create_video_frame_from_buffer | ( | ob_frame_type | frame_type, |
| ob_format | format, | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| uint32_t | stride_bytes, | ||
| uint8_t * | buffer, | ||
| uint32_t | buffer_size, | ||
| ob_frame_destroy_callback * | buffer_destroy_cb, | ||
| void * | buffer_destroy_context, | ||
| ob_error ** | error ) |
Create a video frame object based on an externally created buffer.
| [in] | frame_type | Frame object type. |
| [in] | format | Frame object format. |
| [in] | width | Frame object width. |
| [in] | height | Frame object height. |
| [in] | stride_bytes | Row span in bytes. If 0, the stride is calculated based on the width and format. |
| [in] | buffer | Frame object buffer. |
| [in] | buffer_size | Frame object buffer size. |
| [in] | buffer_destroy_cb | Destroy callback, user-defined function to destroy the buffer. |
| [in] | buffer_destroy_context | Destroy context, user-defined context to be passed to the destroy callback. |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::FrameFactory::createVideoFrameFromBuffer().
Create an empty frameset object.
A frameset object is a special type of frame object that can be used to store multiple frames.
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::FrameFactory::createFrameSet().
Increase the reference count of a frame object.
The reference count is used to manage the lifetime of the frame object.
| [in] | frame | Frame object to increase the reference count. |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::Frame::as(), and ob::Frame::as().
Delete a frame object.
This function will decrease the reference count of the frame object and release the memory if the reference count becomes 0.
| [in] | frame | The frame object to delete. |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::Frame::~Frame().
| OB_EXPORT void ob_frame_copy_info | ( | const ob_frame * | src_frame, |
| ob_frame * | dst_frame, | ||
| ob_error ** | error ) |
Copy the information of the source frame object to the destination frame object.
Including the index, timestamp, system timestamp, global timestamp and metadata will be copied.
| [in] | src_frame | Source frame object to copy the information from. |
| [in] | dst_frame | Destination frame object to copy the information to. |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Get the frame index.
| [in] | frame | Frame object |
| [out] | error | Log wrong message |
Referenced by ob::Frame::getIndex().
Get the frame format.
| [in] | frame | Frame object |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::Frame::getFormat().
| OB_EXPORT ob_frame_type ob_frame_get_type | ( | const ob_frame * | frame, |
| ob_error ** | error ) |
Get the frame type.
| [in] | frame | Frame object |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::Frame::getType().
Get the frame timestamp (also known as device timestamp, hardware timestamp) of the frame in microseconds.
The hardware timestamp is the time point when the frame was captured by the device (Typically in the mid-exposure, unless otherwise stated), on device clock domain.
| [in] | frame | Frame object |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::Frame::getTimeStampUs().
| OB_EXPORT void ob_frame_set_timestamp_us | ( | ob_frame * | frame, |
| uint64_t | timestamp_us, | ||
| ob_error ** | error ) |
Set the frame timestamp (also known as the device timestamp, hardware timestamp) of a frame object.
| [in] | frame | Frame object to set the timestamp. |
| [in] | timestamp_us | frame timestamp to set in microseconds. |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::FrameHelper::setFrameDeviceTimestampUs().
Get the system timestamp of the frame in microseconds.
The system timestamp is the time point when the frame was received by the host, on host clock domain.
| [in] | frame | Frame object |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::Frame::getSystemTimeStampUs().
| OB_EXPORT void ob_frame_set_system_timestamp_us | ( | ob_frame * | frame, |
| uint64_t | system_timestamp_us, | ||
| ob_error ** | error ) |
Set the system timestamp of the frame in microseconds.
| frame | Frame object |
| system_timestamp_us | frame system timestamp to set in microseconds. |
| error | Pointer to an error object that will be set if an error occurs. |
Get the global timestamp of the frame in microseconds.
The global timestamp is the time point when the frame was captured by the device, and has been converted to the host clock domain. The conversion process base on the frame timestamp and can eliminate the timer drift of the device
| [in] | frame | Frame object |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::Frame::getGlobalTimeStampUs().
Get the data buffer of a frame.
| [in] | frame | The frame object from which to retrieve the data. |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::Frame::getData().
| OB_EXPORT void ob_frame_update_data | ( | ob_frame * | frame, |
| const uint8_t * | data, | ||
| uint32_t | data_size, | ||
| ob_error ** | error ) |
Update the data of a frame.
The data will be memcpy to the frame data buffer.
The frame data size will be also updated as the input data size.
| [in] | frame | The frame object to update. |
| [in] | data | The new data to update the frame with. |
| [in] | data_size | The size of the new data. |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Get the frame data size.
| [in] | frame | Frame object |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::Frame::getDataSize().
Get the metadata of the frame.
| [in] | frame | frame object |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::Frame::getMetadata().
Get the metadata size of the frame.
| [in] | frame | frame object |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::Frame::getMetadataSize().
| OB_EXPORT void ob_frame_update_metadata | ( | ob_frame * | frame, |
| const uint8_t * | metadata, | ||
| uint32_t | metadata_size, | ||
| ob_error ** | error ) |
Update the metadata of the frame.
The metadata will be memcpy to the frame metadata buffer.
The frame metadata size will be also updated as the input metadata size.
| [in] | frame | frame object |
| [in] | metadata | The new metadata to update. |
| [in] | metadata_size | The size of the new metadata. |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
| OB_EXPORT bool ob_frame_has_metadata | ( | const ob_frame * | frame, |
| ob_frame_metadata_type | type, | ||
| ob_error ** | error ) |
check if the frame contains the specified metadata
| [in] | frame | frame object |
| [in] | type | metadata type, refer to ob_frame_metadata_type |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::Frame::hasMetadata().
| OB_EXPORT int64_t ob_frame_get_metadata_value | ( | const ob_frame * | frame, |
| ob_frame_metadata_type | type, | ||
| ob_error ** | error ) |
Get the metadata value of the frame.
| [in] | frame | frame object |
| [in] | type | metadata type, refer to ob_frame_metadata_type |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::Frame::getMetadataValue().
| OB_EXPORT ob_stream_profile * ob_frame_get_stream_profile | ( | const ob_frame * | frame, |
| ob_error ** | error ) |
Get the stream profile of the frame.
| frame | frame object |
| error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::Frame::getStreamProfile().
| OB_EXPORT void ob_frame_set_stream_profile | ( | ob_frame * | frame, |
| const ob_stream_profile * | stream_profile, | ||
| ob_error ** | error ) |
Set (override) the stream profile of the frame.
| frame | frame object |
| stream_profile | The stream profile to set for the frame. |
| error | Pointer to an error object that will be set if an error occurs. |
Get the sensor of the frame.
| [in] | frame | frame object |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::Frame::getSensor().
Get the device of the frame.
| frame | frame object | |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::Frame::getDevice().
Get video frame width.
| [in] | frame | Frame object |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::VideoFrame::getWidth().
Get video frame height.
| [in] | frame | Frame object |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::VideoFrame::getHeight().
| OB_EXPORT ob_pixel_type ob_video_frame_get_pixel_type | ( | const ob_frame * | frame, |
| ob_error ** | error ) |
Get video frame pixel format.
Usually used to determine the pixel type of depth frame (depth, disparity, raw phase, etc.)
| frame | Frame object |
| error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::VideoFrame::getPixelType().
| OB_EXPORT void ob_video_frame_set_pixel_type | ( | ob_frame * | frame, |
| ob_pixel_type | pixel_type, | ||
| ob_error ** | error ) |
Set video frame pixel format.
| frame | Frame object |
| pixel_type | the pixel format of the frame |
| error | Pointer to an error object that will be set if an error occurs. |
| OB_EXPORT uint8_t ob_video_frame_get_pixel_available_bit_size | ( | const ob_frame * | frame, |
| ob_error ** | error ) |
Get the effective number of pixels (such as Y16 format frame, but only the lower 10 bits are effective bits, and the upper 6 bits are filled with 0)
| [in] | frame | video frame object |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::VideoFrame::getPixelAvailableBitSize().
| OB_EXPORT void ob_video_frame_set_pixel_available_bit_size | ( | ob_frame * | frame, |
| uint8_t | bit_size, | ||
| ob_error ** | error ) |
Set the effective number of pixels (such as Y16 format frame, but only the lower 10 bits are effective bits, and the upper 6 bits are filled with 0)
| [in] | frame | video frame object |
| [in] | bit_size | the effective number of pixels in the pixel, or 0 if it is an unsupported format |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
| OB_EXPORT ob_sensor_type ob_ir_frame_get_source_sensor_type | ( | const ob_frame * | frame, |
| ob_error ** | ob_error ) |
Get the source sensor type of the ir frame (left or right for dual camera)
| frame | Frame object |
| ob_error | Pointer to an error object that will be set if an error occurs. |
Get the value scale of the depth frame. The pixel value of the depth frame is multiplied by the scale to give a depth value in millimeters. For example, if valueScale=0.1 and a certain coordinate pixel value is pixelValue=10000, then the depth value = pixelValue*valueScale = 10000*0.1=1000mm.
| [in] | frame | Frame object |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::DepthFrame::getValueScale().
| OB_EXPORT void ob_depth_frame_set_value_scale | ( | ob_frame * | frame, |
| float | value_scale, | ||
| ob_error ** | error ) |
Set the value scale of the depth frame. The pixel value of the depth frame is multiplied by the scale to give a depth value in millimeters. For example, if valueScale=0.1 and a certain coordinate pixel value is pixelValue=10000, then the depth value = pixelValue*valueScale = 10000*0.1=1000mm.
| [in] | frame | Frame object |
| [in] | value_scale | The value scale of the depth frame |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
| OB_EXPORT float ob_points_frame_get_coordinate_value_scale | ( | const ob_frame * | frame, |
| ob_error ** | error ) |
Get the point coordinate value scale of the points frame. The point position value of the points frame is multiplied by the scale to give a position value in millimeters. For example, if scale=0.1, the x-coordinate value of a point is x = 10000, which means that the actual x-coordinate value = x*scale = 10000*0.1 = 1000mm.
| [in] | frame | Frame object |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::PointsFrame::getCoordinateValueScale().
| OB_EXPORT ob_accel_value ob_accel_frame_get_value | ( | const ob_frame * | frame, |
| ob_error ** | error ) |
Get accelerometer frame data.
| [in] | frame | Accelerometer frame. |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::AccelFrame::getValue().
Get the temperature when acquiring the accelerometer frame.
| [in] | frame | Accelerometer frame. |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::AccelFrame::getTemperature().
| OB_EXPORT ob_gyro_value ob_gyro_frame_get_value | ( | const ob_frame * | frame, |
| ob_error ** | error ) |
Get gyroscope frame data.
| [in] | frame | Gyroscope frame. |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::GyroFrame::getValue().
Get the temperature when acquiring the gyroscope frame.
| [in] | frame | Gyroscope frame. |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::GyroFrame::getTemperature().
Get the number of frames contained in the frameset.
| [in] | frameset | frameset object |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::FrameSet::getCount().
Get the depth frame from the frameset.
| [in] | frameset | Frameset object. |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Get the color frame from the frameset.
| [in] | frameset | Frameset object. |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Get the infrared frame from the frameset.
| [in] | frameset | Frameset object. |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Get point cloud frame from the frameset.
| [in] | frameset | Frameset object. |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
| OB_EXPORT ob_frame * ob_frameset_get_frame | ( | const ob_frame * | frameset, |
| ob_frame_type | frame_type, | ||
| ob_error ** | error ) |
Get a frame of a specific type from the frameset.
| [in] | frameset | Frameset object. |
| [in] | frame_type | Frame type. |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::FrameSet::getFrame().
| OB_EXPORT ob_frame * ob_frameset_get_frame_by_index | ( | const ob_frame * | frameset, |
| uint32_t | index, | ||
| ob_error ** | error ) |
Get a frame at a specific index from the FrameSet.
| [in] | frameset | Frameset object. |
| [in] | index | The index of the frame. |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::FrameSet::getFrameByIndex().
| OB_EXPORT void ob_frameset_push_frame | ( | ob_frame * | frameset, |
| const ob_frame * | frame, | ||
| ob_error ** | error ) |
Push a frame to the frameset.
| [in] | frameset | Frameset object. |
| [in] | frame | Frame object to push. |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::FrameSet::pushFrame().
Get point cloud frame width.
| [in] | frame | point cloud Frame object |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::PointsFrame::getWidth().
Get point cloud frame height.
| [in] | frame | point cloud Frame object |
| [out] | error | Pointer to an error object that will be set if an error occurs. |
Referenced by ob::PointsFrame::getHeight().