mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-03 19:47:46 +08:00
Update sdk version to v2.4.1
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -10,15 +10,15 @@
|
||||
|
||||
#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;
|
||||
@@ -185,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;
|
||||
|
||||
@@ -192,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 */
|
||||
@@ -538,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;
|
||||
|
||||
@@ -1697,17 +1702,17 @@ typedef enum {
|
||||
} 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_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;
|
||||
} ob_playback_status,
|
||||
OBPlaybackStatus;
|
||||
|
||||
// For compatibility
|
||||
#define OB_FRAME_METADATA_TYPE_LASER_POWER_MODE OB_FRAME_METADATA_TYPE_LASER_POWER_LEVEL
|
||||
@@ -1815,7 +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);
|
||||
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);
|
||||
|
||||
|
||||
@@ -509,6 +509,12 @@ typedef enum {
|
||||
* @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
|
||||
*/
|
||||
@@ -817,6 +823,11 @@ typedef enum {
|
||||
* @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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -24,10 +24,9 @@ OB_EXPORT bool ob_transformation_3d_to_3d(const OBPoint3f source_point3f, OBExtr
|
||||
/**
|
||||
* @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.
|
||||
|
||||
@@ -127,7 +127,7 @@ public:
|
||||
/**
|
||||
* @brief Activates device clock synchronization to synchronize the clock of the host and all created devices (if supported).
|
||||
*
|
||||
* @param repeatInterval The interval for auto-repeated synchronization, in milliseconds. If the value is 0, synchronization is performed only once.
|
||||
* @param repeatIntervalMsec The interval for auto-repeated synchronization, in milliseconds. If the value is 0, synchronization is performed only once.
|
||||
*/
|
||||
void enableDeviceClockSync(uint64_t repeatIntervalMsec) const {
|
||||
ob_error *error = nullptr;
|
||||
@@ -146,12 +146,12 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* @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.
|
||||
*
|
||||
* @param[in] backend_type The backend type to be used.
|
||||
* @param[in] type The backend type to be used.
|
||||
*/
|
||||
void setUvcBackendType(OBUvcBackendType type) const {
|
||||
ob_error *error = nullptr;
|
||||
@@ -202,7 +202,7 @@ public:
|
||||
* @param callback The callback function.
|
||||
*/
|
||||
static void setLoggerToCallback(OBLogSeverity severity, LogCallback callback) {
|
||||
ob_error *error = nullptr;
|
||||
ob_error *error = nullptr;
|
||||
Context::getLogCallback() = callback;
|
||||
ob_set_logger_to_callback(severity, &Context::logCallback, &Context::getLogCallback(), &error);
|
||||
Error::handle(&error);
|
||||
@@ -240,7 +240,7 @@ private:
|
||||
}
|
||||
|
||||
// Lazy initialization of the logcallback_. The purpose is to initialize logcallback_ in .hpp
|
||||
static LogCallback& getLogCallback() {
|
||||
static LogCallback &getLogCallback() {
|
||||
static LogCallback logCallback_ = nullptr;
|
||||
return logCallback_;
|
||||
}
|
||||
@@ -249,4 +249,3 @@ private:
|
||||
#define enableMultiDeviceSync enableDeviceClockSync
|
||||
};
|
||||
} // namespace ob
|
||||
|
||||
|
||||
@@ -292,6 +292,30 @@ public:
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the customer data type of a device property
|
||||
*
|
||||
* @param data The data to set
|
||||
* @param dataSize The size of the data to set,the maximum length cannot exceed 65532 bytes.
|
||||
*/
|
||||
void writeCustomerData(const void *data, uint32_t dataSize) {
|
||||
ob_error *error = nullptr;
|
||||
ob_device_write_customer_data(impl_, data, dataSize, &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the customer data type of a device property
|
||||
*
|
||||
* @param data The property data obtained
|
||||
* @param dataSize The size of the data obtained
|
||||
*/
|
||||
void readCustomerData(void *data, uint32_t *dataSize) {
|
||||
ob_error *error = nullptr;
|
||||
ob_device_read_customer_data(impl_, data, dataSize, &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the number of properties supported by the device
|
||||
*
|
||||
@@ -755,7 +779,7 @@ public:
|
||||
* @param[in] sendData The data to be sent to the device.
|
||||
* @param[in] sendDataSize The size of the data to be sent to the device.
|
||||
* @param[out] receiveData The data received from the device.
|
||||
* @param[in out] receiveDataSize The requeseted size of the data received from the device, and the actual size of the data received from the device.
|
||||
* @param[in,out] receiveDataSize The requeseted size of the data received from the device, and the actual size of the data received from the device.
|
||||
*/
|
||||
void sendAndReceiveData(const uint8_t *sendData, uint32_t sendDataSize, uint8_t *receiveData, uint32_t *receiveDataSize) const {
|
||||
ob_error *error = nullptr;
|
||||
@@ -1394,9 +1418,9 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the number of device presets in the list
|
||||
* @brief Get the number of camera parameters in the list.
|
||||
*
|
||||
* @return uint32_t the number of device presets in the list
|
||||
* @return uint32_t the number of camera parameters in the list.
|
||||
*/
|
||||
uint32_t getCount() {
|
||||
ob_error *error = nullptr;
|
||||
|
||||
@@ -22,10 +22,12 @@ private:
|
||||
*
|
||||
* @attention This constructor should not be called directly, use the handle() function instead.
|
||||
*
|
||||
* @param error
|
||||
* @param error The ob_error object
|
||||
*/
|
||||
explicit Error(ob_error *error) : impl_(error) {};
|
||||
|
||||
Error& operator=(const Error&) = default;
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief A static function to handle the ob_error and throw an exception if needed.
|
||||
|
||||
@@ -311,7 +311,7 @@ public:
|
||||
* @brief Some private filters require an activation key to be activated, its depends on the vendor of the filter.
|
||||
*
|
||||
* @param name The name of the filter.
|
||||
* @param activation_key The activation key of the filter.
|
||||
* @param activationKey The activation key of the filter.
|
||||
*/
|
||||
static std::shared_ptr<Filter> createPrivateFilter(const std::string &name, const std::string &activationKey) {
|
||||
ob_error *error = nullptr;
|
||||
@@ -352,7 +352,7 @@ public:
|
||||
/**
|
||||
* @brief Set the output pointcloud frame format.
|
||||
*
|
||||
* @param type The point cloud frame format: OB_FORMAT_POINT or OB_FORMAT_RGB_POINT
|
||||
* @param format The point cloud frame format: OB_FORMAT_POINT or OB_FORMAT_RGB_POINT
|
||||
*/
|
||||
void setCreatePointFormat(OBFormat format) {
|
||||
setConfigValue("pointFormat", static_cast<double>(format));
|
||||
@@ -534,7 +534,7 @@ public:
|
||||
/**
|
||||
* @brief Set the sequenceId filter params.
|
||||
*
|
||||
* @param sequence id to pass the filter.
|
||||
* @param sequence_id id to pass the filter.
|
||||
*/
|
||||
void selectSequenceId(int sequence_id) {
|
||||
setConfigValue("sequenceid", static_cast<double>(sequence_id));
|
||||
@@ -580,7 +580,7 @@ public:
|
||||
/**
|
||||
* @brief Set the decimation filter scale value.
|
||||
*
|
||||
* @param type The decimation filter scale value.
|
||||
* @param value The decimation filter scale value.
|
||||
*/
|
||||
void setScaleValue(uint8_t value) {
|
||||
setConfigValue("decimate", static_cast<double>(value));
|
||||
@@ -796,7 +796,6 @@ public:
|
||||
/**
|
||||
* @brief Set the HoleFillingFilter mode.
|
||||
*
|
||||
* @param[in] filter A holefilling_filter object.
|
||||
* @param mode OBHoleFillingMode, OB_HOLE_FILL_TOP,OB_HOLE_FILL_NEAREST or OB_HOLE_FILL_FAREST.
|
||||
*/
|
||||
void setFilterMode(OBHoleFillingMode mode) {
|
||||
@@ -830,7 +829,7 @@ public:
|
||||
/**
|
||||
* @brief Set the noise removal filter params.
|
||||
*
|
||||
* @param[in] params ob_noise_removal_filter_params.
|
||||
* @param[in] filterParams ob_noise_removal_filter_params.
|
||||
*/
|
||||
void setFilterParams(OBNoiseRemovalFilterParams filterParams) {
|
||||
setConfigValue("max_size", static_cast<double>(filterParams.max_size));
|
||||
|
||||
@@ -929,11 +929,11 @@ public:
|
||||
* @attention The buffer is owned by the caller, and will not be destroyed by the frame object. The user should ensure that the buffer is valid and not
|
||||
* modified.
|
||||
*
|
||||
* @param[in] frame_type Frame object type.
|
||||
* @param[in] frameType Frame object type.
|
||||
* @param[in] format Frame object format.
|
||||
* @param[in] buffer Frame object buffer.
|
||||
* @param[in] buffer_size Frame object buffer size.
|
||||
* @param[in] destroyCallback Destroy callback, will be called when the frame object is destroyed.
|
||||
* @param[in] bufferSize Frame object buffer size.
|
||||
*
|
||||
* @return std::shared_ptr<Frame> The created frame object.
|
||||
*/
|
||||
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
* If no parameters are specified, the stream will be enabled with default resolution settings.
|
||||
* Users who wish to set custom resolutions should refer to the product manual, as available resolutions vary by camera model.
|
||||
*
|
||||
* @param type The video stream type.
|
||||
* @param streamType The video stream type.
|
||||
* @param width The video stream width (default is OB_WIDTH_ANY, which selects the default resolution).
|
||||
* @param height The video stream height (default is OB_HEIGHT_ANY, which selects the default resolution).
|
||||
* @param fps The video stream frame rate (default is OB_FPS_ANY, which selects the default frame rate).
|
||||
@@ -182,7 +182,7 @@ public:
|
||||
* @brief Disable a sensor stream to be used in the pipeline.
|
||||
* @brief Will convert sensor type to stream type automatically.
|
||||
*
|
||||
* @param sensorType
|
||||
* @param sensorType The sensor configuration to be disabled
|
||||
*/
|
||||
void disableStream(OBSensorType sensorType) const {
|
||||
auto streamType = ob::TypeHelper::convertSensorTypeToStreamType(sensorType);
|
||||
@@ -346,7 +346,7 @@ public:
|
||||
/**
|
||||
* @brief Wait for frameset
|
||||
*
|
||||
* @param timeout_ms The waiting timeout in milliseconds
|
||||
* @param timeoutMs The waiting timeout in milliseconds
|
||||
* @return std::shared_ptr<FrameSet> The waiting frameset data
|
||||
*/
|
||||
std::shared_ptr<FrameSet> waitForFrameset(uint32_t timeoutMs = 1000) const {
|
||||
|
||||
@@ -51,9 +51,9 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the format of the stream
|
||||
* @brief Get the format of the stream.
|
||||
*
|
||||
* @return OBFormat return the format of the stream
|
||||
* @return OBFormat return the format of the stream.
|
||||
*/
|
||||
OBFormat getFormat() const {
|
||||
ob_error *error = nullptr;
|
||||
@@ -63,9 +63,9 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the type of stream
|
||||
* @brief Get the type of stream.
|
||||
*
|
||||
* @return OBStreamType return the type of the stream
|
||||
* @return OBStreamType return the type of the stream.
|
||||
*/
|
||||
OBStreamType getType() const {
|
||||
ob_error *error = nullptr;
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the extrinsic parameters from current stream profile to the given target stream profile
|
||||
* @brief Get the extrinsic parameters from current stream profile to the given target stream profile.
|
||||
*
|
||||
* @return OBExtrinsic Return the extrinsic parameters.
|
||||
*/
|
||||
@@ -87,17 +87,41 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check if frame object is compatible with the given type
|
||||
* @brief Set the extrinsic parameters from current stream profile to the given target stream profile.
|
||||
*
|
||||
* @tparam target Target stream profile.
|
||||
* @tparam extrinsic The extrinsic.
|
||||
*/
|
||||
void bindExtrinsicTo(std::shared_ptr<StreamProfile> target, const OBExtrinsic &extrinsic) {
|
||||
ob_error *error = nullptr;
|
||||
ob_stream_profile_set_extrinsic_to(const_cast<ob_stream_profile_t *>(impl_), const_cast<const ob_stream_profile_t *>(target->getImpl()), extrinsic, &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the extrinsic parameters from current stream profile to the given target stream type.
|
||||
*
|
||||
* @tparam targetStreamType Target stream type.
|
||||
* @tparam extrinsic The extrinsic.
|
||||
*/
|
||||
void bindExtrinsicTo(const OBStreamType &targetStreamType, const OBExtrinsic &extrinsic) {
|
||||
ob_error *error = nullptr;
|
||||
ob_stream_profile_set_extrinsic_to_type(const_cast<ob_stream_profile_t *>(impl_),targetStreamType,extrinsic, &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check if frame object is compatible with the given type.
|
||||
*
|
||||
* @tparam T Given type
|
||||
* @return bool return result
|
||||
* @tparam T Given type.
|
||||
* @return bool return result.
|
||||
*/
|
||||
template <typename T> bool is() const;
|
||||
|
||||
/**
|
||||
* @brief Converts object type to target type
|
||||
* @brief Converts object type to target type.
|
||||
*
|
||||
* @tparam T Target type
|
||||
* @tparam T Target type.
|
||||
* @return std::shared_ptr<T> Return the result. Throws an exception if conversion is not possible.
|
||||
*/
|
||||
template <typename T> std::shared_ptr<T> as() {
|
||||
@@ -109,9 +133,9 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Converts object type to target type (const version)
|
||||
* @brief Converts object type to target type (const version).
|
||||
*
|
||||
* @tparam T Target type
|
||||
* @tparam T Target type.
|
||||
* @return std::shared_ptr<T> Return the result. Throws an exception if conversion is not possible.
|
||||
*/
|
||||
template <typename T> std::shared_ptr<const T> as() const {
|
||||
@@ -192,6 +216,17 @@ public:
|
||||
return intrinsic;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the intrinsic parameters of the stream.
|
||||
*
|
||||
* @param intrinsic The intrinsic parameters.
|
||||
*/
|
||||
void setIntrinsic(const OBCameraIntrinsic &intrinsic) {
|
||||
ob_error *error = nullptr;
|
||||
ob_video_stream_profile_set_intrinsic(const_cast<ob_stream_profile_t *>(impl_), intrinsic, &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the distortion parameters of the stream.
|
||||
* @brief Brown distortion model
|
||||
@@ -205,6 +240,17 @@ public:
|
||||
return distortion;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the distortion parameters of the stream.
|
||||
*
|
||||
* @param distortion The distortion parameters.
|
||||
*/
|
||||
void setDistortion(const OBCameraDistortion &distortion) {
|
||||
ob_error *error = nullptr;
|
||||
ob_video_stream_profile_set_distortion(const_cast<ob_stream_profile_t *>(impl_), distortion, &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
public:
|
||||
// The following interfaces are deprecated and are retained here for compatibility purposes.
|
||||
uint32_t fps() const {
|
||||
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
* OB_SENSOR_IR_LEFT,
|
||||
* OB_SENSOR_IR_RIGHT,
|
||||
*
|
||||
* @param type
|
||||
* @param type The sensor type
|
||||
* @return true
|
||||
* @return false
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user