Skip to content

Commit 872d468

Browse files
authored
Merge pull request #22 from orbbec/v1.3.x
release v1.3.0
2 parents 90cf696 + cc84046 commit 872d468

39 files changed

+1943
-1374
lines changed

99-obsensor-libusb.rules

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,12 @@ SUBSYSTEM=="usb", ATTR{idProduct}=="065e", ATTR{idVendor}=="2bc5", MODE:="0666",
8686
SUBSYSTEM=="usb", ATTR{idProduct}=="0698", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video", SYMLINK+="j1"
8787
SUBSYSTEM=="usb", ATTR{idProduct}=="069c", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video", SYMLINK+="TB2201"
8888
SUBSYSTEM=="usb", ATTR{idProduct}=="06a0", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video", SYMLINK+="dabai_dcw2"
89+
SUBSYSTEM=="usb", ATTR{idProduct}=="0561", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video", SYMLINK+="dabai_dcw2_rgb"
8990
SUBSYSTEM=="usb", ATTR{idProduct}=="069f", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video", SYMLINK+="dabai_dw2"
90-
91-
92-
93-
94-
95-
96-
97-
98-
99-
100-
101-
102-
91+
SUBSYSTEM=="usb", ATTR{idProduct}=="069e", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video", SYMLINK+="dabai_max_pro"
92+
SUBSYSTEM=="usb", ATTR{idProduct}=="0560", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video", SYMLINK+="dabai_max_pro_rgb"
93+
SUBSYSTEM=="usb", ATTR{idProduct}=="06aa", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video", SYMLINK+="dabai_gemini_uw"
94+
SUBSYSTEM=="usb", ATTR{idProduct}=="05aa", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video", SYMLINK+="dabai_gemini_uw_rgb"
95+
SUBSYSTEM=="usb", ATTR{idProduct}=="06a6", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video", SYMLINK+="gemini_ew"
96+
SUBSYSTEM=="usb", ATTR{idProduct}=="05a6", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video", SYMLINK+="gemini_ew_rgb"
97+
SUBSYSTEM=="usb", ATTR{idProduct}=="06a7", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video", SYMLINK+="gemini_ew_lite"

CMakeLists.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ endif ()
2020
if (WIN32)
2121
set(ORBBEC_LIB_PREFIX "")
2222
set(ORBBEC_LIB_SUFFIX ".lib")
23+
elseif(APPLE)
24+
set(ORBBEC_LIB_PREFIX "lib")
25+
set(ORBBEC_LIB_SUFFIX ".dylib")
2326
elseif (UNIX)
2427
set(ORBBEC_LIB_PREFIX "lib")
2528
set(ORBBEC_LIB_SUFFIX ".so")
@@ -33,7 +36,7 @@ find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
3336
find_package(pybind11 REQUIRED)
3437
link_directories(${ORBBEC_LIBS})
3538

