update OrbbecSDK version

This commit is contained in:
ob-yalian
2026-01-13 17:23:08 +08:00
parent a7ccc5c4ef
commit c2dd22cb50
27 changed files with 363 additions and 61 deletions
@@ -162,6 +162,15 @@ OB_EXPORT void ob_unregister_device_changed_callback(ob_context *context, ob_cal
*/ */
OB_EXPORT void ob_enable_device_clock_sync(ob_context *context, uint64_t repeat_interval_msec, ob_error **error); OB_EXPORT void ob_enable_device_clock_sync(ob_context *context, uint64_t repeat_interval_msec, ob_error **error);
/**
* @brief Trigger data acquisition on all devices configured for software synchronization, ensuring they capture data based on the same system time.
*
* @param[in] context Pointer to the context object
* @param[in] softSyncTime The time to synchronize, in microseconds. If the value is 0, synchronization is performed immediately.
* @param[out] error Pointer to an error object that will be populated if an error occurs during execution
*/
OB_EXPORT void ob_multie_device_soft_sync_capture(ob_context *context, uint64_t softSyncTime, ob_error **error);
/** /**
* @brief Free idle memory from the internal frame memory pool * @brief Free idle memory from the internal frame memory pool
* *
@@ -128,18 +128,20 @@ typedef struct ob_error {
* @brief Enumeration value describing the sensor type * @brief Enumeration value describing the sensor type
*/ */
typedef enum { typedef enum {
OB_SENSOR_UNKNOWN = 0, /**< Unknown type sensor */ OB_SENSOR_UNKNOWN = 0, /**< Unknown type sensor */
OB_SENSOR_IR = 1, /**< IR */ OB_SENSOR_IR = 1, /**< IR */
OB_SENSOR_COLOR = 2, /**< Color */ OB_SENSOR_COLOR = 2, /**< Color */
OB_SENSOR_DEPTH = 3, /**< Depth */ OB_SENSOR_DEPTH = 3, /**< Depth */
OB_SENSOR_ACCEL = 4, /**< Accel */ OB_SENSOR_ACCEL = 4, /**< Accel */
OB_SENSOR_GYRO = 5, /**< Gyro */ OB_SENSOR_GYRO = 5, /**< Gyro */
OB_SENSOR_IR_LEFT = 6, /**< left IR for stereo camera*/ OB_SENSOR_IR_LEFT = 6, /**< left IR for stereo camera*/
OB_SENSOR_IR_RIGHT = 7, /**< Right IR for stereo camera*/ OB_SENSOR_IR_RIGHT = 7, /**< Right IR for stereo camera*/
OB_SENSOR_RAW_PHASE = 8, /**< Raw Phase */ OB_SENSOR_RAW_PHASE = 8, /**< Raw Phase */
OB_SENSOR_CONFIDENCE = 9, /**< Confidence */ OB_SENSOR_CONFIDENCE = 9, /**< Confidence */
OB_SENSOR_LIDAR = 10, /**< LiDAR */ OB_SENSOR_LIDAR = 10, /**< LiDAR */
OB_SENSOR_TYPE_COUNT, /**The total number of sensor types, is not a valid sensor type */ OB_SENSOR_COLOR_LEFT = 11, /**< Left Color */
OB_SENSOR_COLOR_RIGHT = 12, /**< Right Color */
OB_SENSOR_TYPE_COUNT, /**The total number of sensor types, is not a valid sensor type */
} OBSensorType, } OBSensorType,
ob_sensor_type; ob_sensor_type;
@@ -147,19 +149,21 @@ typedef enum {
* @brief Enumeration value describing the type of data stream * @brief Enumeration value describing the type of data stream
*/ */
typedef enum { typedef enum {
OB_STREAM_UNKNOWN = -1, /**< Unknown type stream */ OB_STREAM_UNKNOWN = -1, /**< Unknown type stream */
OB_STREAM_VIDEO = 0, /**< Video stream (infrared, color, depth streams are all video streams) */ OB_STREAM_VIDEO = 0, /**< Video stream (infrared, color, depth streams are all video streams) */
OB_STREAM_IR = 1, /**< IR stream */ OB_STREAM_IR = 1, /**< IR stream */
OB_STREAM_COLOR = 2, /**< color stream */ OB_STREAM_COLOR = 2, /**< color stream */
OB_STREAM_DEPTH = 3, /**< depth stream */ OB_STREAM_DEPTH = 3, /**< depth stream */
OB_STREAM_ACCEL = 4, /**< Accelerometer data stream */ OB_STREAM_ACCEL = 4, /**< Accelerometer data stream */
OB_STREAM_GYRO = 5, /**< Gyroscope data stream */ OB_STREAM_GYRO = 5, /**< Gyroscope data stream */
OB_STREAM_IR_LEFT = 6, /**< Left IR stream for stereo camera */ OB_STREAM_IR_LEFT = 6, /**< Left IR stream for stereo camera */
OB_STREAM_IR_RIGHT = 7, /**< Right IR stream for stereo camera */ OB_STREAM_IR_RIGHT = 7, /**< Right IR stream for stereo camera */
OB_STREAM_RAW_PHASE = 8, /**< RawPhase Stream */ OB_STREAM_RAW_PHASE = 8, /**< RawPhase Stream */
OB_STREAM_CONFIDENCE = 9, /**< Confidence Stream*/ OB_STREAM_CONFIDENCE = 9, /**< Confidence Stream*/
OB_STREAM_LIDAR = 10, /**< LiDAR Stream for LiDAR device*/ OB_STREAM_LIDAR = 10, /**< LiDAR Stream for LiDAR device*/
OB_STREAM_TYPE_COUNT, /**< The total number of stream type,is not a valid stream type */ OB_STREAM_COLOR_LEFT = 11, /**< Left Color stream */
OB_STREAM_COLOR_RIGHT = 12, /**< Right Color stream */
OB_STREAM_TYPE_COUNT, /**< The total number of stream type,is not a valid stream type */
} OBStreamType, } OBStreamType,
ob_stream_type; ob_stream_type;
@@ -167,21 +171,23 @@ typedef enum {
* @brief Enumeration value describing the type of frame * @brief Enumeration value describing the type of frame
*/ */
typedef enum { typedef enum {
OB_FRAME_UNKNOWN = -1, /**< Unknown frame type */ OB_FRAME_UNKNOWN = -1, /**< Unknown frame type */
OB_FRAME_VIDEO = 0, /**< Video frame */ OB_FRAME_VIDEO = 0, /**< Video frame */
OB_FRAME_IR = 1, /**< IR frame */ OB_FRAME_IR = 1, /**< IR frame */
OB_FRAME_COLOR = 2, /**< Color frame */ OB_FRAME_COLOR = 2, /**< Color frame */
OB_FRAME_DEPTH = 3, /**< Depth frame */ OB_FRAME_DEPTH = 3, /**< Depth frame */
OB_FRAME_ACCEL = 4, /**< Accelerometer data frame */ OB_FRAME_ACCEL = 4, /**< Accelerometer data frame */
OB_FRAME_SET = 5, /**< Frame collection (internally contains a variety of data frames) */ OB_FRAME_SET = 5, /**< Frame collection (internally contains a variety of data frames) */
OB_FRAME_POINTS = 6, /**< Point cloud frame */ OB_FRAME_POINTS = 6, /**< Point cloud frame */
OB_FRAME_GYRO = 7, /**< Gyroscope data frame */ OB_FRAME_GYRO = 7, /**< Gyroscope data frame */
OB_FRAME_IR_LEFT = 8, /**< Left IR frame for stereo camera */ OB_FRAME_IR_LEFT = 8, /**< Left IR frame for stereo camera */
OB_FRAME_IR_RIGHT = 9, /**< Right IR frame for stereo camera */ OB_FRAME_IR_RIGHT = 9, /**< Right IR frame for stereo camera */
OB_FRAME_RAW_PHASE = 10, /**< Raw Phase frame*/ OB_FRAME_RAW_PHASE = 10, /**< Raw Phase frame*/
OB_FRAME_CONFIDENCE = 11, /**< Confidence frame*/ OB_FRAME_CONFIDENCE = 11, /**< Confidence frame*/
OB_FRAME_LIDAR_POINTS = 12, /**< LiDAR point3d cloud frame*/ OB_FRAME_LIDAR_POINTS = 12, /**< LiDAR point3d cloud frame*/
OB_FRAME_TYPE_COUNT, /**< The total number of frame types, is not a valid frame type */ OB_FRAME_COLOR_LEFT = 13, /**< Left Color frame */
OB_FRAME_COLOR_RIGHT = 14, /**< Right Color frame */
OB_FRAME_TYPE_COUNT, /**< The total number of frame types, is not a valid frame type */
} OBFrameType, } OBFrameType,
ob_frame_type; ob_frame_type;
@@ -1376,6 +1382,10 @@ typedef enum {
*/ */
OB_MULTI_DEVICE_SYNC_MODE_IR_IMU_SYNC = 1 << 7, OB_MULTI_DEVICE_SYNC_MODE_IR_IMU_SYNC = 1 << 7,
/**
* @brief The device captures data in software synchronization mode, starting acquisition based on the system time.
*/
OB_MULTI_DEVICE_SYNC_MODE_SOFTWARE_SYNCED = 1 << 8,
} ob_multi_device_sync_mode, } ob_multi_device_sync_mode,
OBMultiDeviceSyncMode; OBMultiDeviceSyncMode;
@@ -1551,6 +1561,15 @@ typedef struct {
uint8_t reserved; uint8_t reserved;
} OBDispOffsetConfig, ob_disp_offset_config; } OBDispOffsetConfig, ob_disp_offset_config;
/**
* @details Defines the original resolution and scaling factor for down-sampling.
*/
typedef struct {
uint32_t originWidth;
uint32_t originHeight;
uint32_t scaleFactor;
} OBDownSampleConfig, ob_down_sample_config;
/** /**
* @brief Frame metadata types * @brief Frame metadata types
* @brief The frame metadata is a set of meta info generated by the device for current individual frame. * @brief The frame metadata is a set of meta info generated by the device for current individual frame.
@@ -1939,9 +1958,9 @@ typedef uint64_t OBCallbackId, ob_callback_id;
* @param[in] sensor_type Sensor type to check * @param[in] sensor_type Sensor type to check
* @return True if sensor_type is a video sensor, false otherwise * @return True if sensor_type is a video sensor, false otherwise
*/ */
#define ob_is_video_sensor_type(sensor_type) \ #define ob_is_video_sensor_type(sensor_type) \
(sensor_type == OB_SENSOR_COLOR || sensor_type == OB_SENSOR_DEPTH || sensor_type == OB_SENSOR_IR || sensor_type == OB_SENSOR_IR_LEFT \ (sensor_type == OB_SENSOR_COLOR || sensor_type == OB_SENSOR_COLOR_LEFT || sensor_type == OB_SENSOR_COLOR_RIGHT || sensor_type == OB_SENSOR_DEPTH \
|| sensor_type == OB_SENSOR_IR_RIGHT || sensor_type == OB_SENSOR_CONFIDENCE) || sensor_type == OB_SENSOR_IR || sensor_type == OB_SENSOR_IR_LEFT || sensor_type == OB_SENSOR_IR_RIGHT || sensor_type == OB_SENSOR_CONFIDENCE)
/** /**
* @brief check if the stream_type is a video stream * @brief check if the stream_type is a video stream
@@ -1949,9 +1968,10 @@ typedef uint64_t OBCallbackId, ob_callback_id;
* @param[in] stream_type Stream type to check * @param[in] stream_type Stream type to check
* @return True if stream_type is a video stream, false otherwise * @return True if stream_type is a video stream, false otherwise
*/ */
#define ob_is_video_stream_type(stream_type) \ #define ob_is_video_stream_type(stream_type) \
(stream_type == OB_STREAM_COLOR || stream_type == OB_STREAM_DEPTH || stream_type == OB_STREAM_IR || stream_type == OB_STREAM_IR_LEFT \ (stream_type == OB_STREAM_COLOR || stream_type == OB_STREAM_COLOR_LEFT || stream_type == OB_STREAM_COLOR_RIGHT || stream_type == OB_STREAM_DEPTH \
|| stream_type == OB_STREAM_IR_RIGHT || stream_type == OB_STREAM_VIDEO || stream_type == OB_STREAM_CONFIDENCE) || stream_type == OB_STREAM_IR || stream_type == OB_STREAM_IR_LEFT || stream_type == OB_STREAM_IR_RIGHT || stream_type == OB_STREAM_VIDEO \
|| stream_type == OB_STREAM_CONFIDENCE)
/** /**
* @brief Check if sensor_type is an IR sensor * @brief Check if sensor_type is an IR sensor
@@ -1962,6 +1982,15 @@ typedef uint64_t OBCallbackId, ob_callback_id;
#define is_ir_sensor(sensor_type) (sensor_type == OB_SENSOR_IR || sensor_type == OB_SENSOR_IR_LEFT || sensor_type == OB_SENSOR_IR_RIGHT) #define is_ir_sensor(sensor_type) (sensor_type == OB_SENSOR_IR || sensor_type == OB_SENSOR_IR_LEFT || sensor_type == OB_SENSOR_IR_RIGHT)
#define isIRSensor is_ir_sensor #define isIRSensor is_ir_sensor
/**
* @brief Check if sensor_type is an Color sensor
*
* @param sensor_type Sensor type to check
* @return True if sensor_type is an Color sensor, false otherwise
*/
#define is_color_sensor(sensor_type) (sensor_type == OB_SENSOR_COLOR || sensor_type == OB_SENSOR_COLOR_LEFT || sensor_type == OB_SENSOR_COLOR_RIGHT)
#define isColorSensor is_color_sensor
/** /**
* @brief Check if stream_type is an IR stream * @brief Check if stream_type is an IR stream
* *
@@ -1971,6 +2000,15 @@ typedef uint64_t OBCallbackId, ob_callback_id;
#define is_ir_stream(stream_type) (stream_type == OB_STREAM_IR || stream_type == OB_STREAM_IR_LEFT || stream_type == OB_STREAM_IR_RIGHT) #define is_ir_stream(stream_type) (stream_type == OB_STREAM_IR || stream_type == OB_STREAM_IR_LEFT || stream_type == OB_STREAM_IR_RIGHT)
#define isIRStream is_ir_stream #define isIRStream is_ir_stream
/**
* @brief Check if stream_type is an Color stream
*
* @param stream_type Stream type to check
* @return True if stream_type is an Color stream, false otherwise
*/
#define is_color_stream(stream_type) (stream_type == OB_STREAM_COLOR || stream_type == OB_STREAM_COLOR_LEFT || stream_type == OB_STREAM_COLOR_RIGHT)
#define isColorStream is_color_stream
/** /**
* @brief Check if frame_type is an IR frame * @brief Check if frame_type is an IR frame
* *
@@ -1980,6 +2018,15 @@ typedef uint64_t OBCallbackId, ob_callback_id;
#define is_ir_frame(frame_type) (frame_type == OB_FRAME_IR || frame_type == OB_FRAME_IR_LEFT || frame_type == OB_FRAME_IR_RIGHT) #define is_ir_frame(frame_type) (frame_type == OB_FRAME_IR || frame_type == OB_FRAME_IR_LEFT || frame_type == OB_FRAME_IR_RIGHT)
#define isIRFrame is_ir_frame #define isIRFrame is_ir_frame
/**
* @brief Check if frame_type is an Color frame
*
* @param frame_type Frame type to check
* @return True if frame_type is an Color frame, false otherwise
*/
#define is_color_frame(frame_type) (frame_type == OB_FRAME_COLOR || frame_type == OB_FRAME_COLOR_LEFT || frame_type == OB_FRAME_COLOR_RIGHT)
#define isColorFrame is_color_frame
/** /**
* @brief The default Decrypt Key * @brief The default Decrypt Key
*/ */
@@ -224,6 +224,21 @@ OB_EXPORT void ob_config_enable_stream_with_stream_profile(ob_config *config, co
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_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); ob_error **error);
/**
* @brief Enable a video stream using a down-sample configuration.
*
* @attention The stream_type should be a video stream type, such as OB_STREAM_IR, OB_STREAM_DEPTH, etc.
*
* @param[in] config The pipeline configuration object
* @param[in] stream_type The type of the stream to be enabled
* @param[in] down_sample_config The down-sample configuration for the 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_by_down_sample_config(ob_config *config, ob_stream_type stream_type, ob_down_sample_config down_sample_config,
uint32_t fps, ob_format format, ob_error **error);
/** /**
* @brief Enable accelerometer stream with specified parameters * @brief Enable accelerometer stream with specified parameters
* *
@@ -463,7 +463,7 @@ typedef enum {
*/ */
OB_PROP_DISP_SEARCH_OFFSET_INT = 196, OB_PROP_DISP_SEARCH_OFFSET_INT = 196,
/** /**
* @brief cpu temperature correction . true: calibrate temperature * @brief cpu temperature correction . true: calibrate temperature
*/ */
OB_PROP_CPU_TEMPERATURE_CALIBRATION_BOOL = 199, OB_PROP_CPU_TEMPERATURE_CALIBRATION_BOOL = 199,
@@ -556,11 +556,53 @@ typedef enum {
*/ */
OB_PROP_INTRA_CAMERA_SYNC_REFERENCE_INT = 236, OB_PROP_INTRA_CAMERA_SYNC_REFERENCE_INT = 236,
/**
* @brief Right Color sensor rotation, angle{0, 90, 180, 270}
*/
OB_PROP_COLOR_RIGHT_ROTATE_INT = 242,
/**
* @brief Right Color mirror
*/
OB_PROP_COLOR_RIGHT_MIRROR_BOOL = 243,
/**
* @brief Right Color flip
*/
OB_PROP_COLOR_RIGHT_FLIP_BOOL = 244,
/**
* @brief Color AE mode
* - 0: Depth based
* - 1: Color based
*/
OB_PROP_COLOR_AE_MODE_INT = 247,
/**
* @brief COLOR FAST AE
*/
OB_PROP_COLOR_FAST_AE_BOOL = 248,
/** /**
* @brief Color camera ROI brightness adjustment * @brief Color camera ROI brightness adjustment
*/ */
OB_PROP_COLOR_ROI_BRIGHTNESS_INT = 249, OB_PROP_COLOR_ROI_BRIGHTNESS_INT = 249,
/**
* @brief Left Color sensor rotation, angle{0, 90, 180, 270}
*/
OB_PROP_COLOR_LEFT_ROTATE_INT = 251,
/**
* @brief Left Color mirror
*/
OB_PROP_COLOR_LEFT_MIRROR_BOOL = 252,
/**
* @brief Left Color flip
*/
OB_PROP_COLOR_LEFT_FLIP_BOOL = 253,
/** /**
* @brief Baseline calibration parameters * @brief Baseline calibration parameters
*/ */
@@ -655,6 +697,11 @@ typedef enum {
*/ */
OB_STRUCT_PRESET_RESOLUTION_CONFIG = 1069, OB_STRUCT_PRESET_RESOLUTION_CONFIG = 1069,
/**
* @brief Color sensor synchronized exposure parameter structure
*/
OB_STRUCT_COLOR_SYNCED_EXPOSURE_PARAM = 1077,
/** /**
* @brief Color camera auto exposure * @brief Color camera auto exposure
*/ */
@@ -979,7 +1026,7 @@ typedef enum {
/** /**
* @brief LiDAR: get/set repetitive scan mode * @brief LiDAR: get/set repetitive scan mode
*/ */
OB_PROP_LIDAR_REPETITIVE_SCAN_MODE_INT = 8017, OB_PROP_LIDAR_REPETITIVE_SCAN_MODE_INT = 8017
} OBPropertyID, } OBPropertyID,
ob_property_id; ob_property_id;
@@ -247,6 +247,16 @@ OB_EXPORT void ob_video_stream_profile_set_intrinsic(ob_stream_profile *profile,
*/ */
OB_EXPORT ob_camera_distortion ob_video_stream_profile_get_distortion(const ob_stream_profile *profile, ob_error **error); OB_EXPORT ob_camera_distortion ob_video_stream_profile_get_distortion(const ob_stream_profile *profile, ob_error **error);
/**
* @brief Get the down-sampling configuration of the video stream profile.
*
* @param[in] profile Stream profile object.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_down_sample_config The down-sampling configuration of the stream.
*/
OB_EXPORT ob_down_sample_config ob_video_stream_profile_get_down_sample_config(const ob_stream_profile *profile, ob_error **error);
/** /**
* @brief Set the distortion of the video stream profile * @brief Set the distortion of the video stream profile
* *
@@ -403,6 +413,24 @@ OB_EXPORT ob_stream_profile *ob_stream_profile_list_get_profile(const ob_stream_
OB_EXPORT ob_stream_profile *ob_stream_profile_list_get_video_stream_profile(const ob_stream_profile_list *profile_list, int width, int height, OB_EXPORT ob_stream_profile *ob_stream_profile_list_get_video_stream_profile(const ob_stream_profile_list *profile_list, int width, int height,
ob_format format, int fps, ob_error **error); ob_format format, int fps, ob_error **error);
/**
* @brief Match the corresponding ob_stream_profile based on the provided down-sampling configuration.If multiple profiles match, the first profile in the list
* is returned by default. If no matched profile is found, an error will be returned.
*
* @attention The stream profile returned by this function should be released with @ref ob_delete_stream_profile() when it is no longer needed.
*
* @param[in] profile_list The list of stream profiles.
* @param[in] down_sample_config Down-sampling configuration. The actual resolution is determined by original resolution and the scale factor.
* @param[in] format Stream format. If no matching condition is required, pass OB_FORMAT_ANY.
* @param[in] fps Frame rate. If no matching condition is required, pass OB_FPS_ANY.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The matched stream profile.
*/
OB_EXPORT ob_stream_profile *ob_stream_profile_list_get_video_stream_profile_by_down_sample_config(const ob_stream_profile_list *profile_list,
ob_down_sample_config down_sample_config, ob_format format,
int fps, ob_error **error);
/** /**
* @brief Match the corresponding ob_stream_profile through the passed parameters. If there are multiple matches, * @brief Match the corresponding ob_stream_profile through the passed parameters. If there are multiple matches,
* the first one in the list will be returned by default. If no matched profile is found, an error will be returned. * the first one in the list will be returned by default. If no matched profile is found, an error will be returned.
@@ -205,6 +205,17 @@ public:
Error::handle(&error); Error::handle(&error);
} }
/**
* @brief Trigger data acquisition on all devices configured for software synchronization, ensuring they capture data based on the same system time.
*
* @param[in] softSyncTime The time to synchronize, in microseconds. If the value is 0, synchronization is performed immediately.
*/
void setMultieDeviceSoftSyncTimeCapture(uint64_t softSyncTime) const {
ob_error *error = nullptr;
ob_multie_device_soft_sync_capture(impl_, softSyncTime, &error);
Error::handle(&error);
}
/** /**
* @brief Frees idle memory from the internal frame memory pool. * @brief Frees idle memory from the internal frame memory pool.
* @brief The SDK includes an internal frame memory pool that caches memory allocated for frames received from devices. * @brief The SDK includes an internal frame memory pool that caches memory allocated for frames received from devices.
@@ -1293,6 +1293,8 @@ template <typename T> bool Frame::is() const {
case OB_FRAME_DEPTH: case OB_FRAME_DEPTH:
return (typeid(T) == typeid(DepthFrame) || typeid(T) == typeid(VideoFrame)); return (typeid(T) == typeid(DepthFrame) || typeid(T) == typeid(VideoFrame));
case OB_FRAME_COLOR: case OB_FRAME_COLOR:
case OB_FRAME_COLOR_LEFT:
case OB_FRAME_COLOR_RIGHT:
return (typeid(T) == typeid(ColorFrame) || typeid(T) == typeid(VideoFrame)); return (typeid(T) == typeid(ColorFrame) || typeid(T) == typeid(VideoFrame));
case OB_FRAME_CONFIDENCE: case OB_FRAME_CONFIDENCE:
return (typeid(T) == typeid(ConfidenceFrame) || typeid(T) == typeid(VideoFrame)); return (typeid(T) == typeid(ConfidenceFrame) || typeid(T) == typeid(VideoFrame));
@@ -124,6 +124,22 @@ public:
enableVideoStream(streamType, width, height, fps, format); enableVideoStream(streamType, width, height, fps, format);
} }
/**
* @brief Enable a video stream to be used in the pipeline with down-sample configuration.
* @brief Will convert sensor type to stream type automatically.
*
* @param[in] sensorType The sensor type to be enabled.
* @param[in] downSampleConfig The down-sample configuration for this stream.
* @param[in] fps The video stream frame rate (default is OB_FPS_ANY, which selects the default frame rate).
* @param[in] format The video stream format (default is OB_FORMAT_ANY, which selects the default format).
*/
void enableVideoStream(OBSensorType sensorType, OBDownSampleConfig downSampleConfig, uint32_t fps = OB_FPS_ANY, OBFormat format = OB_FORMAT_ANY) const {
auto streamType = ob::TypeHelper::convertSensorTypeToStreamType(sensorType);
ob_error *error = nullptr;
ob_config_enable_video_stream_by_down_sample_config(impl_, streamType, downSampleConfig, fps, format, &error);
Error::handle(&error);
}
/** /**
* @brief Enable an accelerometer stream to be used in the pipeline. * @brief Enable an accelerometer stream to be used in the pipeline.
* *
@@ -254,6 +254,19 @@ public:
Error::handle(&error); Error::handle(&error);
} }
/**
* @brief Get the down-sampling configuration of the stream.
* @brief Includes original resolution and scale factor.
*
* @return OBDownSampleConfig Return the down-sampling configuration.
*/
OBDownSampleConfig getDownSampleConfig() const {
ob_error *error = nullptr;
auto downSampleConfig = ob_video_stream_profile_get_down_sample_config(const_cast<ob_stream_profile_t *>(impl_), &error);
Error::handle(&error);
return downSampleConfig;
}
public: public:
// The following interfaces are deprecated and are retained here for compatibility purposes. // The following interfaces are deprecated and are retained here for compatibility purposes.
uint32_t fps() const { uint32_t fps() const {
@@ -406,6 +419,8 @@ template <typename T> bool StreamProfile::is() const {
case OB_STREAM_IR_LEFT: case OB_STREAM_IR_LEFT:
case OB_STREAM_IR_RIGHT: case OB_STREAM_IR_RIGHT:
case OB_STREAM_COLOR: case OB_STREAM_COLOR:
case OB_STREAM_COLOR_LEFT:
case OB_STREAM_COLOR_RIGHT:
case OB_STREAM_DEPTH: case OB_STREAM_DEPTH:
case OB_STREAM_RAW_PHASE: case OB_STREAM_RAW_PHASE:
case OB_STREAM_CONFIDENCE: case OB_STREAM_CONFIDENCE:
@@ -434,6 +449,8 @@ public:
case OB_STREAM_IR_RIGHT: case OB_STREAM_IR_RIGHT:
case OB_STREAM_DEPTH: case OB_STREAM_DEPTH:
case OB_STREAM_COLOR: case OB_STREAM_COLOR:
case OB_STREAM_COLOR_LEFT:
case OB_STREAM_COLOR_RIGHT:
case OB_STREAM_VIDEO: case OB_STREAM_VIDEO:
case OB_STREAM_CONFIDENCE: case OB_STREAM_CONFIDENCE:
return std::make_shared<VideoStreamProfile>(impl); return std::make_shared<VideoStreamProfile>(impl);
@@ -511,6 +528,25 @@ public:
return vsp->as<VideoStreamProfile>(); return vsp->as<VideoStreamProfile>();
} }
/**
* @brief Match the corresponding video stream profile according to the down-sampling configuration.If multiple profiles match, the first one in the list is
* returned. Throws an exception when no matching profile is found.
*
* @param[in] downSampleConfig Down-sampling configuration. The actual resolution is computed fromthe original resolution and scale factor.
* @param[in] format Stream format. Pass OB_FORMAT_ANY if no matching condition is required.
* @param[in] fps Frame rate. Pass OB_FPS_ANY if no matching condition is required.
*
* @return std::shared_ptr<VideoStreamProfile> Return the matched video stream profile.
*/
std::shared_ptr<VideoStreamProfile> getVideoStreamProfile(OBDownSampleConfig downSampleConfig, OBFormat format = OB_FORMAT_ANY,
int fps = OB_FPS_ANY) const {
ob_error *error = nullptr;
auto profile = ob_stream_profile_list_get_video_stream_profile_by_down_sample_config(impl_, downSampleConfig, format, fps, &error);
Error::handle(&error);
auto vsp = StreamProfileFactory::create(profile);
return vsp->as<VideoStreamProfile>();
}
/** /**
* @brief Match the corresponding accelerometer stream profile based on the passed-in parameters. If multiple Match are found, the first one in the list * @brief Match the corresponding accelerometer stream profile based on the passed-in parameters. If multiple Match are found, the first one in the list
* is returned by default. Throws an exception if no matching profile is found. * is returned by default. Throws an exception if no matching profile is found.
@@ -127,6 +127,8 @@ public:
* @brief Video sensors are sensors that produce video frames. * @brief Video sensors are sensors that produce video frames.
* @brief The following sensor types are considered video sensors: * @brief The following sensor types are considered video sensors:
* OB_SENSOR_COLOR, * OB_SENSOR_COLOR,
* OB_SENSOR_COLOR_LEFT,
* OB_SENSOR_COLOR_RIGHT,
* OB_SENSOR_DEPTH, * OB_SENSOR_DEPTH,
* OB_SENSOR_IR, * OB_SENSOR_IR,
* OB_SENSOR_IR_LEFT, * OB_SENSOR_IR_LEFT,
@@ -148,6 +150,8 @@ public:
* OB_STREAM_VIDEO, * OB_STREAM_VIDEO,
* OB_STREAM_DEPTH, * OB_STREAM_DEPTH,
* OB_STREAM_COLOR, * OB_STREAM_COLOR,
* OB_STREAM_COLOR_LEFT,
* OB_STREAM_COLOR_RIGHT,
* OB_STREAM_IR, * OB_STREAM_IR,
* OB_STREAM_IR_LEFT, * OB_STREAM_IR_LEFT,
* OB_STREAM_IR_RIGHT, * OB_STREAM_IR_RIGHT,
@@ -8,12 +8,12 @@ set(CMAKE_IMPORT_FILE_VERSION 1)
# Import target "ob::OrbbecSDK" for configuration "Release" # Import target "ob::OrbbecSDK" for configuration "Release"
set_property(TARGET ob::OrbbecSDK APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) set_property(TARGET ob::OrbbecSDK APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(ob::OrbbecSDK PROPERTIES set_target_properties(ob::OrbbecSDK PROPERTIES
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.6.3" IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.6.2"
IMPORTED_SONAME_RELEASE "libOrbbecSDK.so.2" IMPORTED_SONAME_RELEASE "libOrbbecSDK.so.2"
) )
list(APPEND _cmake_import_check_targets ob::OrbbecSDK ) list(APPEND _cmake_import_check_targets ob::OrbbecSDK )
list(APPEND _cmake_import_check_files_for_ob::OrbbecSDK "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.6.3" ) list(APPEND _cmake_import_check_files_for_ob::OrbbecSDK "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.6.2" )
# Commands beyond this point should not need to know the version. # Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION) set(CMAKE_IMPORT_FILE_VERSION)
@@ -9,19 +9,19 @@
# The variable CVF_VERSION must be set before calling configure_file(). # The variable CVF_VERSION must be set before calling configure_file().
set(PACKAGE_VERSION "2.6.3") set(PACKAGE_VERSION "2.6.2")
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE) set(PACKAGE_VERSION_COMPATIBLE FALSE)
else() else()
if("2.6.3" MATCHES "^([0-9]+)\\.") if("2.6.2" MATCHES "^([0-9]+)\\.")
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}") set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0) if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0)
string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}") string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}")
endif() endif()
else() else()
set(CVF_VERSION_MAJOR "2.6.3") set(CVF_VERSION_MAJOR "2.6.2")
endif() endif()
if(PACKAGE_FIND_VERSION_RANGE) if(PACKAGE_FIND_VERSION_RANGE)
@@ -1 +1 @@
libOrbbecSDK.so.2.6.3 libOrbbecSDK.so.2.6.2
@@ -8,12 +8,12 @@ set(CMAKE_IMPORT_FILE_VERSION 1)
# Import target "ob::OrbbecSDK" for configuration "Release" # Import target "ob::OrbbecSDK" for configuration "Release"
set_property(TARGET ob::OrbbecSDK APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) set_property(TARGET ob::OrbbecSDK APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(ob::OrbbecSDK PROPERTIES set_target_properties(ob::OrbbecSDK PROPERTIES
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.6.3" IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.6.2"
IMPORTED_SONAME_RELEASE "libOrbbecSDK.so.2" IMPORTED_SONAME_RELEASE "libOrbbecSDK.so.2"
) )
list(APPEND _cmake_import_check_targets ob::OrbbecSDK ) list(APPEND _cmake_import_check_targets ob::OrbbecSDK )
list(APPEND _cmake_import_check_files_for_ob::OrbbecSDK "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.6.3" ) list(APPEND _cmake_import_check_files_for_ob::OrbbecSDK "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.6.2" )
# Commands beyond this point should not need to know the version. # Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION) set(CMAKE_IMPORT_FILE_VERSION)
@@ -9,19 +9,19 @@
# The variable CVF_VERSION must be set before calling configure_file(). # The variable CVF_VERSION must be set before calling configure_file().
set(PACKAGE_VERSION "2.6.3") set(PACKAGE_VERSION "2.6.2")
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE) set(PACKAGE_VERSION_COMPATIBLE FALSE)
else() else()
if("2.6.3" MATCHES "^([0-9]+)\\.") if("2.6.2" MATCHES "^([0-9]+)\\.")
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}") set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0) if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0)
string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}") string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}")
endif() endif()
else() else()
set(CVF_VERSION_MAJOR "2.6.3") set(CVF_VERSION_MAJOR "2.6.2")
endif() endif()
if(PACKAGE_FIND_VERSION_RANGE) if(PACKAGE_FIND_VERSION_RANGE)
+1 -1
View File
@@ -1 +1 @@
libOrbbecSDK.so.2.6.3 libOrbbecSDK.so.2.6.2
@@ -76,6 +76,93 @@
system's capabilities and the device's speciality. --> system's capabilities and the device's speciality. -->
<LinuxUVCBackend>Auto</LinuxUVCBackend> <LinuxUVCBackend>Auto</LinuxUVCBackend>
<!-- Gemini305 config -->
<Gemini305>
<!-- Default backend for Linux UVC devices. If the LinuxUVCBackend is set to "Auto,"
this item will determine the device's speciality. Optional values: V4L2, LibUVC -->
<LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend>
<Misc>
<GlobalTimestampFitterEnable>true</GlobalTimestampFitterEnable>
<!-- Global timestamp fitter refresh interval, unit: milliseconds, default value:
1000,
minimum value: 100, it is recommended not to be greater than 1000 -->
<GlobalTimestampFitterInterval>1000</GlobalTimestampFitterInterval>
<!-- Global timestamp fitter queue size, default value: 100, minimum value: 20 -->
<GlobalTimestampFitterQueueSize>100</GlobalTimestampFitterQueueSize>
</Misc>
<DepthPostProcessing>
<HardwareNoiseRemoveFilter>true</HardwareNoiseRemoveFilter>
<SoftwareNoiseRemoveFilter>false</SoftwareNoiseRemoveFilter>
</DepthPostProcessing>
<!-- Whether to enable heartbeat by default -->
<DefaultHeartBeat>0</DefaultHeartBeat>
<!-- Whether to enable firmware upgrade foolproof by default, only internal version
supports -->
<FirmwareUpgradeFoolproof>1</FirmwareUpgradeFoolproof>
<!-- Depth Filter Params -->
<!--
<DepthFilterDDOConfig>./Gemini2_v1.0.json</DepthFilterDDOConfig>
-->
<Depth>
<!-- The resolution width is enabled by default, int type -->
<Width>1280</Width>
<!-- High resolution is enabled by default, int type -->
<Height>800</Height>
<!-- The frame rate of the resolution enabled by default, int type -->
<FPS>30</FPS>
<Format>Y16</Format>
</Depth>
<Color>
<!-- The resolution width is enabled by default, int type -->
<Width>1280</Width>
<!-- High resolution is enabled by default, int type -->
<Height>800</Height>
<!-- The frame rate of the resolution enabled by default, int type -->
<FPS>30</FPS>
<Format>YUYV</Format>
</Color>
<LeftColor>
<!-- The resolution width is enabled by default, int type -->
<Width>1280</Width>
<!-- High resolution is enabled by default, int type -->
<Height>800</Height>
<!-- The frame rate of the resolution enabled by default, int type -->
<FPS>30</FPS>
<Format>YUYV</Format>
</LeftColor>
<RightColor>
<!-- The resolution width is enabled by default, int type -->
<Width>1280</Width>
<!-- High resolution is enabled by default, int type -->
<Height>800</Height>
<!-- The frame rate of the resolution enabled by default, int type -->
<FPS>30</FPS>
<Format>YUYV</Format>
</RightColor>
<LeftIR>
<!-- The resolution width is enabled by default, int type -->
<Width>1280</Width>
<!-- High resolution is enabled by default, int type -->
<Height>800</Height>
<!-- The frame rate of the resolution enabled by default, int type -->
<FPS>30</FPS>
<Format>Y8</Format>
</LeftIR>
<RightIR>
<!-- The resolution width is enabled by default, int type -->
<Width>1280</Width>
<!-- High resolution is enabled by default, int type -->
<Height>800</Height>
<!-- The frame rate of the resolution enabled by default, int type -->
<FPS>30</FPS>
<Format>Y8</Format>
</RightIR>
</Gemini305>
<FemtoMega> <FemtoMega>
<!-- For Femto-Mega devices, it must be set to V4L2, LibUVC is not supported --> <!-- For Femto-Mega devices, it must be set to V4L2, LibUVC is not supported -->
<LinuxUVCDefaultBackend>V4L2</LinuxUVCDefaultBackend> <LinuxUVCDefaultBackend>V4L2</LinuxUVCDefaultBackend>