mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-03 19:47:46 +08:00
Update SDK version to v2.4.7
This commit is contained in:
@@ -269,6 +269,42 @@ OB_EXPORT const char *ob_device_frame_interleave_list_get_name(ob_device_frame_i
|
||||
OB_EXPORT bool ob_device_frame_interleave_list_has_frame_interleave(ob_device_frame_interleave_list *frame_interleave_list, const char *frame_interleave_name,
|
||||
ob_error **error);
|
||||
|
||||
/* @brief Get the available preset resolution config list.
|
||||
*
|
||||
* @param device The device object.
|
||||
* @param error Log error messages.
|
||||
* @return The available frame interleave list.
|
||||
*
|
||||
*/
|
||||
OB_EXPORT ob_preset_resolution_config_list *ob_device_get_available_preset_resolution_config_list(ob_device *device, ob_error **error);
|
||||
|
||||
/* @brief Get the number of preset resolution in the preset resolution list.
|
||||
*
|
||||
* @param ob_preset_resolution_config_list The available preset resolution list.
|
||||
* @param error Log error messages.
|
||||
* @return The number of preset resolution in the preset resolution list.
|
||||
*/
|
||||
OB_EXPORT uint32_t ob_device_preset_resolution_config_get_count(ob_preset_resolution_config_list *ob_preset_resolution_config_list, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get the preset resolution in the preset resolution list.
|
||||
*
|
||||
* @param ob_preset_resolution_config_list The available preset resolution list.
|
||||
* @param index The index of preset resolution in the preset resolution list.
|
||||
* @param error Log error messages.
|
||||
* @return The preset resolution in the preset resolution list.
|
||||
*/
|
||||
OB_EXPORT OBPresetResolutionConfig ob_device_preset_resolution_config_list_get_item(const ob_preset_resolution_config_list *ob_preset_resolution_config_lis,
|
||||
uint32_t index, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Delete the available preset resolution list.
|
||||
*
|
||||
* @param frame_interleave_list The available preset resolution list.
|
||||
* @param error Log error messages.
|
||||
*/
|
||||
OB_EXPORT void ob_delete_preset_resolution_config_list(ob_preset_resolution_config_list *ob_preset_resolution_config_list, ob_error **error);
|
||||
|
||||
// The following interfaces are deprecated and are retained here for compatibility purposes.
|
||||
#define ob_depth_work_mode_list_count ob_depth_work_mode_list_get_count
|
||||
#define ob_device_preset_list_count ob_device_preset_list_get_count
|
||||
|
||||
@@ -39,6 +39,7 @@ typedef struct ob_depth_work_mode_list_t ob_depth_work_mode_list;
|
||||
typedef struct ob_device_preset_list_t ob_device_preset_list;
|
||||
typedef struct ob_filter_config_schema_list_t ob_filter_config_schema_list;
|
||||
typedef struct ob_device_frame_interleave_list_t ob_device_frame_interleave_list;
|
||||
typedef struct ob_preset_resolution_config_list_t ob_preset_resolution_config_list;
|
||||
|
||||
#define OB_WIDTH_ANY 0
|
||||
#define OB_HEIGHT_ANY 0
|
||||
@@ -134,6 +135,7 @@ typedef enum {
|
||||
OB_SENSOR_IR_LEFT = 6, /**< left IR for stereo camera*/
|
||||
OB_SENSOR_IR_RIGHT = 7, /**< Right IR for stereo camera*/
|
||||
OB_SENSOR_RAW_PHASE = 8, /**< Raw Phase */
|
||||
OB_SENSOR_CONFIDENCE = 9,/**< Confidence */
|
||||
OB_SENSOR_TYPE_COUNT, /**The total number of sensor types, is not a valid sensor type */
|
||||
} OBSensorType,
|
||||
ob_sensor_type;
|
||||
@@ -152,6 +154,7 @@ typedef enum {
|
||||
OB_STREAM_IR_LEFT = 6, /**< Left 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_CONFIDENCE = 9, /**< Confidence Stream*/
|
||||
OB_STREAM_TYPE_COUNT, /**< The total number of stream type,is not a valid stream type */
|
||||
} OBStreamType,
|
||||
ob_stream_type;
|
||||
@@ -172,6 +175,7 @@ typedef enum {
|
||||
OB_FRAME_IR_LEFT = 8, /**< Left 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_CONFIDENCE = 11,/**< Confidence frame*/
|
||||
OB_FRAME_TYPE_COUNT, /**< The total number of frame types, is not a valid frame type */
|
||||
} OBFrameType,
|
||||
ob_frame_type;
|
||||
@@ -227,6 +231,7 @@ typedef enum {
|
||||
OB_FORMAT_RGBA = 31, /**< RGBA format */
|
||||
OB_FORMAT_BYR2 = 32, /**< byr2 format */
|
||||
OB_FORMAT_RW16 = 33, /**< RAW16 format */
|
||||
OB_FORMAT_Y12C4 = 34, /**< Y12C4 format */
|
||||
} OBFormat,
|
||||
ob_format;
|
||||
|
||||
@@ -449,6 +454,13 @@ typedef struct {
|
||||
bool isMirrored; ///< Whether the image frame corresponding to this group of parameters is mirrored
|
||||
} OBCameraParam, ob_camera_param;
|
||||
|
||||
typedef struct {
|
||||
int16_t width; ///< width
|
||||
int16_t height; ///< height
|
||||
int irDecimationFactor; ///< ir decimation factor
|
||||
int depthDecimationFactor; ///< depth decimation factor
|
||||
} OBPresetResolutionConfig, ob_preset_resolution_ratio_config;
|
||||
|
||||
/**
|
||||
* @brief calibration parameters
|
||||
*/
|
||||
@@ -1829,7 +1841,7 @@ typedef void (*ob_playback_status_changed_callback)(ob_playback_status status, v
|
||||
*/
|
||||
#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_IR_RIGHT)
|
||||
|| sensor_type == OB_SENSOR_IR_RIGHT || sensor_type == OB_SENSOR_CONFIDENCE)
|
||||
|
||||
/**
|
||||
* @brief check if the stream_type is a video stream
|
||||
@@ -1839,7 +1851,7 @@ typedef void (*ob_playback_status_changed_callback)(ob_playback_status status, v
|
||||
*/
|
||||
#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_IR_RIGHT || stream_type == OB_STREAM_VIDEO)
|
||||
|| 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
|
||||
|
||||
@@ -515,6 +515,36 @@ typedef enum {
|
||||
*/
|
||||
OB_DEVICE_PTP_CLOCK_SYNC_ENABLE_BOOL = 223,
|
||||
|
||||
/**
|
||||
* @brief Depth with confidence stream enable
|
||||
*/
|
||||
OB_PROP_DEPTH_WITH_CONFIDENCE_STREAM_ENABLE_BOOL = 224,
|
||||
|
||||
/**
|
||||
* @brief Enable or disable confidence stream filter
|
||||
*/
|
||||
OB_PROP_CONFIDENCE_STREAM_FILTER_BOOL = 226,
|
||||
|
||||
/**
|
||||
* @brief Confidence stream filter threshold, range [0, 255]
|
||||
*/
|
||||
OB_PROP_CONFIDENCE_STREAM_FILTER_THRESHOLD_INT = 227,
|
||||
|
||||
/**
|
||||
* @brief Confidence stream mirror enable
|
||||
*/
|
||||
OB_PROP_CONFIDENCE_MIRROR_BOOL = 229,
|
||||
|
||||
/**
|
||||
* @brief Confidence stream flip enable
|
||||
*/
|
||||
OB_PROP_CONFIDENCE_FLIP_BOOL = 230,
|
||||
|
||||
/**
|
||||
* @brief Confidence stream rotate angle{0, 90, 180, 270}
|
||||
*/
|
||||
OB_PROP_CONFIDENCE_ROTATE_INT = 231,
|
||||
|
||||
/**
|
||||
* @brief Baseline calibration parameters
|
||||
*/
|
||||
@@ -604,6 +634,11 @@ typedef enum {
|
||||
*/
|
||||
OB_STRUCT_DISP_OFFSET_CONFIG = 1064,
|
||||
|
||||
/**
|
||||
* @brief Preset resolution ratio configuration
|
||||
*/
|
||||
OB_STRUCT_PRESET_RESOLUTION_CONFIG = 1069,
|
||||
|
||||
/**
|
||||
* @brief Color camera auto exposure
|
||||
*/
|
||||
|
||||
@@ -30,6 +30,7 @@ class DevicePresetList;
|
||||
class OBDepthWorkModeList;
|
||||
class CameraParamList;
|
||||
class DeviceFrameInterleaveList;
|
||||
class PresetResolutionConfigeList;
|
||||
|
||||
class Device {
|
||||
public:
|
||||
@@ -822,6 +823,18 @@ public:
|
||||
return std::make_shared<DeviceFrameInterleaveList>(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get available frame interleave list
|
||||
*
|
||||
* @return DeviceFrameInterleaveList return the available frame interleave list.
|
||||
*/
|
||||
std::shared_ptr<PresetResolutionConfigeList> getAvailablePresetResolutionConfigeList() const {
|
||||
ob_error *error = nullptr;
|
||||
auto list = ob_device_get_available_preset_resolution_config_list(impl_, &error);
|
||||
Error::handle(&error);
|
||||
return std::make_shared<PresetResolutionConfigeList>(list);
|
||||
}
|
||||
|
||||
private:
|
||||
static void firmwareUpdateCallback(ob_fw_update_state state, const char *message, uint8_t percent, void *userData) {
|
||||
auto device = static_cast<Device *>(userData);
|
||||
@@ -1502,4 +1515,42 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Class representing a list of device Frame Interleave
|
||||
*/
|
||||
class PresetResolutionConfigeList {
|
||||
private:
|
||||
ob_preset_resolution_config_list_t *impl_ = nullptr;
|
||||
|
||||
public:
|
||||
explicit PresetResolutionConfigeList(ob_preset_resolution_config_list_t *impl) : impl_(impl) {}
|
||||
~PresetResolutionConfigeList() noexcept {
|
||||
ob_error *error = nullptr;
|
||||
ob_delete_preset_resolution_config_list(impl_, &error);
|
||||
Error::handle(&error, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the number of device preset resolution ratio in the list
|
||||
*/
|
||||
uint32_t getCount() {
|
||||
ob_error *error = nullptr;
|
||||
auto count = ob_device_preset_resolution_config_get_count(impl_, &error);
|
||||
Error::handle(&error);
|
||||
return count;
|
||||
}
|
||||
|
||||
/*
|
||||
* @brief Get the device preset resolution ratio at the specified index
|
||||
* @param index the index of the device preset resolution ratio
|
||||
* @return OBPresetResolutionConfig the corresponding device preset resolution ratio
|
||||
*/
|
||||
OBPresetResolutionConfig getPresetResolutionRatioConfig(uint32_t index) {
|
||||
ob_error *error = nullptr;
|
||||
auto config = ob_device_preset_resolution_config_list_get_item(impl_, index, &error);
|
||||
Error::handle(&error);
|
||||
return config;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace ob
|
||||
|
||||
@@ -347,7 +347,7 @@ public:
|
||||
init(impl);
|
||||
}
|
||||
|
||||
virtual ~PointCloudFilter() noexcept = default;
|
||||
virtual ~PointCloudFilter() noexcept override = default;
|
||||
|
||||
/**
|
||||
* @brief Set the output pointcloud frame format.
|
||||
@@ -421,7 +421,7 @@ public:
|
||||
setConfigValue("AlignType", static_cast<double>(alignToStreamType));
|
||||
}
|
||||
|
||||
virtual ~Align() noexcept = default;
|
||||
virtual ~Align() noexcept override = default;
|
||||
|
||||
OBStreamType getAlignToStreamType() {
|
||||
return static_cast<OBStreamType>(static_cast<int>(getConfigValue("AlignType")));
|
||||
@@ -466,7 +466,7 @@ public:
|
||||
init(impl);
|
||||
}
|
||||
|
||||
virtual ~FormatConvertFilter() noexcept = default;
|
||||
virtual ~FormatConvertFilter() noexcept override = default;
|
||||
|
||||
/**
|
||||
* @brief Set the format conversion type.
|
||||
@@ -492,7 +492,7 @@ public:
|
||||
init(impl);
|
||||
}
|
||||
|
||||
virtual ~HdrMerge() noexcept = default;
|
||||
virtual ~HdrMerge() noexcept override = default;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -524,7 +524,7 @@ public:
|
||||
initSequenceIdList();
|
||||
}
|
||||
|
||||
virtual ~SequenceIdFilter() noexcept {
|
||||
virtual ~SequenceIdFilter() noexcept override {
|
||||
if(outputSequenceIdList_) {
|
||||
delete[] outputSequenceIdList_;
|
||||
outputSequenceIdList_ = nullptr;
|
||||
@@ -575,7 +575,7 @@ public:
|
||||
init(impl);
|
||||
}
|
||||
|
||||
virtual ~DecimationFilter() noexcept = default;
|
||||
virtual ~DecimationFilter() noexcept override = default;
|
||||
|
||||
/**
|
||||
* @brief Set the decimation filter scale value.
|
||||
@@ -619,7 +619,7 @@ public:
|
||||
init(impl);
|
||||
}
|
||||
|
||||
virtual ~ThresholdFilter() noexcept = default;
|
||||
virtual ~ThresholdFilter() noexcept override = default;
|
||||
|
||||
/**
|
||||
* @brief Get the threshold filter min range.
|
||||
@@ -682,7 +682,7 @@ public:
|
||||
init(impl);
|
||||
}
|
||||
|
||||
virtual ~SpatialAdvancedFilter() noexcept = default;
|
||||
virtual ~SpatialAdvancedFilter() noexcept override = default;
|
||||
|
||||
/**
|
||||
* @brief Get the spatial advanced filter alpha range.
|
||||
@@ -791,7 +791,7 @@ public:
|
||||
init(impl);
|
||||
}
|
||||
|
||||
~HoleFillingFilter() noexcept = default;
|
||||
~HoleFillingFilter() noexcept override = default;
|
||||
|
||||
/**
|
||||
* @brief Set the HoleFillingFilter mode.
|
||||
@@ -824,7 +824,7 @@ public:
|
||||
init(impl);
|
||||
}
|
||||
|
||||
~NoiseRemovalFilter() noexcept = default;
|
||||
~NoiseRemovalFilter() noexcept override = default;
|
||||
|
||||
/**
|
||||
* @brief Set the noise removal filter params.
|
||||
@@ -895,7 +895,7 @@ public:
|
||||
init(impl);
|
||||
}
|
||||
|
||||
~TemporalFilter() noexcept = default;
|
||||
~TemporalFilter() noexcept override = default;
|
||||
|
||||
/**
|
||||
* @brief Get the TemporalFilter diffscale range.
|
||||
@@ -962,7 +962,7 @@ public:
|
||||
init(impl);
|
||||
}
|
||||
|
||||
~DisparityTransform() noexcept = default;
|
||||
~DisparityTransform() noexcept override = default;
|
||||
};
|
||||
|
||||
class OBFilterList {
|
||||
|
||||
@@ -553,6 +553,28 @@ public:
|
||||
~IRFrame() noexcept override = default;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Define the ConfidenceFrame class, which inherits from the VideoFrame class
|
||||
*
|
||||
*/
|
||||
class ConfidenceFrame : public VideoFrame {
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a new ConfidenceFrame object with a given pointer to the internal frame object.
|
||||
*
|
||||
* @attention After calling this constructor, the frame object will own the internal frame object, and the internal frame object will be deleted when the
|
||||
* frame object is destroyed.
|
||||
* @attention The internal frame object should not be deleted by the caller.
|
||||
* @attention Please use the FrameFactory to create a Frame object.
|
||||
*
|
||||
* @param impl The pointer to the internal frame object.
|
||||
*/
|
||||
explicit ConfidenceFrame(const ob_frame *impl) : VideoFrame(impl){};
|
||||
|
||||
~ConfidenceFrame() noexcept override = default;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Define the PointsFrame class, which inherits from the Frame class
|
||||
* @brief The PointsFrame class is used to obtain pointcloud data and point cloud information.
|
||||
@@ -1036,6 +1058,8 @@ template <typename T> bool Frame::is() const {
|
||||
return (typeid(T) == typeid(DepthFrame) || typeid(T) == typeid(VideoFrame));
|
||||
case OB_FRAME_COLOR:
|
||||
return (typeid(T) == typeid(ColorFrame) || typeid(T) == typeid(VideoFrame));
|
||||
case OB_FRAME_CONFIDENCE:
|
||||
return (typeid(T) == typeid(ConfidenceFrame) || typeid(T) == typeid(VideoFrame));
|
||||
case OB_FRAME_GYRO:
|
||||
return (typeid(T) == typeid(GyroFrame));
|
||||
case OB_FRAME_ACCEL:
|
||||
|
||||
@@ -20,7 +20,7 @@ typedef std::function<void(OBPlaybackStatus status)> PlaybackStatusChangeCallbac
|
||||
|
||||
class RecordDevice {
|
||||
private:
|
||||
ob_record_device_t *impl_;
|
||||
ob_record_device_t *impl_ = nullptr;
|
||||
|
||||
public:
|
||||
explicit RecordDevice(std::shared_ptr<Device> device, const std::string &file, bool compressionEnabled = true) {
|
||||
@@ -35,14 +35,14 @@ public:
|
||||
Error::handle(&error, false);
|
||||
}
|
||||
|
||||
RecordDevice(RecordDevice &&other) {
|
||||
RecordDevice(RecordDevice &&other) noexcept {
|
||||
if(this != &other) {
|
||||
impl_ = other.impl_;
|
||||
other.impl_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
RecordDevice &operator=(RecordDevice &&other) {
|
||||
RecordDevice &operator=(RecordDevice &&other) noexcept {
|
||||
if(this != &other) {
|
||||
impl_ = other.impl_;
|
||||
other.impl_ = nullptr;
|
||||
@@ -76,11 +76,11 @@ public:
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
virtual ~PlaybackDevice() noexcept = default;
|
||||
virtual ~PlaybackDevice() noexcept override = default;
|
||||
|
||||
PlaybackDevice(PlaybackDevice &&other) : Device(std::move(other)) {}
|
||||
PlaybackDevice(PlaybackDevice &&other) noexcept : Device(std::move(other)) {}
|
||||
|
||||
PlaybackDevice &operator=(PlaybackDevice &&other) {
|
||||
PlaybackDevice &operator=(PlaybackDevice &&other) noexcept {
|
||||
Device::operator=(std::move(other));
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -387,6 +387,7 @@ template <typename T> bool StreamProfile::is() const {
|
||||
case OB_STREAM_COLOR:
|
||||
case OB_STREAM_DEPTH:
|
||||
case OB_STREAM_RAW_PHASE:
|
||||
case OB_STREAM_CONFIDENCE:
|
||||
return typeid(T) == typeid(VideoStreamProfile);
|
||||
case OB_STREAM_ACCEL:
|
||||
return typeid(T) == typeid(AccelStreamProfile);
|
||||
@@ -411,6 +412,7 @@ public:
|
||||
case OB_STREAM_DEPTH:
|
||||
case OB_STREAM_COLOR:
|
||||
case OB_STREAM_VIDEO:
|
||||
case OB_STREAM_CONFIDENCE:
|
||||
return std::make_shared<VideoStreamProfile>(impl);
|
||||
case OB_STREAM_ACCEL:
|
||||
return std::make_shared<AccelStreamProfile>(impl);
|
||||
|
||||
@@ -112,6 +112,7 @@ public:
|
||||
* OB_SENSOR_IR,
|
||||
* OB_SENSOR_IR_LEFT,
|
||||
* OB_SENSOR_IR_RIGHT,
|
||||
* OB_SENSOR_CONFIDENCE,
|
||||
*
|
||||
* @param type The sensor type
|
||||
* @return true
|
||||
@@ -131,6 +132,7 @@ public:
|
||||
* OB_STREAM_IR,
|
||||
* OB_STREAM_IR_LEFT,
|
||||
* OB_STREAM_IR_RIGHT,
|
||||
* OB_STREAM_CONFIDENCE,
|
||||
*
|
||||
* @param type The stream type to check.
|
||||
* @return true if the given stream type is a video stream, false otherwise.
|
||||
|
||||
Reference in New Issue
Block a user