36-
pybind11_add_module(${PROJECT_NAME} SHARED
39+
pybind11_add_module(${PROJECT_NAME}
3740
src/pyorbbecsdk/pyorbbecsdk.cpp
3841
src/pyorbbecsdk/context.cpp
3942
src/pyorbbecsdk/device.cpp
@@ -91,8 +94,12 @@ endif ()
9194
install(TARGETS ${PROJECT_NAME}
9295
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
9396
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
94-
95-
if (UNIX)
97+
if(APPLE)
98+
install(DIRECTORY ${ORBBEC_LIBS}/
99+
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
100+
FILES_MATCHING PATTERN "*.dylib"
101+
)
102+
elseif (UNIX)
96103
install(DIRECTORY ${ORBBEC_LIBS}/
97104
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
98105
FILES_MATCHING PATTERN "*.so"

cmake/DetermineHostPlatform.cmake

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
set(HOST_PLATFORM "linux_x64")
2-
if (UNIX)
3-
execute_process(COMMAND uname -m OUTPUT_VARIABLE MACHINES)
4-
execute_process(COMMAND getconf LONG_BIT OUTPUT_VARIABLE MACHINES_BIT)
2+
3+
if(APPLE)
4+
set(HOST_PLATFORM "macos")
5+
elseif (UNIX)
6+
execute_process(COMMAND uname -m OUTPUT_VARIABLE MACHINES OUTPUT_STRIP_TRAILING_WHITESPACE)
7+
execute_process(COMMAND getconf LONG_BIT OUTPUT_VARIABLE MACHINES_BIT OUTPUT_STRIP_TRAILING_WHITESPACE)
8+
59
if ((${MACHINES} MATCHES "x86_64") AND (${MACHINES_BIT} MATCHES "64"))
610
set(HOST_PLATFORM "linux_x64")
711
elseif (${MACHINES} MATCHES "arm")
@@ -18,3 +22,4 @@ elseif (WIN32)
1822
set(HOST_PLATFORM "win_x86")
1923
endif ()
2024
endif ()
25+
message(STATUS "Host platform set to: ${HOST_PLATFORM}")

config/OrbbecSDKConfig_v1.0.xml

Lines changed: 1471 additions & 1338 deletions
Large diffs are not rendered by default.

package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<package format="3">
33
<name>pyorbbecsdk</name>
4-
<version>1.2.9</version>
4+
<version>1.3.0</version>
55
<description>
66
pyorbbecsdk is a python wrapper for the orbbec sdk
77
</description>

sdk/include/libobsensor/h/Device.h

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ const char *ob_device_list_get_device_ip_address(ob_device_list *list, uint32_t
9797
/**
9898
* @brief Get the device extension information.
9999
*
100-
* @param[in] info Device Information
100+
* @param[in] list Device list object
101101
* @param[in] index Device index
102102
* @param[out] error Log error messages
103103
* @return const char* The device extension information
@@ -865,6 +865,30 @@ void ob_delete_depth_work_mode_list(ob_depth_work_mode_list *work_mode_list, ob_
865865
*/
866866
void ob_delete_data_bundle(ob_data_bundle *data_bundle, ob_error **error);
867867

868+
/**
869+
* @brief Check if the device supports global timestamp.
870+
*
871+
* @param[in] device The device object.
872+
* @param[out] error Log error messages.
873+
* @return bool Whether the device supports global timestamp.
874+
*/
875+
bool ob_device_is_global_timestamp_supported(ob_device *device, ob_error **error);
876+
877+
/**
878+
* @brief Load depth filter config from file.
879+
* @param[in] device The device object.
880+
* @param[in] file_path Path of the config file.
881+
* @param[out] error Log error messages.
882+
*/
883+
void ob_device_load_depth_filter_config(ob_device *device, const char *file_path, ob_error **error);
884+
885+
/**
886+
* @brief Reset depth filter config to device default define.
887+
* @param[in] device The device object.
888+
* @param[out] error Log error messages.
889+
*/
890+
void ob_device_reset_default_depth_filter_config(ob_device *device, ob_error **error);
891+
868892
#ifdef __cplusplus
869893
}
870894
#endif

sdk/include/libobsensor/h/Frame.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,20 @@ uint64_t ob_frame_time_stamp_us(ob_frame *frame, ob_error **error);
6868
*/
6969
uint64_t ob_frame_system_time_stamp(ob_frame *frame, ob_error **error);
7070

71+
/**
72+
* @brief Get the global timestamp of the frame in microseconds.
73+
* @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
74+
* conversion process base on the device timestamp and can eliminate the timer drift of the device
75+
*
76+
* @attention Only some devices support getting the global timestamp. If the device does not support it, this function will return 0. Check the device support
77+
* status by @ref ob_device_is_global_timestamp_supported() function.
78+
*
79+
* @param[in] frame Frame object
80+
* @param[out] error Log error messages
81+
* @return uint64_t The global timestamp of the frame in microseconds.
82+
*/
83+
uint64_t ob_frame_global_time_stamp_us(ob_frame *frame, ob_error **error);
84+
7185
/**
7286
* @brief Get frame data
7387
*

sdk/include/libobsensor/h/ObTypes.h

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ typedef enum {
161161
OB_SENSOR_IR_LEFT = 6, /**< left IR */
162162
OB_SENSOR_IR_RIGHT = 7, /**< Right IR */
163163
OB_SENSOR_RAW_PHASE = 8, /**< Raw Phase */
164+
OB_SENSOR_COUNT,
164165
} OBSensorType,
165166
ob_sensor_type;
166167

@@ -367,7 +368,7 @@ typedef struct {
367368
typedef struct {
368369
float rot[9]; ///< Rotation matrix
369370
float trans[3]; ///< Transformation matrix
370-
} OBD2CTransform, ob_d2c_transform;
371+
} OBD2CTransform, ob_d2c_transform, OBTransform, ob_transform;
371372

372373
/**
373374
* @brief Structure for camera parameters
@@ -380,6 +381,7 @@ typedef struct {
380381
OBD2CTransform transform; ///< Rotation/transformation matrix
381382
bool isMirrored; ///< Whether the image frame corresponding to this group of parameters is mirrored
382383
} OBCameraParam, ob_camera_param;
384+
383385
/**
384386
* @brief Camera parameters
385387
*/
@@ -392,6 +394,16 @@ typedef struct {
392394
OBD2CTransform transform; ///< Rotation/transformation matrix
393395
} OBCameraParam_V0, ob_camera_param_v0;
394396

397+
/**
398+
* @brief calibration parameters
399+
*/
400+
typedef struct {
401+
OBCameraIntrinsic intrinsics[OB_SENSOR_COUNT]; ///< Sensor internal parameters
402+
OBCameraDistortion distortion[OB_SENSOR_COUNT]; ///< Sensor distortion
403+
OBTransform extrinsics[OB_SENSOR_COUNT][OB_SENSOR_COUNT]; ///< The extrinsic parameters allow 3D coordinate conversions between sensor.To transform from a
404+
///< source to a target 3D coordinate system,under extrinsics[source][target].
405+
} OBCalibrationParam, ob_calibration_param;
406+
395407
/**
396408
* @brief Configuration for depth margin filter
397409
*/
@@ -405,6 +417,21 @@ typedef struct {
405417
bool enable_direction; ///< Set to true for horizontal and vertical, false for horizontal only
406418
} ob_margin_filter_config, OBMarginFilterConfig;
407419

420+
/**
421+
* @brief Configuration for mgc filter
422+
*/
423+
typedef struct {
424+
uint32_t width;
425+
uint32_t height;
426+
int max_width_left;
427+
int max_width_right;
428+
int max_radius;
429+
int margin_x_th;
430+
int margin_y_th;
431+
int limit_x_th;
432+
int limit_y_th;
433+
} OBMGCFilterConfig, ob_mgc_filter_config;
434+
408435
/**
409436
* @brief Alignment mode
410437
*/
@@ -441,6 +468,7 @@ typedef enum {
441468
FORMAT_MJPG_TO_BGRA, /**< MJPG to BGRA */
442469
FORMAT_UYVY_TO_RGB888, /**< UYVY to RGB888 */
443470
FORMAT_BGR_TO_RGB, /**< BGR to RGB */
471+
FORMAT_MJPG_TO_NV12, /**< MJPG to NV12 */
444472
} OBConvertFormat,
445473
ob_convert_format;
446474

@@ -617,7 +645,22 @@ typedef struct {
617645
float x; ///< X coordinate
618646
float y; ///< Y coordinate
619647
float z; ///< Z coordinate
620-
} OBPoint, ob_point;
648+
} OBPoint, ob_point, OBPoint3f, ob_point3f;
649+
650+
/**
651+
* @brief 2D point structure in the SDK
652+
*/
653+
typedef struct {
654+
float x; ///< X coordinate
655+
float y; ///< Y coordinate
656+
} OBPoint2f, ob_point2f;
657+
658+
typedef struct {
659+
float *xTable; ///< table used to compute X coordinate
660+
float *yTable; ///< table used to compute Y coordinate
661+
int width; ///< width of x and y tables
662+
int height; ///< height of x and y tables
663+
} OBXYTables, ob_xy_tables;
621664

622665
/**
623666
* @brief 3D point structure with color information

sdk/include/libobsensor/h/Pipeline.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ ob_camera_param ob_pipeline_get_camera_param_with_profile(ob_pipeline *pipeline,
169169
uint32_t depthHeight, ob_error **error);
170170

171171
/**
172-
* \if English
173172
* @brief Get current camera parameters
174173
* @attention If D2C is enabled, it will return the camera parameters after D2C, if not, it will return to the default parameters
175174
*
@@ -179,6 +178,15 @@ ob_camera_param ob_pipeline_get_camera_param_with_profile(ob_pipeline *pipeline,
179178
*/
180179
ob_camera_param ob_pipeline_get_camera_param(ob_pipeline *pipeline, ob_error **error);
181180

181+
/**
182+
* @brief Get device calibration parameters
183+
*
184+
* @param[in] pipeline pipeline object
185+
* @param[out] error Log error messages
186+
* @return ob_calibration_param The calibration parameters
187+
*/
188+
ob_calibration_param ob_pipeline_get_calibration_param(ob_pipeline *pipeline, ob_config *config, ob_error **error);
189+
182190
/**
183191
* @brief Return a list of D2C-enabled depth sensor resolutions corresponding to the input color sensor resolution
184192
*
@@ -314,7 +322,7 @@ void ob_config_set_d2c_target_resolution(ob_config *config, uint32_t d2c_target_
314322
* can be caused by different frame rates of each stream, or by the loss of frames of one stream): drop directly or output to the user.
315323
*
316324
* @param[in] config The pipeline configuration
317-
* @param[in] mode The frame aggregation output mode to be set (default mode is @ref OB_FRAME_AGGREGATE_OUTPUT_ANY_SITUATION)
325+
* @param[in] mode The frame aggregation output mode to be set (default mode is @ref OB_FRAME_AGGREGATE_OUTPUT_FULL_FRAME_REQUIRE)
318326
* @param[out] error Log error messages
319327
*/
320328
void ob_config_set_frame_aggregate_output_mode(ob_config *config, ob_frame_aggregate_output_mode mode, ob_error **error);

sdk/include/libobsensor/h/Property.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,16 @@ typedef enum {
582582
*/
583583
OB_PROP_COLOR_HDR_BOOL = 2034,
584584

585+
/**
586+
* @brief IR long exposure mode switch read and write.
587+
*/
588+
OB_PROP_IR_LONG_EXPOSURE_BOOL = 2035,
589+
590+
/**
591+
* @brief Setting and getting the USB device frame skipping mode status, true: frame skipping mode, false: non-frame skipping mode.
592+
*/
593+
OB_PROP_SKIP_FRAME_BOOL = 2036,
594+
585595
/**
586596
* @brief Software disparity to depth
587597
*/

0 commit comments

Comments
 (0)