Update SDK version to v2.4.1

This commit is contained in:
jj
2025-05-19 10:32:44 +08:00
parent 5bd616cb90
commit 8ee93124f9
44 changed files with 2197 additions and 1122 deletions
@@ -211,12 +211,12 @@ OB_EXPORT bool ob_device_preset_list_has_preset(const ob_device_preset_list *pre
* @return bool Returns true if the device supports the frame interleave feature.
*/
OB_EXPORT bool ob_device_is_frame_interleave_supported(const ob_device *device, ob_error **error);
/**
/**
*
* @brief load the frame interleave mode according to frame interleavee name.
*
* @param device The device object.
* @param interleave_ae_name The name should be one of the frame interleave names returned by @ref ob_device_get_available_frame_interleave_list.
* @param frame_interleave_name The name should be one of the frame interleave names returned by @ref ob_device_get_available_frame_interleave_list.
* @param error Log error messages.
*/
OB_EXPORT void ob_device_load_frame_interleave(ob_device *device, const char *frame_interleave_name, ob_error **error);
@@ -230,11 +230,10 @@ OB_EXPORT void ob_device_load_frame_interleave(ob_device *device, const char *fr
*/
OB_EXPORT ob_device_frame_interleave_list *ob_device_get_available_frame_interleave_list(ob_device *device, ob_error **error);
/**
* @brief Delete the available frame interleave list.
*
* @param interleave_ae_list The available frame interleave list.
* @param frame_interleave_list The available frame interleave list.
* @param error Log error messages.
*/
OB_EXPORT void ob_delete_frame_interleave_list(ob_device_frame_interleave_list *frame_interleave_list, ob_error **error);
@@ -242,7 +241,7 @@ OB_EXPORT void ob_delete_frame_interleave_list(ob_device_frame_interleave_list *
/**
* @brief Get the number of frame interleave in the frame interleave list.
*
* @param interleave_ae_list The available frame interleave list.
* @param frame_interleave_list The available frame interleave list.
* @param error Log error messages.
* @return The number of frame interleave in the frame interleave list.
*/
@@ -251,7 +250,7 @@ OB_EXPORT uint32_t ob_device_frame_interleave_list_get_count(ob_device_frame_int
/**
* @brief Get the name of frame interleave in the frame interleave list.
*
* @param interleave_ae_list The available frame interleave list.
* @param frame_interleave_list The available frame interleave list.
* @param index The index of frame interleave in the frame interleave list.
* @param error Log error messages.
* @return The name of frame interleave in the frame interleave list..
@@ -261,8 +260,8 @@ OB_EXPORT const char *ob_device_frame_interleave_list_get_name(ob_device_frame_i
/**
* @brief Check if the interleave ae list has the interleave ae.
*
* @param interleave_ae_list The available interleave ae list.
* @param interleave_ae_name The name of the interleave ae.
* @param frame_interleave_list The available interleave ae list.
* @param frame_interleave_name The name of the interleave ae.
* @param error Log error messages.
* @return Whether the interleave ae list has the interleave ae. If true, the interleave ae list has the interleave ae. If false, the interleave ae list does
* not have the interleave ae.
@@ -104,7 +104,7 @@ OB_EXPORT void ob_enable_device_clock_sync(ob_context *context, uint64_t repeat_
OB_EXPORT void ob_free_idle_memory(ob_context *context, ob_error **error);
/**
* @brief For linux, there are two ways to enable the UVC backend: libuvc and libusb. This function is used to set the backend type.
* @brief For linux, there are two ways to enable the UVC backend: libuvc and v4l2. This function is used to set the backend type.
* @brief It is effective when the new device is created.
*
* @attention This interface is only available for Linux.
@@ -155,7 +155,7 @@ OB_EXPORT void ob_set_logger_to_console(ob_log_severity severity, ob_error **err
/**
* @brief Set the extensions directory
* @brief The extensions directory is used to search for dynamic libraries that provide additional functionality to the SDK, such as the Frame filters.
* @brief The extensions directory is used to search for dynamic libraries that provide additional functionality to the SDK, such as the Frame filters.
*
* @attention Should be called before creating the context and pipeline, otherwise the default extensions directory (./extensions) will be used.
*
@@ -166,6 +166,26 @@ OB_EXPORT void ob_device_get_structured_data(ob_device *device, ob_property_id p
*/
OB_EXPORT void ob_device_get_raw_data(ob_device *device, ob_property_id property_id, ob_get_data_callback cb, void *user_data, ob_error **error);
/**
* @brief Set customer data.
*
* @param[in] device The device object.
* @param[in] data The property data to be set.
* @param[in] data_size The size of the property to be set,the maximum length cannot exceed 65532 bytes.
* @param[out] error Log error messages.
*/
OB_EXPORT void ob_device_write_customer_data(ob_device *device, const void *data, uint32_t data_size, ob_error **error);
/**
* @brief Get customer data of a device property.
*
* @param[in] device The device object.
* @param[out] data The obtained property data.
* @param[out] data_size The size of the obtained property data.
* @param[out] error Log error messages.
*/
OB_EXPORT void ob_device_read_customer_data(ob_device *device, void *data, uint32_t *data_size, ob_error **error);
/**
* @brief Get the number of properties supported by the device.
*
@@ -305,9 +325,8 @@ OB_EXPORT void ob_device_enable_heartbeat(ob_device *device, bool enable, ob_err
* @param[in] send_data The data to be sent to the device.
* @param[in] send_data_size The size of the data to be sent to the device.
* @param[out] receive_data The data received from the device.
* @param[in, out] receive_data_size Pass in the expected size of the receive data, and return the actual size of the received data.
* @param[in,out] receive_data_size Pass in the expected size of the receive data, and return the actual size of the received data.
* @param error Pointer to an error object that will be set if an error occurs.
* @return OB_EXPORT
*/
OB_EXPORT void ob_device_send_and_receive_data(ob_device *device, const uint8_t *send_data, uint32_t send_data_size, uint8_t *receive_data,
uint32_t *receive_data_size, ob_error **error);
@@ -388,7 +407,7 @@ OB_EXPORT const char *ob_device_info_get_firmware_version(const ob_device_info *
*
* @param[in] info Device Information
* @param[out] error Pointer to an error object that will be set if an error occurs.
* @return const char* The connection type,currently supports:"USB", "USB1.0", "USB1.1", "USB2.0", "USB2.1", "USB3.0", "USB3.1", "USB3.2", "Ethernet"
* @return const char* The connection type, currently supports: "USB", "USB1.0", "USB1.1", "USB2.0", "USB2.1", "USB3.0", "USB3.1", "USB3.2", "Ethernet"
*/
OB_EXPORT const char *ob_device_info_get_connection_type(const ob_device_info *info, ob_error **error);
@@ -399,7 +418,7 @@ OB_EXPORT const char *ob_device_info_get_connection_type(const ob_device_info *i
*
* @param info Device Information
* @param error Pointer to an error object that will be set if an error occurs.
* @return const char* The IP address,such as "192.168.1.10"
* @return const char* The IP address, such as "192.168.1.10"
*/
OB_EXPORT const char *ob_device_info_get_ip_address(const ob_device_info *info, ob_error **error);
@@ -533,7 +552,7 @@ OB_EXPORT const char *ob_device_list_get_device_serial_number(const ob_device_li
* @param[in] list Device list object
* @param[in] index Device index
* @param[out] error Pointer to an error object that will be set if an error occurs.
* @return const char* returns the device connection type,currently supports:"USB", "USB1.0", "USB1.1", "USB2.0", "USB2.1", "USB3.0", "USB3.1", "USB3.2",
* @return const char* returns the device connection type, currently supports: "USB", "USB1.0", "USB1.1", "USB2.0", "USB2.1", "USB3.0", "USB3.1", "USB3.2",
* "Ethernet"
*/
OB_EXPORT const char *ob_device_list_get_device_connection_type(const ob_device_list *list, uint32_t index, ob_error **error);
@@ -546,10 +565,22 @@ OB_EXPORT const char *ob_device_list_get_device_connection_type(const ob_device_
* @param list Device list object
* @param index Device index
* @param error Pointer to an error object that will be set if an error occurs.
* @return const char* returns the device ip address,such as "192.168.1.10"
* @return const char* returns the device ip address, such as "192.168.1.10"
*/
OB_EXPORT const char *ob_device_list_get_device_ip_address(const ob_device_list *list, uint32_t index, ob_error **error);
/**
* @brief Get device local mac address
*
* @attention Only valid for network devices, otherwise it will return "0:0:0:0:0:0".
*
* @param list Device list object
* @param index Device index
* @param error Pointer to an error object that will be set if an error occurs.
* @return const char* returns the device mac address
*/
OB_EXPORT const char *ob_device_list_get_device_local_mac(const ob_device_list *list, uint32_t index, ob_error **error);
/**
* @brief Create a device.
*
@@ -580,7 +611,7 @@ OB_EXPORT ob_device *ob_device_list_get_device_by_serial_number(const ob_device_
* @brief On Linux platform, for usb device, the uid of the device is composed of bus-port-dev, for example 1-1.2-1. But the SDK will remove the dev number and
* only keep the bus-port as the uid to create the device, for example 1-1.2, so that we can create a device connected to the specified USB port. Similarly,
* users can also directly pass in bus-port as uid to create device.
* @brief For GMSL device,the uid is GMSL port with “gmsl2-” prefix, for example gmsl2-1.
* @brief For GMSL device, the uid is GMSL port with "gmsl2-" prefix, for example gmsl2-1.
*
* @attention If the device has already been acquired and created elsewhere, repeated acquisitions will return an error.
*
@@ -68,7 +68,7 @@ OB_EXPORT ob_exception_type ob_error_get_exception_type(const ob_error *error);
/**
* @brief Delete the error object.
*
* @param[in] error The error object to delete.
* @param[in] error The error object to delete, you should set the pointer to NULL after calling this function.
*/
OB_EXPORT void ob_delete_error(ob_error *error);
@@ -62,7 +62,7 @@ OB_EXPORT ob_frame *ob_create_frame_from_stream_profile(const ob_stream_profile
* no longer needed.
*
* @param[in] frame_type Frame object type.
* @param[in] frame_format Frame object format.
* @param[in] format Frame object format.
* @param[in] width Frame object width.
* @param[in] height Frame object height.
* @param[in] stride_bytes Row span in bytes. If 0, the stride is calculated based on the width and format.
@@ -148,7 +148,7 @@ OB_EXPORT void ob_delete_frame(const ob_frame *frame, ob_error **error);
/**
* @brief Copy the information of the source frame object to the destination frame object.
* @brief Including the index,timestamp,system timestamp,global timestamp and metadata will be copied.
* @brief Including the index, timestamp, system timestamp, global timestamp and metadata will be copied.
*
* @param[in] src_frame Source frame object to copy the information from.
* @param[in] dst_frame Destination frame object to copy the information to.
@@ -224,7 +224,7 @@ OB_EXPORT void ob_frame_set_system_timestamp_us(ob_frame *frame, uint64_t system
/**
* @brief Get the global timestamp of the frame in microseconds.
* @brief The global timestamp is the time point when the frame was was captured by the device, and has been converted to the host clock domain. The
* @brief 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
*
* @attention The global timestamp is disabled by default. If global timestamp is not enabled, the function will return 0. To enable it, call @ref
@@ -603,6 +603,24 @@ OB_EXPORT ob_frame *ob_frameset_get_frame_by_index(const ob_frame *frameset, uin
*/
OB_EXPORT void ob_frameset_push_frame(ob_frame *frameset, const ob_frame *frame, ob_error **error);
/**
* @brief Get point cloud frame width
*
* @param[in] frame point cloud Frame object
* @param[out] error Pointer to an error object that will be set if an error occurs.
* @return uint32_t return the point cloud frame width
*/
OB_EXPORT uint32_t ob_point_cloud_frame_get_width(const ob_frame *frame, ob_error **error);
/**
* @brief Get point cloud frame height
*
* @param[in] frame point cloud Frame object
* @param[out] error Pointer to an error object that will be set if an error occurs.
* @return uint32_t return the point cloud frame height
*/
OB_EXPORT uint32_t ob_point_cloud_frame_get_height(const ob_frame *frame, ob_error **error);
// The following interfaces are deprecated and are retained here for compatibility purposes.
#define ob_frame_index ob_frame_get_index
#define ob_frame_format ob_frame_get_format
@@ -62,7 +62,7 @@ OB_EXPORT ob_multi_device_sync_config ob_device_get_multi_device_sync_config(con
*
* @attention The frequency of the user call this function multiplied by the number of frames per trigger should be less than the frame rate of the stream. The
* number of frames per trigger can be set by @ref framesPerTrigger.
* @attention For some models,receive and execute the capture command will have a certain delay and performance consumption, so the frequency of calling this
* @attention For some models, receive and execute the capture command will have a certain delay and performance consumption, so the frequency of calling this
* function should not be too high, please refer to the product manual for the specific supported frequency.
* @attention If the device is not in the @ref OB_MULTI_DEVICE_SYNC_MODE_HARDWARE_TRIGGERING mode, device will ignore the capture command.
*
@@ -10,19 +10,21 @@
#include "Export.h"
#include <stdbool.h>
#include <stdint.h>
#pragma pack(push, 1) // struct 1-byte align
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
#include <stdint.h>
typedef struct ob_context_t ob_context;
typedef struct ob_device_t ob_device;
typedef struct ob_device_info_t ob_device_info;
typedef struct ob_device_list_t ob_device_list;
typedef struct ob_record_device_t ob_record_device;
typedef struct ob_playback_device_t ob_playback_device;
typedef struct ob_camera_param_list_t ob_camera_param_list;
typedef struct ob_sensor_t ob_sensor;
typedef struct ob_sensor_list_t ob_sensor_list;
@@ -183,6 +185,7 @@ typedef enum {
OB_PIXEL_DEPTH = 0, // Depth pixel type, the value of the pixel is the distance from the camera to the object
OB_PIXEL_DISPARITY = 2, // Disparity for structured light camera
OB_PIXEL_RAW_PHASE = 3, // Raw phase for tof camera
OB_PIXEL_TOF_DEPTH = 4, // Depth for tof camera
} OBPixelType,
ob_pixel_type;
@@ -190,7 +193,7 @@ typedef enum {
* @brief Enumeration value describing the pixel format
*/
typedef enum {
OB_FORMAT_UNKNOWN = -1, /*< unknown format */
OB_FORMAT_UNKNOWN = -1, /**< unknown format */
OB_FORMAT_YUYV = 0, /**< YUYV format */
OB_FORMAT_YUY2 = 1, /**< YUY2 format (the actual format is the same as YUYV) */
OB_FORMAT_UYVY = 2, /**< UYVY format */
@@ -495,6 +498,15 @@ typedef enum {
} OBAlignMode,
ob_align_mode;
/**
* @brief Camera performance mode
*/
typedef enum {
ADAPTIVE_PERFORMANCE_MODE, /**< Camera adaptive mode */
HIGH_PERFORMANCE_MODE, /**< High Performance Mode */
} OBCameraPerformanceMode,
ob_camera_performance_mode;
/**
* @brief Rectangle
*/
@@ -527,6 +539,10 @@ typedef enum {
FORMAT_YUYV_TO_BGRA, /**< YUYV to BGRA */
FORMAT_YUYV_TO_Y16, /**< YUYV to Y16 */
FORMAT_YUYV_TO_Y8, /**< YUYV to Y8 */
FORMAT_RGBA_TO_RGB, /**< RGBA to RGB */
FORMAT_BGRA_TO_BGR, /**< BGRA to BGR */
FORMAT_Y16_TO_RGB, /**< Y16 to RGB */
FORMAT_Y8_TO_RGB, /**< Y8 to RGB */
} OBConvertFormat,
ob_convert_format;
@@ -714,14 +730,14 @@ typedef struct {
double zpps; // zpps=z0/fx
float baseline; // baseline length, for monocular camera,it means the distance of laser to the center of IR-CMOS
double fx; // focus
uint8_t bitSize; // disparity bit size(raw disp bit size,for example: MX6000 is 12, MX6600 is 14)
float unit; // reference units:unit=10 denote 1cm; unit=1 denote 1mm; unit=0.5 denote 0.5mm; and so on
uint8_t bitSize; // disparity bit size (raw disp bit size, for example: MX6000 is 12, MX6600 is 14)
float unit; // reference units: unit=10 denote 1cm; unit=1 denote 1mm; unit=0.5 denote 0.5mm; and so on
float minDisparity; // dual disparity coefficient
uint8_t packMode; // data pack mode
float dispOffset; // disparity offset,actual disp=chip disp + disp_offset
int32_t invalidDisp; // invalid disparity,usually is 0,dual IR add a auxiliary value.
int32_t dispIntPlace; // disp integer digits,default is 8,Gemini2 XL is 10
uint8_t isDualCamera; // 0 monocular camera,1 dual camera
float dispOffset; // disparity offset, actual disp=chip disp + disp_offset
int32_t invalidDisp; // invalid disparity, usually is 0, dual IR add a auxiliary value.
int32_t dispIntPlace; // disp integer digits, default is 8, Gemini2 XL is 10
uint8_t isDualCamera; // 0 monocular camera, 1 dual camera
} OBDisparityParam, ob_disparity_param;
/**
@@ -826,7 +842,7 @@ typedef enum {
/**
* @brief Secondary synchronize mode
* @brief Secondary device. Both process input trigger signal and output trigger signal to other devices.
* @brief Different sensors in a single devices receive trigger signals respectively:ext trigger -> RGB && ext trigger -> IR/Depth/TOF
* @brief Different sensors in a single devices receive trigger signals respectively: ext trigger -> RGB && ext trigger -> IR/Depth/TOF
*
* @attention With the current Gemini 2 device set to this mode, each Sensor receives the first external trigger signal
* after the stream is turned on and starts timing self-triggering at the set frame rate until the stream is turned off
@@ -860,7 +876,7 @@ typedef enum {
* @brief Software trigger synchronize mode as secondary device
* @brief The slave receives the external trigger signal (the external trigger signal comes from the soft trigger host) and outputs the trigger signal to
* the external relay.
* @brief Different sensors in a single machine receive trigger signals respectively:ext trigger -> RGB && ext trigger -> IR/Depth/TOF
* @brief Different sensors in a single machine receive trigger signals respectively: ext trigger -> RGB && ext trigger -> IR/Depth/TOF
*/
OB_SYNC_MODE_SECONDARY_SOFT_TRIGGER = 0x07,
@@ -1295,14 +1311,14 @@ typedef struct {
/**
* @brief The delay time of the depth image capture after receiving the capture command or trigger signal in microseconds.
*
* @attention This parameter is only valid for some models, please refer to the product manual for details.
* @attention This parameter is only valid for some models, please refer to the product manual for details.
*/
int depthDelayUs;
/**
* @brief The delay time of the color image capture after receiving the capture command or trigger signal in microseconds.
*
* @attention This parameter is only valid for some models, please refer to the product manual for details.
* @attention This parameter is only valid for some models, please refer to the product manual for details.
*/
int colorDelayUs;
@@ -1548,14 +1564,14 @@ typedef enum {
/**
* @brief Power line frequency
* @brief For anti-flickering, 0:Close, 1: 50Hz, 2: 60Hz, 3: Auto
* @brief For anti-flickering, 0: Close, 1: 50Hz, 2: 60Hz, 3: Auto
*/
OB_FRAME_METADATA_TYPE_POWER_LINE_FREQUENCY = 15,
/**
* @brief Low light compensation
*
* @attention The low light compensation is a feature inside the device,and can not manually control it.
* @attention The low light compensation is a feature inside the device, and can not manually control it.
*/
OB_FRAME_METADATA_TYPE_LOW_LIGHT_COMPENSATION = 16,
@@ -1678,9 +1694,26 @@ typedef enum {
*
*/
OB_UVC_BACKEND_TYPE_V4L2,
/**
* @brief Use MSMF backend to access the UVC device
*/
OB_UVC_BACKEND_TYPE_MSMF,
} ob_uvc_backend_type,
OBUvcBackendType;
/**
* @brief The playback status of the media
*/
typedef enum {
OB_PLAYBACK_UNKNOWN,
OB_PLAYBACK_PLAYING, /**< The media is playing */
OB_PLAYBACK_PAUSED, /**< The media is paused */
OB_PLAYBACK_STOPPED, /**< The media is stopped */
OB_PLAYBACK_COUNT,
} ob_playback_status,
OBPlaybackStatus;
// For compatibility
#define OB_FRAME_METADATA_TYPE_LASER_POWER_MODE OB_FRAME_METADATA_TYPE_LASER_POWER_LEVEL
#define OB_FRAME_METADATA_TYPE_EMITTER_MODE OB_FRAME_METADATA_TYPE_LASER_STATUS
@@ -1787,6 +1820,7 @@ typedef void(ob_frame_destroy_callback)(uint8_t *buffer, void *user_data);
*/
typedef void(ob_log_callback)(ob_log_severity severity, const char *message, void *user_data);
typedef void (*ob_playback_status_changed_callback)(ob_playback_status status, void *user_data);
/**
* @brief Check if the sensor_type is a video sensor
*
@@ -205,13 +205,13 @@ OB_EXPORT void ob_config_enable_stream_with_stream_profile(ob_config *config, co
*
* @attention The stream_type should be a video stream type, such as OB_STREAM_IR, OB_STREAM_COLOR, OB_STREAM_DEPTH, etc.
*
* @param config[in] The pipeline configuration object
* @param stream_type[in] The type of the stream to be enabled
* @param width[in] The width of the video stream
* @param height[in] The height of the video stream
* @param fps[in] The frame rate of the video stream
* @param format[in] The format of the video stream
* @param error[out] Pointer to an error object that will be set if an error occurs.
* @param[in] config The pipeline configuration object
* @param[in] stream_type The type of the stream to be enabled
* @param[in] width The width of the video stream
* @param[in] height The height of the video stream
* @param[in] fps The frame rate of the video stream
* @param[in] format The format of the video stream
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_config_enable_video_stream(ob_config *config, ob_stream_type stream_type, uint32_t width, uint32_t height, uint32_t fps, ob_format format,
ob_error **error);
@@ -219,20 +219,20 @@ OB_EXPORT void ob_config_enable_video_stream(ob_config *config, ob_stream_type s
/**
* @brief Enable accelerometer stream with specified parameters
*
* @param config[in] The pipeline configuration object
* @param full_scale_range[in] The full scale range of the accelerometer
* @param sample_rate[in] The sample rate of the accelerometer
* @param error[out] Pointer to an error object that will be set if an error occurs.
* @param[in] config The pipeline configuration object
* @param[in] full_scale_range The full scale range of the accelerometer
* @param[in] sample_rate The sample rate of the accelerometer
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_config_enable_accel_stream(ob_config *config, ob_accel_full_scale_range full_scale_range, ob_accel_sample_rate sample_rate, ob_error **error);
/**
* @brief Enable gyroscope stream with specified parameters
*
* @param config[in] The pipeline configuration object
* @param full_scale_range[in] The full scale range of the gyroscope
* @param sample_rate[in] The sample rate of the gyroscope
* @param error[out] Pointer to an error object that will be set if an error occurs.
* @param[in] config The pipeline configuration object
* @param[in] full_scale_range The full scale range of the gyroscope
* @param[in] sample_rate The sample rate of the gyroscope
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_config_enable_gyro_stream(ob_config *config, ob_gyro_full_scale_range full_scale_range, ob_gyro_sample_rate sample_rate, ob_error **error);
@@ -306,7 +306,7 @@ typedef enum {
OB_PROP_DEPTH_ROTATE_INT = 118,
/**
* @brief Get hardware laser power actual level which real state of laser element. OB_PROP_LASER_POWER_LEVEL_CONTROL_INT99)will effect this command
* @brief Get hardware laser power actual level which real state of laser element. OB_PROP_LASER_POWER_LEVEL_CONTROL_INT99 will effect this command
* which it setting and changed the hardware laser energy level.
*/
OB_PROP_LASER_POWER_ACTUAL_LEVEL_INT = 119,
@@ -501,6 +501,20 @@ typedef enum {
* @brief hardware noise remove filter threshold ,range [0.0 - 1.0]
*/
OB_PROP_HW_NOISE_REMOVE_FILTER_THRESHOLD_FLOAT = 212,
/**
* @brief soft trigger auto capture enable, use in OB_MULTI_DEVICE_SYNC_MODE_SOFTWARE_TRIGGERING mode
*/
OB_DEVICE_AUTO_CAPTURE_ENABLE_BOOL = 216,
/**
* @brief soft trigger auto capture interval time, use in OB_MULTI_DEVICE_SYNC_MODE_SOFTWARE_TRIGGERING mode
*/
OB_DEVICE_AUTO_CAPTURE_INTERVAL_TIME_INT = 217,
/**
* @brief PTP time synchronization enable
*/
OB_DEVICE_PTP_CLOCK_SYNC_ENABLE_BOOL = 223,
/**
* @brief Baseline calibration parameters
*/
@@ -553,7 +567,7 @@ typedef enum {
/**
* @brief Device network static ip config record
* @brief Using for get last static ip config,witch is record in device flash when user set static ip config
* @brief Using for get last static ip config, witch is record in device flash when user set static ip config
*
* @attention read only
*/
@@ -800,10 +814,20 @@ typedef enum {
*/
OB_PROP_NETWORK_BANDWIDTH_TYPE_INT = 3027,
/**
* @brief Switch device performance mode, currently available in Adaptive Mode and High Performance Mode, such as G335LE.
*/
OB_PROP_DEVICE_PERFORMANCE_MODE_INT = 3028,
/**
* @brief Calibration JSON file read from device (Femto Mega, read only)
*/
OB_RAW_DATA_CAMERA_CALIB_JSON_FILE = 4029,
/**
* @brief Confidence degree
*/
OB_PROP_DEBUG_ESGM_CONFIDENCE_FLOAT = 5013,
} OBPropertyID,
ob_property_id;
@@ -0,0 +1,135 @@
// Copyright (c) Orbbec Inc. All Rights Reserved.
// Licensed under the MIT License.
/**
* @file RecordPlayback.hpp
* @brief Record and playback device-related types, including interfaces to create recording and playback devices,
record and playback streaming data, etc.
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include "Device.h"
/**
* @brief Create a recording device for the specified device with a specified file path and compression enabled.
*
* @param[in] device The device to record.
* @param[in] file_path The file path to record to.
* @param[in] compression_enabled Whether to enable compression for the recording.
* @param[out] error Pointer to an error object that will be set if an error occurs.
* @return A pointer to the newly created recording device, or NULL if an error occurred.
*/
OB_EXPORT ob_record_device *ob_create_record_device(ob_device *device, const char *file_path, bool compression_enabled, ob_error **error);
/**
* @brief Delete a recording device.
*
* @param[in] recorder The recording device to delete.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_delete_record_device(ob_record_device *recorder, ob_error **error);
/**
* @brief Pause recording on the specified recording device.
*
* @param[in] recorder The recording device to pause.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_record_device_pause(ob_record_device *recorder, ob_error **error);
/**
* @brief Resume recording on the specified recording device.
*
* @param[in] recorder The recording device to resume.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_record_device_resume(ob_record_device *recorder, ob_error **error);
/**
* @brief Create a playback device for the specified file path.
*
* @param[in] file_path The file path to playback from.
* @param[out] error Pointer to an error object that will be set if an error occurs.
* @return A pointer to the newly created playback device, or NULL if an error occurred.
*/
OB_EXPORT ob_device *ob_create_playback_device(const char *file_path, ob_error **error);
/**
* @brief Pause playback on the specified playback device.
*
* @param[in] player The playback device to pause.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_playback_device_pause(ob_device *player, ob_error **error);
/**
* @brief Resume playback on the specified playback device.
*
* @param[in] player The playback device to resume.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_playback_device_resume(ob_device *player, ob_error **error);
/**
* @brief Set the playback to a specified time point of the played data.
*
* @param[in] player The playback device to set the position for.
* @param[in] timestamp The position to set the playback to, in milliseconds.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_playback_device_seek(ob_device *player, const uint64_t timestamp, ob_error **error);
/**
* @brief Set the playback to a specified time point of the played data.
*
* @param[in] player The playback device to set the position for.
* @param[in] rate The playback rate to set.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_playback_device_set_playback_rate(ob_device *player, const float rate, ob_error **error);
/**
* @brief Get the current playback status of the played data.
*
* @param[in] player The playback device to get the status for.
* @param[out] error Pointer to an error object that will be set if an error occurs.
* @return The current playback status of the played data.
*/
OB_EXPORT ob_playback_status ob_playback_device_get_current_playback_status(ob_device *player, ob_error **error);
/**
* @brief Set a callback function to receive playback status updates.
*
* @param[in] player The playback device to set the callback for.
* @param[in] callback The callback function to receive playback status updates.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_playback_device_set_playback_status_changed_callback(ob_device *player, ob_playback_status_changed_callback callback, void *user_data,
ob_error **error);
/**
* @brief Get the current playback position of the played data.
*
* @param[in] player The playback device to get the position for.
* @param[out] error Pointer to an error object that will be set if an error occurs.
* @return The current playback position of the played data, in milliseconds.
*/
OB_EXPORT uint64_t ob_playback_device_get_position(ob_device *player, ob_error **error);
/**
* @brief Get the duration of the played data.
*
* @param[in] player The playback device to get the duration for.
* @param[out] error Pointer to an error object that will be set if an error occurs.
* @return The duration of the played data, in milliseconds.
*/
OB_EXPORT uint64_t ob_playback_device_get_duration(ob_device *player, ob_error **error);
#ifdef __cplusplus
} // extern "C"
#endif
@@ -134,13 +134,23 @@ OB_EXPORT ob_extrinsic ob_stream_profile_get_extrinsic_to(const ob_stream_profil
/**
* @brief Set the extrinsic for source stream to target stream
*
* @param[in] profile Stream profile object
* @param[in] source Stream profile object
* @param[in] target Target stream type
* @param[in] extrinsic The extrinsic
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_stream_profile_set_extrinsic_to(ob_stream_profile *source, const ob_stream_profile *target, ob_extrinsic extrinsic, ob_error **error);
/**
* @brief Set the extrinsic for source stream to target stream type
*
* @param[in] source Source stream profile
* @param[in] type Target stream type
* @param[out] error Pointer to an error object that will be set if an error occurs.
* @return ob_extrinsic The extrinsic
*/
OB_EXPORT void ob_stream_profile_set_extrinsic_to_type(ob_stream_profile *source, const ob_stream_type type, ob_extrinsic extrinsic, ob_error **error);
/**
* @brief Get the frame rate of the video stream
*
@@ -235,7 +245,7 @@ OB_EXPORT ob_disparity_param ob_disparity_based_stream_profile_get_disparity_par
* @brief Set the disparity process param of the disparity stream.
*
* @param[in] profile Stream profile object. If the profile is not for the disparity stream, an error will be returned.
* @param[in] intrinsic The disparity process param of the disparity stream.
* @param[in] param The disparity process param of the disparity stream.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_disparity_based_stream_profile_set_disparity_param(ob_stream_profile *profile, ob_disparity_param param, ob_error **error);
+38 -28
View File
@@ -19,25 +19,22 @@ extern "C" {
*
* @return bool Transform result
*/
OB_EXPORT bool ob_transformation_3d_to_3d(const OBPoint3f source_point3f, OBExtrinsic extrinsic, OBPoint3f *target_point3f, ob_error **error) ;
OB_EXPORT bool ob_transformation_3d_to_3d(const OBPoint3f source_point3f, OBExtrinsic extrinsic, OBPoint3f *target_point3f, ob_error **error);
/**
* @brief Transform a 2d pixel coordinate with an associated depth value of the source camera into a 3d point of the target coordinate system.
*
* @param[in] source_intrinsic Source intrinsic parameters
* @param[in] source_distortion Source distortion parameters
* @param[in] source_point2f Source 2d point value
* @param[in] source_depth_pixel_value The depth of sourcePoint2f in millimeters
* @param[in] source_intrinsic Source intrinsic parameters
* @param[in] extrinsic Transformation matrix from source to target
* @param[out] target_point3f Target 3d point value
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return bool Transform result
*/
OB_EXPORT bool ob_transformation_2d_to_3d(const OBPoint2f source_point2f, const float source_depth_pixel_value, const OBCameraIntrinsic source_intrinsic,
OBExtrinsic extrinsic, OBPoint3f *target_point3f, ob_error **error);
OB_EXPORT bool ob_transformation_2d_to_3d(const OBPoint2f source_point2f, const float source_depth_pixel_value, const OBCameraIntrinsic source_intrinsic,
OBExtrinsic extrinsic, OBPoint3f *target_point3f, ob_error **error);
/**
* @brief Transform a 3d point of a source coordinate system into a 2d pixel coordinate of the target camera.
@@ -69,46 +66,59 @@ OB_EXPORT bool ob_transformation_3d_to_2d(const OBPoint3f source_point3f, const
*
* @return bool Transform result
*/
OB_EXPORT bool ob_transformation_2d_to_2d(const OBPoint2f source_point2f, const float source_depth_pixel_value, const OBCameraIntrinsic source_intrinsic,
const OBCameraDistortion source_distortion, const OBCameraIntrinsic target_intrinsic, const OBCameraDistortion target_distortion,
OBExtrinsic extrinsic, OBPoint2f *target_point2f, ob_error **error);
OB_EXPORT bool ob_transformation_2d_to_2d(const OBPoint2f source_point2f, const float source_depth_pixel_value, const OBCameraIntrinsic source_intrinsic,
const OBCameraDistortion source_distortion, const OBCameraIntrinsic target_intrinsic,
const OBCameraDistortion target_distortion, OBExtrinsic extrinsic, OBPoint2f *target_point2f, ob_error **error);
// \deprecated This function is deprecated and will be removed in a future version.
// \deprecated This function is deprecated and will be removed in a future version.
OB_EXPORT ob_frame *transformation_depth_frame_to_color_camera(ob_device *device, ob_frame *depth_frame, uint32_t target_color_camera_width,
uint32_t target_color_camera_height, ob_error **error);
uint32_t target_color_camera_height, ob_error **error);
// \deprecated This function is deprecated and will be removed in a future version.
// \deprecated This function is deprecated and will be removed in a future version.
OB_EXPORT bool transformation_init_xy_tables(const ob_calibration_param calibration_param, const ob_sensor_type sensor_type, float *data, uint32_t *data_size,
ob_xy_tables *xy_tables, ob_error **error);
ob_xy_tables *xy_tables, ob_error **error);
// \deprecated This function is deprecated and will be removed in a future version.
// \deprecated This function is deprecated and will be removed in a future version.
OB_EXPORT void transformation_depth_to_pointcloud(ob_xy_tables *xy_tables, const void *depth_image_data, void *pointcloud_data, ob_error **error);
// \deprecated This function is deprecated and will be removed in a future version.
OB_EXPORT void transformation_depth_to_rgbd_pointcloud(ob_xy_tables *xy_tables, const void *depth_image_data, const void *color_image_data, void *pointcloud_data,
ob_error **error);
// \deprecated This function is deprecated and will be removed in a future version.
OB_EXPORT void transformation_depth_to_rgbd_pointcloud(ob_xy_tables *xy_tables, const void *depth_image_data, const void *color_image_data,
void *pointcloud_data, ob_error **error);
// \deprecated This function is deprecated and will be removed in a future version.
// \deprecated This function is deprecated and will be removed in a future version.
// Use the ob_transformation_3d_to_3d instead.
OB_EXPORT bool ob_calibration_3d_to_3d(const ob_calibration_param calibration_param, const ob_point3f source_point3f, const ob_sensor_type source_sensor_type,
const ob_sensor_type target_sensor_type, ob_point3f *target_point3f, ob_error **error);
const ob_sensor_type target_sensor_type, ob_point3f *target_point3f, ob_error **error);
// \deprecated This function is deprecated and will be removed in a future version.
// \deprecated This function is deprecated and will be removed in a future version.
// Use the ob_transformation_2d_to_3d instead.
OB_EXPORT bool ob_calibration_2d_to_3d(const ob_calibration_param calibration_param, const ob_point2f source_point2f, const float source_depth_pixel_value,
const ob_sensor_type source_sensor_type, const ob_sensor_type target_sensor_type, ob_point3f *target_point3f, ob_error **error);
const ob_sensor_type source_sensor_type, const ob_sensor_type target_sensor_type, ob_point3f *target_point3f,
ob_error **error);
// \deprecated This function is deprecated and will be removed in a future version.
// \deprecated This function is deprecated and will be removed in a future version.
// Use the ob_transformation_3d_to_2d instead.
OB_EXPORT bool ob_calibration_3d_to_2d(const ob_calibration_param calibration_param, const ob_point3f source_point3f, const ob_sensor_type source_sensor_type,
const ob_sensor_type target_sensor_type, ob_point2f *target_point2f, ob_error **error);
const ob_sensor_type target_sensor_type, ob_point2f *target_point2f, ob_error **error);
// \deprecated This function is deprecated and will be removed in a future version.
// \deprecated This function is deprecated and will be removed in a future version.
// Use the ob_transformation_2d_to_2d instead.
OB_EXPORT bool ob_calibration_2d_to_2d(const ob_calibration_param calibration_param, const ob_point2f source_point2f, const float source_depth_pixel_value,
const ob_sensor_type source_sensor_type, const ob_sensor_type target_sensor_type, ob_point2f *target_point2f, ob_error **error);
const ob_sensor_type source_sensor_type, const ob_sensor_type target_sensor_type, ob_point2f *target_point2f,
ob_error **error);
/**
* @brief save point cloud to ply file.
*
* @param[in] file_name Point cloud save path
* @param[in] frame Point cloud frame
* @param[in] save_binary Binary or textual,true: binary, false: textual
* @param[in] use_mesh Save mesh or not, true: save as mesh, false: not save as mesh
* @param[in] mesh_threshold Distance threshold for creating faces in point cloud,default value :50
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return bool save point cloud result
*/
OB_EXPORT bool ob_save_pointcloud_to_ply(const char *file_name, ob_frame *frame, bool save_binary, bool use_mesh, float mesh_threshold, ob_error **error);
#ifdef __cplusplus
}
#endif