Skip to content

Commit 7f7b973

Browse files
authoredMar 20, 2025
Adding ZED SDK 5.0.0 support (#246)
* Include GPU support from #241
1 parent 55e7520 commit 7f7b973

File tree

6 files changed

+1665
-664
lines changed

6 files changed

+1665
-664
lines changed
 

‎README.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ This package lets you use the ZED stereo camera in Python 3. The Python API is a
1111

1212
To start using the ZED SDK in Python, you will need to install the following dependencies on your system:
1313

14-
- [ZED SDK 4.1](https://www.stereolabs.com/developers/) and its dependency [CUDA](https://developer.nvidia.com/cuda-downloads)
14+
- [ZED SDK 5.0](https://www.stereolabs.com/developers/) and its dependency [CUDA](https://developer.nvidia.com/cuda-downloads)
1515

16-
For the ZED SDK 3.8 compatible version, use the [zedsdk_3.X branch](https://github.com/stereolabs/zed-python-api/tree/zedsdk_3.X) or the [3.8 release tag](https://github.com/stereolabs/zed-python-api/releases/tag/v3.8)
16+
For the ZED SDK 4.2 compatible version, use the [zedsdk_4.X branch](https://github.com/stereolabs/zed-python-api/tree/zedsdk_4.X) or the [4.2 release tag](https://github.com/stereolabs/zed-python-api/releases/tag/v4.2)
1717

18-
- Python 3.7+ x64 ([Windows installer](https://www.python.org/ftp/python/3.7.6/python-3.7.6-amd64.exe))
19-
- [Cython 0.28](http://cython.org/#download)
20-
- [Numpy 1.13](https://www.scipy.org/scipylib/download.html)
18+
- Python 3.8+ x64
19+
- [Cython >= 3.0.0](http://cython.org/#download)
20+
- [Numpy >= 2.0](https://numpy.org/install/)
2121
- OpenCV Python (optional)
2222
- PyOpenGL (optional)
2323

24-
Please check your python version with the following command. The result should be 3.7 or higher.
24+
Please check your python version with the following command. The result should be 3.8 or higher.
2525

2626
```
2727
python --version
@@ -37,7 +37,7 @@ The sample dependencies can also be installed via pip
3737
python -m pip install opencv-python pyopengl
3838
```
3939

40-
**Note:** On Linux, it is advised to use the `python3` command instead of `python` which by default point to python 2.7. To do so, the following packages `python3-dev` and `python3-pip` need to be installed.
40+
**Note:** On Linux, it is advised to use the `python3` command instead of `python` which by default may point to python 2.7. To do so, the following packages `python3-dev` and `python3-pip` need to be installed.
4141

4242
## Installing the Python API
4343

@@ -65,19 +65,19 @@ $ python get_python_api.py
6565
Detected platform:
6666
linux_x86_64
6767
Python 3.11
68-
ZED SDK 4.0
68+
ZED SDK 5.0
6969
# Downloads and install the whl package
70-
-> Checking if https://download.stereolabs.com/zedsdk/4.0/whl/linux_x86_64/pyzed-4.0-cp311-cp311-linux_x86_64.whl exists and is available
71-
-> Found ! Downloading python package into /home/user/pyzed-4.0-cp311-cp311-linux_x86_64.whl
70+
-> Checking if https://download.stereolabs.com/zedsdk/5.0/whl/linux_x86_64/pyzed-5.0-cp311-cp311-linux_x86_64.whl exists and is available
71+
-> Found ! Downloading python package into /home/user/pyzed-5.0-cp311-cp311-linux_x86_64.whl
7272
-> Installing necessary dependencies
7373
...
74-
Successfully installed pyzed-4.0
74+
Successfully installed pyzed-5.0
7575
```
7676
7777
To install it later or on a different environment run :
7878
7979
```bash
80-
$ python -m pip install --ignore-installed /home/user/pyzed-4.0-cp311-cp311-linux_x86_64.wh
80+
$ python -m pip install --ignore-installed /home/user/pyzed-5.0-cp311-cp311-linux_x86_64.wh
8181
```
8282
8383
That's it ! The Python API is now installed.

‎src/README.md

+15-7
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@
66

77
### Prerequisites
88

9-
- [ZED SDK 4.1](https://www.stereolabs.com/developers/) and its dependency [CUDA](https://developer.nvidia.com/cuda-downloads)
10-
- Python 3.7+ x64
11-
- C++ compiler (VS2017 recommended)
12-
- [Cython 0.26](http://cython.org/#download)
13-
- [Numpy 1.13.1](https://www.scipy.org/scipylib/download.html)
9+
- [ZED SDK 5.0](https://www.stereolabs.com/developers/) and its dependency [CUDA](https://developer.nvidia.com/cuda-downloads)
10+
- Python 3.8+ x64
11+
- C++ compiler
12+
- [Cython >= 3.0.0](http://cython.org/#download)
13+
- [Numpy >= 2.0](https://numpy.org/install/)
14+
- CuPy (optional)
1415

15-
The ZED SDK 3.X compatible API can be found in the [zedsdk_3.X branch](https://github.com/stereolabs/zed-python-api/tree/zedsdk_3.X).
16+
The ZED SDK 4.X compatible API can be found in the [zedsdk_4.X branch](https://github.com/stereolabs/zed-python-api/tree/zedsdk_4.X).
1617

17-
Please check your python version with the following command. The result should be 3.7 or higher.
18+
Please check your python version with the following command. The result should be 3.8 or higher.
1819

1920
```
2021
python --version
@@ -37,15 +38,22 @@ pip3 install -r requirements.txt
3738
```
3839
python setup.py build
3940
python setup.py install
41+
python -m pip wheel .
42+
python -m pip install {WHEEL_FILE}.whl --force-reinstall
4043
```
4144

4245
or on Linux
4346

4447
```
4548
python3 setup.py build
4649
python3 setup.py install
50+
python3 -m pip wheel .
51+
python3 -m pip install {WHEEL_FILE}.whl --force-reinstall
4752
```
4853

54+
#### Tips
55+
56+
##### Error on compilation
4957

5058
If an __error__ occurs during the compilation, make sure that you're using the latest [ZED SDK](https://www.stereolabs.com/developers/) and that you installed an x64 version of python. `python -c "import platform; print(platform.architecture())"`
5159

‎src/pyzed/sl.pyx

+1,501-630
Large diffs are not rendered by default.

‎src/pyzed/sl_c.pxd

+121-8
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,17 @@
2121
# File containing the Cython declarations to use the sl functions.
2222

2323
from libcpp.string cimport string
24-
from libc.stdint cimport uint8_t
24+
from libc.stdint cimport uint8_t, uint64_t
2525
from libcpp cimport bool
2626
from libcpp.pair cimport pair
2727
from libcpp.vector cimport vector
2828
from libc.string cimport const_char
2929
from libcpp.map cimport map
3030
from libcpp.unordered_set cimport unordered_set
3131
from libcpp.unordered_map cimport unordered_map
32+
from libcpp.map cimport map
33+
from libcpp.vector cimport vector
34+
3235

3336
cdef extern from "<array>" namespace "std" nogil:
3437
cdef cppclass array6 "std::array<float, 6>":
@@ -118,9 +121,13 @@ cdef extern from "sl/Camera.hpp" namespace "sl":
118121
ZED2i 'sl::MODEL::ZED2i',
119122
ZED_X 'sl::MODEL::ZED_X',
120123
ZED_XM 'sl::MODEL::ZED_XM',
124+
ZED_X_HDR 'sl::MODEL::ZED_X_HDR',
125+
ZED_X_HDR_MINI 'sl::MODEL::ZED_X_HDR_MINI',
126+
ZED_X_HDR_MAX 'sl::MODEL::ZED_X_HDR_MAX',
121127
VIRTUAL_ZED_X 'sl::MODEL::VIRTUAL_ZED_X',
122128
ZED_XONE_GS 'sl::MODEL::ZED_XONE_GS',
123129
ZED_XONE_UHD 'sl::MODEL::ZED_XONE_UHD',
130+
ZED_XONE_HDR 'sl::MODEL::ZED_XONE_HDR',
124131
MODEL_LAST 'sl::MODEL::LAST'
125132

126133
String toString(MODEL o)
@@ -145,9 +152,16 @@ cdef extern from "sl/Camera.hpp" namespace "sl":
145152
CAMERA_STATE camera_state
146153
int id
147154
String path
155+
int i2c_port
148156
MODEL camera_model
149157
unsigned int serial_number
158+
unsigned char identifier[]
159+
String camera_badge
160+
String camera_sensor_model
161+
String camera_name
150162
INPUT_TYPE input_type
163+
unsigned char sensor_address_left
164+
unsigned char sensor_address_right
151165

152166
String toString(DeviceProperties o)
153167

@@ -269,6 +283,7 @@ cdef extern from "sl/Camera.hpp" namespace "sl":
269283
HD2K 'sl::RESOLUTION::HD2K'
270284
HD1080 'sl::RESOLUTION::HD1080'
271285
HD1200 'sl::RESOLUTION::HD1200'
286+
HD1536 'sl::RESOLUTION::HD1536'
272287
HD720 'sl::RESOLUTION::HD720'
273288
SVGA 'sl::RESOLUTION::SVGA'
274289
VGA 'sl::RESOLUTION::VGA'
@@ -308,6 +323,7 @@ cdef extern from "sl/Camera.hpp" namespace "sl":
308323
PERFORMANCE 'sl::DEPTH_MODE::PERFORMANCE'
309324
QUALITY 'sl::DEPTH_MODE::QUALITY'
310325
ULTRA 'sl::DEPTH_MODE::ULTRA'
326+
NEURAL_LIGHT 'sl::DEPTH_MODE::NEURAL_LIGHT'
311327
NEURAL 'sl::DEPTH_MODE::NEURAL'
312328
NEURAL_PLUS 'sl::DEPTH_MODE::NEURAL_PLUS'
313329
DEPTH_MODE_LAST 'sl::DEPTH_MODE::LAST'
@@ -454,6 +470,7 @@ cdef extern from "sl/Camera.hpp" namespace "sl":
454470
ctypedef enum POSITIONAL_TRACKING_MODE 'sl::POSITIONAL_TRACKING_MODE':
455471
GEN_1 'sl::POSITIONAL_TRACKING_MODE::GEN_1'
456472
GEN_2 'sl::POSITIONAL_TRACKING_MODE::GEN_2'
473+
GEN_3 'sl::POSITIONAL_TRACKING_MODE::GEN_3'
457474

458475
String toString(POSITIONAL_TRACKING_MODE o)
459476

@@ -537,6 +554,7 @@ cdef extern from "sl/Camera.hpp" namespace "sl":
537554
PERSON_HEAD_DETECTION 'sl::AI_MODELS::PERSON_HEAD_DETECTION'
538555
PERSON_HEAD_ACCURATE_DETECTION 'sl::AI_MODELS::PERSON_HEAD_ACCURATE_DETECTION'
539556
REID_ASSOCIATION 'sl::AI_MODELS::REID_ASSOCIATION'
557+
NEURAL_LIGHT_DEPTH 'sl::AI_MODELS::NEURAL_LIGHT_DEPTH'
540558
NEURAL_DEPTH 'sl::AI_MODELS::NEURAL_DEPTH'
541559
NEURAL_PLUS_DEPTH 'sl::AI_MODELS::NEURAL_PLUS_DEPTH'
542560
LAST 'sl::AI_MODELS::LAST'
@@ -565,6 +583,13 @@ cdef extern from "sl/Camera.hpp" namespace "sl":
565583
NMS3D_PER_CLASS 'sl::OBJECT_FILTERING_MODE::NMS3D_PER_CLASS'
566584
LAST 'sl::OBJECT_FILTERING_MODE::LAST'
567585

586+
ctypedef enum OBJECT_ACCELERATION_PRESET 'sl::OBJECT_ACCELERATION_PRESET':
587+
ACC_PRESET_DEFAULT 'sl::OBJECT_ACCELERATION_PRESET::DEFAULT'
588+
ACC_PRESET_LOW 'sl::OBJECT_ACCELERATION_PRESET::LOW'
589+
ACC_PRESET_MEDIUM 'sl::OBJECT_ACCELERATION_PRESET::MEDIUM'
590+
ACC_PRESET_HIGH 'sl::OBJECT_ACCELERATION_PRESET::HIGH'
591+
ACC_PRESET_LAST 'sl::OBJECT_ACCELERATION_PRESET::LAST'
592+
568593
cdef struct RecordingStatus:
569594
bool is_recording
570595
bool is_paused
@@ -580,8 +605,8 @@ cdef extern from "sl/Camera.hpp" namespace "sl":
580605
Timestamp getCurrentTimeStamp()
581606

582607
cdef struct Resolution:
583-
size_t width
584-
size_t height
608+
int width
609+
int height
585610

586611
cdef cppclass Rect 'sl::Rect':
587612
size_t x
@@ -650,14 +675,36 @@ cdef extern from "sl/Camera.hpp" namespace "sl":
650675
CameraConfiguration camera_configuration
651676
SensorsConfiguration sensors_configuration
652677

678+
679+
cdef struct CameraOneConfiguration:
680+
CameraParameters calibration_parameters
681+
CameraParameters calibration_parameters_raw
682+
unsigned int firmware_version
683+
float fps
684+
Resolution resolution
685+
686+
687+
cdef struct CameraOneInformation:
688+
unsigned int serial_number
689+
MODEL camera_model
690+
INPUT_TYPE input_type
691+
CameraOneConfiguration camera_configuration
692+
SensorsConfiguration sensors_configuration
693+
694+
653695
ctypedef enum MEM 'sl::MEM':
654696
CPU 'sl::MEM::CPU'
697+
GPU 'sl::MEM::GPU'
698+
BOTH 'sl::MEM::BOTH'
655699

656700
MEM operator|(MEM a, MEM b)
657701

658702

659703
ctypedef enum COPY_TYPE 'sl::COPY_TYPE':
660704
CPU_CPU 'sl::COPY_TYPE::CPU_CPU'
705+
GPU_CPU 'sl::COPY_TYPE::GPU_CPU'
706+
CPU_GPU 'sl::COPY_TYPE::CPU_GPU'
707+
GPU_GPU 'sl::COPY_TYPE::GPU_GPU'
661708

662709
ctypedef enum MAT_TYPE 'sl::MAT_TYPE':
663710
F32_C1 'sl::MAT_TYPE::F32_C1'
@@ -794,6 +841,11 @@ cdef extern from "sl/Camera.hpp" namespace "sl":
794841
bool is_static
795842
float tracking_timeout
796843
float tracking_max_dist
844+
float max_box_width_meters
845+
float min_box_width_meters
846+
float max_box_height_meters
847+
float min_box_height_meters
848+
float max_allowed_acceleration
797849

798850
cdef cppclass CustomMaskObjectData 'sl::CustomMaskObjectData':
799851
String unique_object_id
@@ -804,6 +856,11 @@ cdef extern from "sl/Camera.hpp" namespace "sl":
804856
bool is_static
805857
float tracking_timeout
806858
float tracking_max_dist
859+
float max_box_width_meters
860+
float min_box_width_meters
861+
float max_box_height_meters
862+
float min_box_height_meters
863+
float max_allowed_acceleration
807864
Mat box_mask
808865

809866
cdef cppclass ObjectsBatch 'sl::ObjectsBatch':
@@ -997,6 +1054,8 @@ cdef extern from "sl/Camera.hpp" namespace "sl":
9971054
void free(MEM memory_type)
9981055
Mat &operator=(const Mat &that)
9991056
ERROR_CODE copyTo(Mat &dst, COPY_TYPE cpyType) const
1057+
ERROR_CODE updateCPUfromGPU()
1058+
ERROR_CODE updateGPUfromCPU()
10001059
ERROR_CODE setFrom(const Mat &src, COPY_TYPE cpyType) const
10011060
ERROR_CODE read(const char* filePath)
10021061
ERROR_CODE write(const char* filePath, MEM memory_type, int compression_level)
@@ -1015,10 +1074,18 @@ cdef extern from "sl/Camera.hpp" namespace "sl":
10151074
bool isMemoryOwner()
10161075
ERROR_CODE clone(const Mat &src)
10171076
ERROR_CODE move(Mat &dst)
1077+
ERROR_CODE convertColor(MEM memory_type)
10181078

10191079
@staticmethod
10201080
void swap(Mat &mat1, Mat &mat2)
10211081

1082+
@staticmethod
1083+
ERROR_CODE convertColor(Mat &mat1, Mat &mat2, bool swap_RB_channels, bool remove_alpha_channels, MEM memory_type)
1084+
1085+
1086+
cdef ERROR_CODE blobFromImage(Mat &mat1, Mat &mat2, Resolution resolution, float scale, Vector3[float] mean, Vector3[float] stdev, bool keep_aspect_ratio, bool swap_RB_channels)
1087+
cdef ERROR_CODE blobFromImages(vector[Mat] &mats, Mat &mat2, Resolution resolution, float scale, Vector3[float] mean, Vector3[float] stdev, bool keep_aspect_ratio, bool swap_RB_channels)
1088+
10221089
cdef cppclass Rotation(Matrix3f):
10231090
Rotation() except +
10241091
Rotation(const Rotation &rotation) except +
@@ -1328,6 +1395,7 @@ cdef extern from 'sl/Camera.hpp' namespace 'sl':
13281395
float grab_compute_capping_fps
13291396
bool async_image_retrieval
13301397
int enable_image_validity_check
1398+
Resolution maximum_working_resolution
13311399

13321400
InitParameters(RESOLUTION camera_resolution,
13331401
int camera_fps,
@@ -1354,7 +1422,8 @@ cdef extern from 'sl/Camera.hpp' namespace 'sl':
13541422
bool async_grab_camera_recovery,
13551423
float grab_compute_capping_fps,
13561424
bool async_image_retrieval,
1357-
int enable_image_validity_check)
1425+
int enable_image_validity_check,
1426+
Resolution maximum_working_resolution)
13581427

13591428
bool save(String filename)
13601429
bool load(String filename)
@@ -1534,6 +1603,13 @@ cdef extern from 'sl/Camera.hpp' namespace 'sl':
15341603
float min_box_width_normalized
15351604
float max_box_height_normalized
15361605
float min_box_height_normalized
1606+
float max_box_width_meters
1607+
float min_box_width_meters
1608+
float max_box_height_meters
1609+
float min_box_height_meters
1610+
OBJECT_SUBCLASS native_mapped_class
1611+
OBJECT_ACCELERATION_PRESET object_acceleration_preset
1612+
float max_allowed_acceleration
15371613
CustomObjectDetectionProperties(bool enabled,
15381614
float detection_confidence_threshold,
15391615
bool is_grounded,
@@ -1543,7 +1619,14 @@ cdef extern from 'sl/Camera.hpp' namespace 'sl':
15431619
float max_box_width_normalized,
15441620
float min_box_width_normalized,
15451621
float max_box_height_normalized,
1546-
float min_box_height_normalized)
1622+
float min_box_height_normalized,
1623+
float max_box_width_meters,
1624+
float min_box_width_meters,
1625+
float max_box_height_meters,
1626+
float min_box_height_meters,
1627+
OBJECT_SUBCLASS native_mapped_class,
1628+
OBJECT_ACCELERATION_PRESET object_acceleration_preset,
1629+
float max_allowed_acceleration)
15471630

15481631
cdef cppclass CustomObjectDetectionRuntimeParameters:
15491632
CustomObjectDetectionProperties object_detection_properties
@@ -1611,6 +1694,14 @@ cdef extern from 'sl/Camera.hpp' namespace 'sl':
16111694
float twist[6]
16121695
float twist_covariance[36]
16131696

1697+
cdef cppclass Landmark:
1698+
unsigned long long id
1699+
Vector3[float] position
1700+
1701+
cdef cppclass Landmark2D:
1702+
unsigned long long id
1703+
Vector2[unsigned int] image_position
1704+
16141705
ctypedef enum CAMERA_MOTION_STATE 'sl::SensorsData::CAMERA_MOTION_STATE':
16151706
STATIC 'sl::SensorsData::CAMERA_MOTION_STATE::STATIC'
16161707
MOVING 'sl::SensorsData::CAMERA_MOTION_STATE::MOVING'
@@ -1695,6 +1786,13 @@ cdef extern from 'sl/Camera.hpp' namespace 'sl':
16951786

16961787
Resolution getResolution(RESOLUTION resolution)
16971788

1789+
cdef cppclass HealthStatus:
1790+
bool enabled
1791+
bool low_image_quality
1792+
bool low_lighting
1793+
bool low_depth_reliability
1794+
bool low_motion_sensors_reliability
1795+
16981796
cdef cppclass Camera 'sl::Camera':
16991797
Camera()
17001798
void close()
@@ -1703,6 +1801,7 @@ cdef extern from 'sl/Camera.hpp' namespace 'sl':
17031801
InitParameters getInitParameters()
17041802

17051803
bool isOpened()
1804+
ERROR_CODE read()
17061805
ERROR_CODE grab(RuntimeParameters rt_parameters)
17071806

17081807
RuntimeParameters getRuntimeParameters()
@@ -1748,6 +1847,8 @@ cdef extern from 'sl/Camera.hpp' namespace 'sl':
17481847
ERROR_CODE enablePositionalTracking(PositionalTrackingParameters tracking_params)
17491848
POSITIONAL_TRACKING_STATE getPosition(Pose &camera_pose, REFERENCE_FRAME reference_frame)
17501849
PositionalTrackingStatus getPositionalTrackingStatus()
1850+
ERROR_CODE getPositionalTrackingLandmarks(map[uint64_t, Landmark] & landmarks)
1851+
ERROR_CODE getPositionalTrackingLandmarks2D(vector[Landmark2D] & current_2d_landmarks)
17511852
ERROR_CODE saveAreaMap(String area_file_path)
17521853
AREA_EXPORTING_STATE getAreaExportState()
17531854

@@ -1793,6 +1894,7 @@ cdef extern from 'sl/Camera.hpp' namespace 'sl':
17931894
ERROR_CODE enableObjectDetection(ObjectDetectionParameters object_detection_parameters)
17941895
void disableObjectDetection(unsigned int instance_module_id, bool force_disable_all_instances)
17951896
ERROR_CODE retrieveObjects(Objects &objects, ObjectDetectionRuntimeParameters parameters, unsigned int instance_module_id)
1897+
ERROR_CODE retrieveCustomObjects(Objects &objects, CustomObjectDetectionRuntimeParameters parameters, unsigned int instance_module_id)
17961898
ERROR_CODE getObjectsBatch(vector[ObjectsBatch] &trajectories, unsigned int instance_module_id)
17971899
bool isObjectDetectionEnabled(unsigned int instance_id)
17981900
ERROR_CODE ingestCustomBoxObjects(const vector[CustomBoxObjectData] &objects_in, const unsigned int instance_module_id)
@@ -1808,6 +1910,11 @@ cdef extern from 'sl/Camera.hpp' namespace 'sl':
18081910
bool isBodyTrackingEnabled(unsigned int instance_id)
18091911
BodyTrackingParameters getBodyTrackingParameters(unsigned int instance_id)
18101912

1913+
HealthStatus getHealthStatus()
1914+
1915+
Resolution getRetrieveImageResolution(Resolution res)
1916+
Resolution getRetrieveMeasureResolution(Resolution res)
1917+
18111918
@staticmethod
18121919
String getSDKVersion()
18131920

@@ -1865,13 +1972,18 @@ cdef extern from "sl/Fusion.hpp" namespace "sl":
18651972
bool output_performance_metrics
18661973
bool verbose
18671974
unsigned timeout_period_number
1975+
int sdk_gpu_id
1976+
CUcontext sdk_cuda_ctx
18681977
SynchronizationParameter synchronization_parameters
1978+
18691979
InitFusionParameters(
18701980
UNIT coordinate_units_,
18711981
COORDINATE_SYSTEM coordinate_system_,
18721982
bool output_performance_metrics,
18731983
bool verbose_,
18741984
unsigned timeout_period_number,
1985+
int sdk_gpu_id,
1986+
CUcontext sdk_cuda_ctx,
18751987
SynchronizationParameter synchronization_parameters_
18761988
)
18771989

@@ -2068,7 +2180,6 @@ cdef extern from "sl/CameraOne.hpp" namespace "sl":
20682180
String sdk_verbose_log_file
20692181
InputType input
20702182
String optional_settings_path
2071-
float open_timeout_sec
20722183
bool async_grab_camera_recovery
20732184

20742185
cdef cppclass CameraOne 'sl::CameraOne':
@@ -2102,7 +2213,7 @@ cdef extern from "sl/CameraOne.hpp" namespace "sl":
21022213
float getCurrentFPS()
21032214
Timestamp getTimestamp(TIME_REFERENCE reference_time)
21042215
unsigned int getFrameDroppedCount()
2105-
CameraInformation getCameraInformation(Resolution resizer)
2216+
CameraOneInformation getCameraInformation(Resolution resizer)
21062217

21072218
ERROR_CODE enableRecording(RecordingParameters recording_params)
21082219

@@ -2111,8 +2222,10 @@ cdef extern from "sl/CameraOne.hpp" namespace "sl":
21112222

21122223
RecordingStatus getRecordingStatus()
21132224
void pauseRecording(bool status)
2114-
21152225
void disableRecording()
2226+
ERROR_CODE ingestDataIntoSVO(SVOData& data)
2227+
ERROR_CODE retrieveSVOData(string &key, map[Timestamp, SVOData] &data, Timestamp ts_begin, Timestamp ts_end)
2228+
vector[string] getSVODataKeys()
21162229

21172230
ERROR_CODE enableStreaming(StreamingParameters streaming_parameters)
21182231
void disableStreaming()

‎src/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
cython >= 3.0.0
2-
numpy >= 1.13
2+
numpy >= 2.0
33
wheel

‎src/setup.py

+15-6
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
libs = ""
3737
cflags = ""
3838

39-
ZED_SDK_MAJOR = "4"
39+
ZED_SDK_MAJOR = "5"
4040
ZED_SDK_MINOR = "0"
4141

4242
cuda_path = "/usr/local/cuda"
@@ -72,7 +72,7 @@ def check_zed_sdk_version(file_path_):
7272
dev_file_path = file_path_ + "/sl_zed/defines.hpp"
7373
file_path = file_path_ + "/sl/Camera.hpp"
7474
if os.path.isfile(dev_file_path):
75-
# internal dev mode
75+
# internal dev mode
7676
check_zed_sdk_version_private(dev_file_path)
7777
else:
7878
check_zed_sdk_version_private(file_path)
@@ -194,17 +194,26 @@ def create_extension(name, sources):
194194
extList = cythonize(extension, compiler_directives=cython_directives)
195195
extensions.extend(extList)
196196

197+
install_requires = [
198+
'cython>=3.0.0'
199+
]
200+
201+
if (sys.version_info.major, sys.version_info.minor) <= (3, 8):
202+
install_requires.append('numpy>=1.13, <2.0')
203+
else:
204+
install_requires.append('numpy>=2.0')
205+
206+
print(install_requires)
207+
197208
setup(name="pyzed",
198209
version= ZED_SDK_MAJOR + "." + ZED_SDK_MINOR,
199210
author_email="developers@stereolabs.com",
200211
description="Use the ZED SDK with Python",
201212
url='https://github.com/stereolabs/zed-python-api',
202213
packages=py_packages,
203214
ext_modules=extensions,
204-
python_requires='>=3.6',
205-
install_requires=[
206-
'numpy>=1.13, <2.0',
207-
'cython>=3.0.0'],
215+
python_requires='>=3.8',
216+
install_requires=install_requires,
208217
extras_require={
209218
'sample': [
210219
'opencv-python',

0 commit comments

Comments
 (0)
Please sign in to comment.