├── .github ├── ISSUE_TEMPLATE │ ├── 1_feature_request.yml │ ├── 2_bug_report.yml │ └── config.yml └── workflows │ └── stale_issues.yml ├── .gitignore ├── CMakeLists.txt ├── LICENSE ├── README.md ├── body tracking ├── README.md ├── body tracking │ ├── README.md │ ├── body_tracking.jpg │ ├── cpp │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── include │ │ │ ├── GLViewer.hpp │ │ │ └── TrackingViewer.hpp │ │ └── src │ │ │ ├── GLViewer.cpp │ │ │ ├── TrackingViewer.cpp │ │ │ └── main.cpp │ ├── csharp │ │ ├── App.config │ │ ├── CMakeLists.txt │ │ ├── GLViewer.cs │ │ ├── MainWindow.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ ├── AssemblyInfo.cs │ │ │ ├── Resources.Designer.cs │ │ │ ├── Resources.resx │ │ │ ├── Settings.Designer.cs │ │ │ └── Settings.settings │ │ ├── README.md │ │ ├── TrackingViewer.cs │ │ ├── Utils.cs │ │ └── packages.config │ └── python │ │ ├── README.md │ │ ├── body_tracking.py │ │ ├── cv_viewer │ │ ├── tracking_viewer.py │ │ └── utils.py │ │ └── ogl_viewer │ │ └── viewer.py ├── export │ ├── JSON export │ │ ├── cpp │ │ │ ├── CMakeLists.txt │ │ │ ├── README.md │ │ │ ├── include │ │ │ │ ├── GLViewer.hpp │ │ │ │ ├── SK_Serializer.hpp │ │ │ │ └── json.hpp │ │ │ └── src │ │ │ │ ├── GLViewer.cpp │ │ │ │ ├── SK_Serializer.cpp │ │ │ │ └── main.cpp │ │ └── python │ │ │ ├── json_export.py │ │ │ └── ogl_viewer │ │ │ └── viewer.py │ └── fbx export │ │ └── cpp │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── include │ │ └── utils.hpp │ │ └── src │ │ └── main.cpp ├── integrations │ └── README.md └── multi-camera │ ├── cpp │ ├── CMakeLists.txt │ ├── include │ │ ├── ClientPublisher.hpp │ │ ├── GLViewer.hpp │ │ └── utils.hpp │ └── src │ │ ├── ClientPublisher.cpp │ │ ├── GLViewer.cpp │ │ └── main.cpp │ ├── csharp │ ├── App.config │ ├── CMakeLists.txt │ ├── ClientPublisher.cs │ ├── GLViewer.cs │ ├── MainWindow.cs │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── README.md │ └── packages.config │ └── python │ ├── fused_cameras.py │ └── ogl_viewer │ └── viewer.py ├── camera control ├── README.md ├── cpp │ ├── CMakeLists.txt │ ├── README.md │ └── src │ │ └── main.cpp ├── csharp │ ├── App.config │ ├── CMakeLists.txt │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── README.md │ └── packages.config └── python │ ├── README.md │ └── camera_control.py ├── camera streaming ├── README.md ├── receiver │ ├── README.md │ ├── cpp │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ └── src │ │ │ └── main.cpp │ └── python │ │ ├── README.md │ │ └── streaming_receiver.py └── sender │ ├── README.md │ ├── cpp │ ├── CMakeLists.txt │ ├── README.md │ ├── include │ │ └── utils.hpp │ └── src │ │ └── main.cpp │ └── python │ ├── README.md │ └── streaming_sender.py ├── depth sensing ├── README.md ├── automatic region of interest │ ├── cpp │ │ ├── CMakeLists.txt │ │ └── src │ │ │ └── main.cpp │ └── python │ │ └── automatic_region_of_interest.py ├── depth sensing │ ├── README.md │ ├── cpp │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── include │ │ │ └── GLViewer.hpp │ │ └── src │ │ │ ├── GLViewer.cpp │ │ │ └── main.cpp │ ├── csharp │ │ ├── App.config │ │ ├── CMakeLists.txt │ │ ├── GLViewer.cs │ │ ├── MainWindow.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ ├── AssemblyInfo.cs │ │ │ ├── Resources.Designer.cs │ │ │ ├── Resources.resx │ │ │ ├── Settings.Designer.cs │ │ │ └── Settings.settings │ │ ├── README.md │ │ └── packages.config │ ├── depth_sensing.jpg │ └── python │ │ ├── README.md │ │ ├── depth_sensing.py │ │ └── ogl_viewer │ │ └── viewer.py ├── export │ └── cpp │ │ ├── CMakeLists.txt │ │ └── main.cpp ├── fusion │ └── cpp │ │ ├── CMakeLists.txt │ │ ├── include │ │ ├── ClientPublisher.hpp │ │ ├── GLViewer.hpp │ │ └── utils.hpp │ │ └── src │ │ ├── ClientPublisher.cpp │ │ ├── GLViewer.cpp │ │ └── main.cpp ├── image refocus │ └── cpp │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── include │ │ └── dof_gpu.h │ │ └── src │ │ ├── dof_gpu.cu │ │ └── main.cpp ├── manual region of interest │ ├── README.md │ └── cpp │ │ ├── CMakeLists.txt │ │ └── src │ │ └── main.cpp └── multi camera │ ├── README.md │ ├── cpp │ ├── CMakeLists.txt │ ├── README.md │ └── src │ │ └── main.cpp │ └── python │ └── multi_camera.py ├── global localization ├── README.md ├── live │ ├── README.md │ ├── cpp │ │ ├── CMakeLists.txt │ │ ├── cmake │ │ │ └── FindGPS.cmake │ │ ├── include │ │ │ ├── display │ │ │ │ ├── GLViewer.hpp │ │ │ │ └── GenericDisplay.h │ │ │ ├── exporter │ │ │ │ └── KMLExporter.h │ │ │ ├── gnss_reader │ │ │ │ ├── GPSDReader.hpp │ │ │ │ └── IGNSSReader.h │ │ │ └── json.hpp │ │ └── src │ │ │ ├── display │ │ │ ├── GLViewer.cpp │ │ │ └── GenericDisplay.cpp │ │ │ ├── exporter │ │ │ └── KMLExporter.cpp │ │ │ ├── gnss_reader │ │ │ └── GPSDReader.cpp │ │ │ └── main.cpp │ └── python │ │ ├── display │ │ ├── generic_display.py │ │ └── gl_viewer.py │ │ ├── exporter │ │ └── KMLExporter.py │ │ ├── gnss_reader │ │ └── gpsd_reader.py │ │ ├── live.py │ │ └── requirements.txt ├── map server │ ├── README.md │ ├── assets │ │ ├── css │ │ │ └── index.css │ │ ├── favicon.ico │ │ ├── leaflet-elipse │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── l.ellipse.js │ │ │ ├── l.ellipse.min.js │ │ │ └── package.json │ │ └── leaflet │ │ │ ├── images │ │ │ └── layers.png │ │ │ ├── leaflet.css │ │ │ └── leaflet.js │ └── index.html ├── playback │ ├── README.md │ ├── cpp │ │ ├── CMakeLists.txt │ │ ├── cmake │ │ │ └── FindGPS.cmake │ │ ├── include │ │ │ ├── GNSSReplay.hpp │ │ │ ├── display │ │ │ │ ├── GLViewer.hpp │ │ │ │ └── GenericDisplay.h │ │ │ ├── exporter │ │ │ │ └── KMLExporter.h │ │ │ └── json.hpp │ │ └── src │ │ │ ├── GNSSReplay.cpp │ │ │ ├── display │ │ │ ├── GLViewer.cpp │ │ │ └── GenericDisplay.cpp │ │ │ ├── exporter │ │ │ └── KMLExporter.cpp │ │ │ └── main.cpp │ └── python │ │ ├── display │ │ ├── generic_display.py │ │ └── gl_viewer.py │ │ ├── exporter │ │ └── KMLExporter.py │ │ ├── gnss_replay.py │ │ ├── playback.py │ │ └── requirements.txt └── recording │ ├── README.md │ ├── cpp │ ├── CMakeLists.txt │ ├── cmake │ │ └── FindGPS.cmake │ ├── include │ │ ├── display │ │ │ ├── GLViewer.hpp │ │ │ └── GenericDisplay.h │ │ ├── exporter │ │ │ ├── GNSSSaver.h │ │ │ └── KMLExporter.h │ │ ├── gnss_reader │ │ │ ├── GPSDReader.hpp │ │ │ └── IGNSSReader.h │ │ ├── json.hpp │ │ └── utils.hpp │ └── src │ │ ├── display │ │ ├── GLViewer.cpp │ │ └── GenericDisplay.cpp │ │ ├── exporter │ │ ├── GNSSSaver.cpp │ │ └── KMLExporter.cpp │ │ ├── gnss_reader │ │ └── GPSDReader.cpp │ │ ├── main.cpp │ │ └── utils.cpp │ └── python │ ├── display │ ├── generic_display.py │ └── gl_viewer.py │ ├── exporter │ ├── KMLExporter.py │ └── gnss_saver.py │ ├── gnss_reader │ └── gpsd_reader.py │ ├── ogl_viewer │ └── tracking_viewer.py │ ├── recording.py │ └── requirements.txt ├── object detection ├── README.md ├── birds eye viewer │ ├── README.md │ ├── cpp │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── include │ │ │ ├── GLViewer.hpp │ │ │ ├── TrackingViewer.hpp │ │ │ └── utils.hpp │ │ └── src │ │ │ ├── GLViewer.cpp │ │ │ ├── TrackingViewer.cpp │ │ │ └── main.cpp │ ├── csharp │ │ ├── App.config │ │ ├── BatchSystemHandler.cs │ │ ├── CMakeLists.txt │ │ ├── GLViewer.cs │ │ ├── MainWindow.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ ├── AssemblyInfo.cs │ │ │ ├── Resources.Designer.cs │ │ │ ├── Resources.resx │ │ │ ├── Settings.Designer.cs │ │ │ └── Settings.settings │ │ ├── README.md │ │ ├── TrackingViewer.cs │ │ ├── Utils.cs │ │ └── packages.config │ ├── object_detection.jpg │ └── python │ │ ├── README.md │ │ ├── cv_viewer │ │ ├── tracking_viewer.py │ │ └── utils.py │ │ ├── object_detection_birds_view.py │ │ └── ogl_viewer │ │ └── viewer.py ├── concurrent detections │ ├── README.md │ ├── cpp │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── include │ │ │ ├── GLViewer.hpp │ │ │ ├── TrackingViewer.hpp │ │ │ └── utils.hpp │ │ └── src │ │ │ ├── GLViewer.cpp │ │ │ ├── TrackingViewer.cpp │ │ │ └── main.cpp │ └── python │ │ ├── README.md │ │ ├── concurrent_object_detection_body_tracking.py │ │ ├── cv_viewer │ │ ├── tracking_viewer.py │ │ └── utils.py │ │ └── ogl_viewer │ │ └── viewer.py ├── custom detector │ ├── cpp │ │ ├── opencv_dnn_yolov4 │ │ │ ├── CMakeLists.txt │ │ │ ├── README.md │ │ │ ├── coco.names.txt │ │ │ ├── include │ │ │ │ ├── GLViewer.hpp │ │ │ │ └── utils.hpp │ │ │ ├── src │ │ │ │ ├── GLViewer.cpp │ │ │ │ └── main.cpp │ │ │ └── yolov4.cfg │ │ ├── tensorrt_yolov5-v6-v8_onnx │ │ │ ├── CMakeLists.txt │ │ │ ├── README.md │ │ │ ├── include │ │ │ │ ├── GLViewer.hpp │ │ │ │ ├── cuda_utils.h │ │ │ │ ├── logging.h │ │ │ │ ├── utils.h │ │ │ │ └── yolo.hpp │ │ │ └── src │ │ │ │ ├── GLViewer.cpp │ │ │ │ ├── main.cpp │ │ │ │ └── yolo.cpp │ │ ├── tensorrt_yolov5-v6-v8_onnx_async │ │ │ ├── CMakeLists.txt │ │ │ ├── README.md │ │ │ ├── include │ │ │ │ ├── GLViewer.hpp │ │ │ │ ├── cuda_utils.h │ │ │ │ ├── logging.h │ │ │ │ ├── utils.h │ │ │ │ └── yolo.hpp │ │ │ └── src │ │ │ │ ├── GLViewer.cpp │ │ │ │ ├── main.cpp │ │ │ │ └── yolo.cpp │ │ ├── tensorrt_yolov5-v6-v8_onnx_internal │ │ │ ├── CMakeLists.txt │ │ │ ├── README.md │ │ │ ├── include │ │ │ │ ├── GLViewer.hpp │ │ │ │ └── utils.h │ │ │ └── src │ │ │ │ ├── GLViewer.cpp │ │ │ │ └── main.cpp │ │ └── tensorrt_yolov8_seg_onnx │ │ │ ├── CMakeLists.txt │ │ │ ├── README.md │ │ │ ├── include │ │ │ ├── GLViewer.hpp │ │ │ ├── utils.h │ │ │ ├── yolov8-seg.hpp │ │ │ ├── yolov8-seg_common.hpp │ │ │ └── yolov8-seg_optim.hpp │ │ │ └── src │ │ │ ├── GLViewer.cpp │ │ │ ├── main.cpp │ │ │ └── yolov8-seg_optim.cpp │ └── python │ │ ├── pytorch_yolov5 │ │ ├── README.md │ │ ├── cv_viewer │ │ │ ├── tracking_viewer.py │ │ │ └── utils.py │ │ ├── detector.py │ │ └── ogl_viewer │ │ │ └── viewer.py │ │ ├── pytorch_yolov8 │ │ ├── README.md │ │ ├── cv_viewer │ │ │ ├── tracking_viewer.py │ │ │ └── utils.py │ │ ├── detector.py │ │ └── ogl_viewer │ │ │ └── viewer.py │ │ ├── pytorch_yolov8_async │ │ ├── README.md │ │ ├── cv_viewer │ │ │ ├── tracking_viewer.py │ │ │ └── utils.py │ │ ├── detector.py │ │ └── ogl_viewer │ │ │ └── viewer.py │ │ ├── pytorch_yolov8_seg │ │ ├── README.md │ │ ├── cv_viewer │ │ │ ├── tracking_viewer.py │ │ │ └── utils.py │ │ ├── detector.py │ │ └── ogl_viewer │ │ │ └── viewer.py │ │ └── yolov5-v6-v8_onnx_internal │ │ ├── README.md │ │ ├── custom_internal_detector.py │ │ ├── cv_viewer │ │ ├── tracking_viewer.py │ │ └── utils.py │ │ └── ogl_viewer │ │ └── viewer.py ├── image viewer │ ├── README.md │ ├── cpp │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── include │ │ │ └── GLViewer.hpp │ │ └── src │ │ │ ├── GLViewer.cpp │ │ │ └── main.cpp │ ├── csharp │ │ ├── App.config │ │ ├── CMakeLists.txt │ │ ├── GLViewer.cs │ │ ├── MainWindow.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ ├── AssemblyInfo.cs │ │ │ ├── Resources.Designer.cs │ │ │ ├── Resources.resx │ │ │ ├── Settings.Designer.cs │ │ │ └── Settings.settings │ │ ├── README.md │ │ └── packages.config │ ├── object_detection.jpg │ └── python │ │ ├── README.md │ │ ├── object_detection_image_viewer.py │ │ └── ogl_viewer │ │ └── viewer.py ├── multi-camera │ └── cpp │ │ ├── CMakeLists.txt │ │ ├── include │ │ ├── ClientPublisher.hpp │ │ ├── GLViewer.hpp │ │ └── utils.hpp │ │ └── src │ │ ├── ClientPublisher.cpp │ │ ├── GLViewer.cpp │ │ └── main.cpp └── multi-camera_multi-model │ └── cpp │ ├── CMakeLists.txt │ ├── include │ ├── ClientPublisher.hpp │ ├── GLViewer.hpp │ └── utils.hpp │ └── src │ ├── ClientPublisher.cpp │ ├── GLViewer.cpp │ └── main.cpp ├── plane detection ├── README.md ├── floor plane │ └── cpp │ │ ├── CMakeLists.txt │ │ ├── include │ │ └── GLViewer.hpp │ │ └── src │ │ ├── GLViewer.cpp │ │ └── main.cpp └── plane detection │ ├── README.md │ ├── cpp │ ├── CMakeLists.txt │ ├── README.md │ ├── include │ │ └── GLViewer.hpp │ └── src │ │ ├── GLViewer.cpp │ │ └── main.cpp │ ├── csharp │ ├── App.config │ ├── CMakeLists.txt │ ├── GLViewer.cs │ ├── MainWindow.cs │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── README.md │ └── packages.config │ ├── plane_detection.jpg │ └── python │ ├── README.md │ ├── ogl_viewer │ └── viewer.py │ └── plane_detection.py ├── positional tracking ├── README.md ├── export │ └── fbx │ │ └── cpp │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── include │ │ └── utils.hpp │ │ └── src │ │ └── main.cpp └── positional tracking │ ├── README.md │ ├── cpp │ ├── CMakeLists.txt │ ├── README.md │ ├── include │ │ └── GLViewer.hpp │ └── src │ │ ├── GLViewer.cpp │ │ └── main.cpp │ ├── csharp │ ├── App.config │ ├── CMakeLists.txt │ ├── GLViewer.cs │ ├── MainWindow.cs │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── README.md │ └── packages.config │ ├── positional_tracking.jpg │ └── python │ ├── README.md │ ├── ogl_viewer │ └── tracking_viewer.py │ └── positional_tracking.py ├── recording ├── README.md ├── export │ ├── README.md │ ├── sensors │ │ ├── cpp │ │ │ ├── CMakeLists.txt │ │ │ ├── include │ │ │ │ └── json.hpp │ │ │ └── src │ │ │ │ └── main.cpp │ │ └── python │ │ │ └── export_sensors.py │ └── svo │ │ ├── README.md │ │ ├── cpp │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── include │ │ │ └── utils.hpp │ │ └── src │ │ │ └── main.cpp │ │ ├── csharp │ │ ├── App.config │ │ ├── CMakeLists.txt │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── README.md │ │ └── packages.config │ │ └── python │ │ ├── README.md │ │ └── svo_export.py ├── playback │ ├── README.md │ ├── external_data │ │ ├── cpp │ │ │ ├── CMakeLists.txt │ │ │ ├── include │ │ │ │ └── utils.hpp │ │ │ └── src │ │ │ │ └── main.cpp │ │ ├── csharp │ │ │ ├── App.config │ │ │ ├── CMakeLists.txt │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ └── packages.config │ │ └── python │ │ │ └── svo_playback.py │ ├── multi camera │ │ └── cpp │ │ │ ├── CMakeLists.txt │ │ │ ├── README.md │ │ │ ├── include │ │ │ └── utils.hpp │ │ │ └── src │ │ │ └── main.cpp │ └── single camera │ │ ├── cpp │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── include │ │ │ └── utils.hpp │ │ └── src │ │ │ └── main.cpp │ │ ├── csharp │ │ ├── App.config │ │ ├── CMakeLists.txt │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── README.md │ │ └── packages.config │ │ └── python │ │ ├── README.md │ │ └── svo_playback.py └── recording │ ├── external_data │ ├── cpp │ │ ├── CMakeLists.txt │ │ ├── include │ │ │ └── utils.hpp │ │ └── src │ │ │ └── main.cpp │ ├── csharp │ │ ├── App.config │ │ ├── CMakeLists.txt │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── packages.config │ └── python │ │ └── svo_recording.py │ ├── multi camera │ └── cpp │ │ ├── CMakeLists.txt │ │ ├── include │ │ └── utils.hpp │ │ └── src │ │ └── main.cpp │ └── single camera │ ├── README.md │ ├── cpp │ ├── CMakeLists.txt │ ├── README.md │ ├── include │ │ └── utils.hpp │ └── src │ │ └── main.cpp │ ├── csharp │ ├── App.config │ ├── CMakeLists.txt │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── README.md │ └── packages.config │ └── python │ ├── README.md │ └── svo_recording.py ├── spatial mapping ├── multi camera │ └── cpp │ │ ├── CMakeLists.txt │ │ ├── include │ │ ├── ClientPublisher.hpp │ │ ├── GLViewer.hpp │ │ └── utils.hpp │ │ └── src │ │ ├── ClientPublisher.cpp │ │ ├── GLViewer.cpp │ │ └── main.cpp └── spatial mapping │ ├── README.md │ ├── cpp │ ├── CMakeLists.txt │ ├── include │ │ └── GLViewer.hpp │ └── src │ │ ├── GLViewer.cpp │ │ └── main.cpp │ ├── csharp │ ├── App.config │ ├── CMakeLists.txt │ ├── GLViewer.cs │ ├── MainWindow.cs │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── README.md │ └── packages.config │ ├── python │ ├── README.md │ ├── ogl_viewer │ │ └── viewer.py │ └── spatial_mapping.py │ └── spatial_mapping.jpg ├── tutorials ├── CMakeLists.txt ├── tutorial 1 - hello ZED │ ├── README.md │ ├── c │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ └── main.c │ ├── cpp │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ └── main.cpp │ ├── csharp │ │ ├── App.config │ │ ├── CMakeLists.txt │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── README.md │ │ └── packages.config │ └── python │ │ ├── README.md │ │ └── hello_zed.py ├── tutorial 10 - split process │ ├── README.md │ └── cpp │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ └── main.cpp ├── tutorial 11 - health status │ └── cpp │ │ ├── CMakeLists.txt │ │ └── main.cpp ├── tutorial 2 - image capture │ ├── README.md │ ├── c │ │ ├── CMakeLists.txt │ │ └── main.c │ ├── cpp │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ └── main.cpp │ ├── csharp │ │ ├── App.config │ │ ├── CMakeLists.txt │ │ ├── Program.cs │ │ ├── Properties │ │ │ ├── AssemblyInfo.cs │ │ │ ├── Resources.Designer.cs │ │ │ ├── Resources.resx │ │ │ ├── Settings.Designer.cs │ │ │ └── Settings.settings │ │ ├── README.md │ │ └── packages.config │ └── python │ │ ├── README.md │ │ └── image_capture.py ├── tutorial 3 - depth sensing │ ├── README.md │ ├── c │ │ ├── CMakeLists.txt │ │ └── main.c │ ├── cpp │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ └── main.cpp │ ├── csharp │ │ ├── App.config │ │ ├── CMakeLists.txt │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── README.md │ │ └── packages.config │ └── python │ │ ├── README.md │ │ └── depth_sensing.py ├── tutorial 4 - positional tracking │ ├── README.md │ ├── c │ │ ├── CMakeLists.txt │ │ └── main.c │ ├── cpp │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ └── main.cpp │ ├── csharp │ │ ├── App.config │ │ ├── CMakeLists.txt │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── README.md │ │ └── packages.config │ └── python │ │ ├── README.md │ │ └── positional_tracking.py ├── tutorial 5 - spatial mapping │ ├── README.md │ ├── c │ │ ├── CMakeLists.txt │ │ └── main.c │ ├── cpp │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ └── main.cpp │ ├── csharp │ │ ├── App.config │ │ ├── CMakeLists.txt │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── README.md │ │ └── packages.config │ └── python │ │ ├── README.md │ │ └── spatial_mapping.py ├── tutorial 6 - object detection │ ├── README.md │ ├── c │ │ ├── CMakeLists.txt │ │ └── main.c │ ├── cpp │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ └── main.cpp │ ├── csharp │ │ ├── App.config │ │ ├── CMakeLists.txt │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── README.md │ │ └── packages.config │ └── python │ │ ├── README.md │ │ └── object_detection.py ├── tutorial 7 - sensor data │ ├── README.md │ ├── c │ │ ├── CMakeLists.txt │ │ └── main.c │ ├── cpp │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ └── main.cpp │ ├── csharp │ │ ├── App.config │ │ ├── CMakeLists.txt │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── README.md │ │ └── packages.config │ └── python │ │ ├── README.md │ │ └── sensor_data.py ├── tutorial 8 - body tracking │ ├── README.md │ ├── c │ │ ├── CMakeLists.txt │ │ └── main.c │ ├── cpp │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ └── main.cpp │ ├── csharp │ │ ├── App.config │ │ ├── CMakeLists.txt │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── README.md │ │ └── packages.config │ └── python │ │ ├── README.md │ │ └── body_tracking.py └── tutorial 9 - global localization │ ├── cpp │ ├── CMakeLists.txt │ ├── README.md │ └── main.cpp │ └── python │ ├── README.md │ └── geotracking.py └── zed one ├── cpp ├── CMakeLists.txt ├── include │ └── utils.hpp ├── live.cpp ├── streaming_receiver.cpp ├── streaming_sender.cpp ├── svo_external_data_playback.cpp ├── svo_external_data_record.cpp ├── svo_playback.cpp └── svo_recording.cpp └── python ├── live.py ├── streaming_receiver.py ├── streaming_sender.py ├── svo_playback.py └── svo_recording.py /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Online Documentation 4 | url: https://www.stereolabs.com/docs/ 5 | about: Check out the Stereolabs documentation for answers to common questions. 6 | - name: Stereolabs Community 7 | url: https://community.stereolabs.com/ 8 | about: Ask questions, request features & discuss with other users and developers. 9 | - name: Stereolabs Twitter 10 | url: https://twitter.com/Stereolabs3D 11 | about: The official Stereolabs Twitter account to ask questions, comment our products and share your projects with the ZED community. 12 | 13 | -------------------------------------------------------------------------------- /.github/workflows/stale_issues.yml: -------------------------------------------------------------------------------- 1 | name: 'Stale issue handler' 2 | on: 3 | workflow_dispatch: 4 | schedule: 5 | - cron: '00 00 * * *' 6 | 7 | jobs: 8 | stale: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/stale@main 12 | id: stale 13 | with: 14 | stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days' 15 | stale-pr-message: 'This PR is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days' 16 | days-before-stale: 30 17 | days-before-close: 5 18 | operations-per-run: 1500 19 | exempt-issue-labels: 'feature_request' 20 | exempt-pr-labels: 'feature_request' 21 | enable-statistics: 'true' 22 | close-issue-label: 'closed_for_stale' 23 | close-pr-label: 'closed_for_stale' 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Stereolabs 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /body tracking/README.md: -------------------------------------------------------------------------------- 1 | # Body Tracking Samples 2 | 3 | This repository contains samples demonstrating how to use the [ZED](https://www.stereolabs.com/store/) camera's **Body Tracking** features using the ZED SDK. You can find additional information on the Body Tracking module in our [Documentation](https://www.stereolabs.com/docs/body-tracking/) and [API Reference](https://www.stereolabs.com/docs/api/group__Body__group.html). 4 | 5 |

6 | 7 |

8 | 9 | ## Overview 10 | 11 | This section contains the following code samples: 12 | 13 | - [Body Tracking](./body%20tracking/): This sample shows how to use the Body Tracking module, using a single camera and a simple 3D display. 14 | 15 | - [Tracking Data Export](./export/): This sample shows how to export **human body tracking data** into a JSON format. You can adapt the code to fit your needs. 16 | 17 | - [Integrations](./integrations) This folder contains links to other repositories that provide Body Tracking **integration examples** and tutorials with Unreal Engine 5, Unity, and Livelink. 18 | 19 | - [Multi Camera Fusion](./multi-camera): This sample demonstrates how to use the ZED SDK **Fusion API** to track people in an entire space, with data from multiple cameras which produces higher quality results than using a single camera. The sample goes through the full process of setting up your cameras, calibrating your system with ZED360, fusing and visualizing the data. 20 | -------------------------------------------------------------------------------- /body tracking/body tracking/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Body Tracking 2 | 3 | ## This sample shows how to detect and track human bodies in space. 4 | 5 | ### Features 6 | - Camera images are displayed with human bodies as skeletons 7 | - Bodies are tracked across time and space 8 | - Display bodies bounding boxes by pressing the `b` key 9 | 10 | ![](body_tracking.jpg) 11 | 12 | 13 | >*NOTE: The ZED v1 is not compatible with this module* 14 | -------------------------------------------------------------------------------- /body tracking/body tracking/body_tracking.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stereolabs/zed-sdk/e52c8385ede3c5ac6a6c914ed35b3bedf92c961c/body tracking/body tracking/body_tracking.jpg -------------------------------------------------------------------------------- /body tracking/body tracking/cpp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Body Tracking 2 | 3 | This sample shows how to detect and track human bodies in space. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | - Build for [Linux/Jetson](https://www.stereolabs.com/docs/app-development/cpp/linux/) 12 | 13 | ## Run the program 14 | *NOTE: The ZED v1 is not compatible with this module* 15 | - Navigate to the build directory and launch the executable 16 | - Or open a terminal in the build directory and run the sample : 17 | 18 | ./ZED_Body_Tracking 19 | 20 | ## Features 21 | - Display bodies bounding boxes by pressing the `b` key. 22 | 23 | ## Support 24 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /body tracking/body tracking/csharp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /body tracking/body tracking/csharp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required( VERSION 3.8.0 ) 2 | 3 | project(ZED_Body_Tracking CSharp) 4 | 5 | add_executable(${PROJECT_NAME} 6 | Program.cs 7 | MainWindow.cs 8 | GLViewer.cs 9 | TrackingViewer.cs 10 | Utils.cs 11 | App.config 12 | packages.config 13 | Properties/AssemblyInfo.cs 14 | ) 15 | 16 | # Set the target platform to x64, since ZED SDK does not support 32-bits arch 17 | target_compile_options(${PROJECT_NAME} PRIVATE "/platform:x64" ) 18 | 19 | # Set the .NET Framework version for the target. 20 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1") 21 | 22 | # Set the C# language version, otherwise default 3.0 is taken 23 | set(CMAKE_CSharp_FLAGS "/langversion:7") 24 | 25 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCES 26 | "Microsoft.CSharp" 27 | "PresentationCore" 28 | "PresentationFramework" 29 | "System" 30 | "System.Xaml" 31 | "System.Data" 32 | "System.Linq" 33 | "System.Windows" 34 | "System.Windows.Forms" 35 | "System.Numerics" 36 | "WindowsBase" 37 | 38 | ) 39 | 40 | set(CMAKE_SUPPRESS_REGENERATION true) 41 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_PACKAGE_REFERENCES 42 | "Stereolabs.zed_5.*" 43 | "OpenGL.Net_0.8.4" 44 | "OpenGL.Net.CoreUI_0.8.4" 45 | "OpenCvSharp4.Windows_4.5.0.20201013" 46 | ) -------------------------------------------------------------------------------- /body tracking/body tracking/csharp/Program.cs: -------------------------------------------------------------------------------- 1 | //======= Copyright (c) Stereolabs Corporation, All rights reserved. =============== 2 | using System; 3 | using System.Runtime.InteropServices; 4 | using System.Threading.Tasks; 5 | 6 | namespace sl 7 | { 8 | class Program 9 | { 10 | [STAThread] 11 | static void Main(string[] args) 12 | { 13 | MainWindow window = new MainWindow(args); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /body tracking/body tracking/csharp/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Tutorials")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Tutorials")] 13 | [assembly: AssemblyCopyright("Copyright © 2024")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("db8455c8-b2a9-4e62-9597-7b26c432a999")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /body tracking/body tracking/csharp/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Ce code a été généré par un outil. 4 | // Version du runtime :4.0.30319.42000 5 | // 6 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 7 | // le code est régénéré. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Image_capture.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /body tracking/body tracking/csharp/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /body tracking/body tracking/csharp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Body Tracking 2 | 3 | This sample shows how to detect and track human bodies in space. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/), NuGet packages are automatically downloaded 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | 12 | ## Run the program 13 | *NOTE: The ZED v1 is not compatible with this module* 14 | - Navigate to the build directory and launch the executable 15 | - Or open a terminal in the build directory and run the sample : 16 | 17 | ./ZED_Body_Tracking 18 | 19 | ## Features 20 | - Display bodies bounding boxes by pressing the `b` key. 21 | 22 | ## Support 23 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /body tracking/body tracking/csharp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /body tracking/body tracking/python/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Body Tracking 2 | 3 | This sample shows how to detect and track human bodies in space. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) and [pyZED Package](https://www.stereolabs.com/docs/app-development/python/install/) 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Dependencies 10 | ``` 11 | python3 -m pip install pyopengl 12 | ``` 13 | 14 | ## Run the program 15 | *NOTE: The ZED v1 is not compatible with this module* 16 | 17 | To run the program, use the following command in your terminal : 18 | ```bash 19 | python body_tracking.py 20 | ``` 21 | If you wish to run the program from an input_svo_file, or an IP adress, or specify a resolution run : 22 | 23 | ```bash 24 | python body_tracking.py --input_svo_file --ip_address --resolution 25 | ``` 26 | Arguments: 27 | - --input_svo_file A path to an existing .svo file, that will be playbacked. If this parameter and ip_adress are not specified, the soft will use the camera wired as default. 28 | - --ip_address IP Address, in format a.b.c.d:port or a.b.c.d. If specified, the soft will try to connect to the IP. 29 | - --resolution Resolution, can be either HD2K, HD1200, HD1080, HD720, SVGA or VGA 30 | ## Features 31 | - Display bodies bounding boxes by pressing the `b` key. 32 | 33 | ## Support 34 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /body tracking/body tracking/python/cv_viewer/utils.py: -------------------------------------------------------------------------------- 1 | import pyzed.sl as sl 2 | 3 | 4 | ID_COLORS = [(232, 176,59) 5 | ,(175, 208,25) 6 | ,(102, 205,105) 7 | ,(185, 0,255) 8 | ,(99, 107,252)] 9 | 10 | 11 | def render_object(object_data, is_tracking_on): 12 | if is_tracking_on: 13 | return (object_data.tracking_state == sl.OBJECT_TRACKING_STATE.OK) 14 | else: 15 | return ((object_data.tracking_state == sl.OBJECT_TRACKING_STATE.OK) or (object_data.tracking_state == sl.OBJECT_TRACKING_STATE.OFF)) 16 | 17 | 18 | def generate_color_id_u(idx): 19 | arr = [] 20 | if(idx < 0): 21 | arr = [236,184,36,255] 22 | else: 23 | color_idx = idx % 5 24 | arr = [ID_COLORS[color_idx][0], ID_COLORS[color_idx][1], ID_COLORS[color_idx][2], 255] 25 | return arr 26 | -------------------------------------------------------------------------------- /body tracking/export/JSON export/cpp/include/SK_Serializer.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "sl/Camera.hpp" 4 | #include "json.hpp" 5 | 6 | 7 | namespace sk { 8 | nlohmann::json serialize(sl::Bodies&); 9 | sl::Bodies deserialize(nlohmann::json &); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /body tracking/export/fbx export/cpp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - FBX Export 2 | 3 | 4 | This sample shows how to export ZED Camera skeleton detection data as FBX file compatible with 3D software like Blender or Maya. 5 | It is using the [FBX SDK](https://www.autodesk.com/developer-network/platform-technologies/fbx-sdk-2020-2-1), make sure it is installed on your computer. 6 | 7 | ____ 8 | -------------------------------------------------------------------------------- /body tracking/integrations/README.md: -------------------------------------------------------------------------------- 1 | # Using Body Tracking with external software 2 | 3 | The **Body Tracking module** of the ZED SDK provides real-time human body tracking capabilities, allowing developers to create immersive applications that can track and interact with human body movements in 3D space. The ZED SDK provides integrations for popular game engines such as **Unity** and **Unreal Engine 5**, as well as additional integrations with **Unity using LiveLink** and **Unreal Engine with LiveLink**. 4 | 5 | Each integration is available in its own repository, containing samples and tutorials to get started integrating the ZED SDK into your new or existing project. 6 | 7 | ## Integrations Github Repositories 8 | 9 | | Integration | Description | 10 | | :------: | ------ | 11 | | [Unity](https://github.com/stereolabs/zed-unity) | Seamless integration of body tracking capabilities into Unity projects for animation and interactive experiences | 12 | | [Unity with Livelink](https://github.com/stereolabs/zed-unity-livelink) | Real-time streaming of body tracking data directly into Unity for animation and interactive experiences | 13 | | [Unreal Engine 5](https://github.com/stereolabs/zed-UE5) | Incorporate ZED SDK real-time human body tracking data into Unreal Engine 5 seamlessly | 14 | | [Unreal Engine 5 with Livelink](https://github.com/stereolabs/zed-UE5) | Real-time streaming of body tracking data directly into Unreal Engine 5 for animation and interactive experiences | 15 | -------------------------------------------------------------------------------- /body tracking/multi-camera/cpp/include/ClientPublisher.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __SENDER_RUNNER_HDR__ 2 | #define __SENDER_RUNNER_HDR__ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | #include 9 | 10 | struct Trigger{ 11 | 12 | void notifyZED(){ 13 | 14 | cv.notify_all(); 15 | 16 | if(running){ 17 | bool wait_for_zed = true; 18 | const int nb_zed = states.size(); 19 | while(wait_for_zed){ 20 | int count_r = 0; 21 | for(auto &it:states) 22 | count_r += it.second; 23 | wait_for_zed = count_r != nb_zed; 24 | sl::sleep_ms(1); 25 | } 26 | for(auto &it:states) 27 | it.second = false; 28 | } 29 | } 30 | 31 | std::condition_variable cv; 32 | bool running = true; 33 | std::map states; 34 | }; 35 | 36 | class ClientPublisher{ 37 | 38 | public: 39 | ClientPublisher(); 40 | ~ClientPublisher(); 41 | 42 | bool open(sl::InputType, Trigger* ref); 43 | void start(); 44 | void stop(); 45 | void setStartSVOPosition(unsigned pos); 46 | 47 | private: 48 | sl::Camera zed; 49 | void work(); 50 | std::thread runner; 51 | int serial; 52 | std::mutex mtx; 53 | Trigger *p_trigger; 54 | }; 55 | 56 | #endif // ! __SENDER_RUNNER_HDR__ 57 | -------------------------------------------------------------------------------- /body tracking/multi-camera/csharp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /body tracking/multi-camera/csharp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required( VERSION 3.8.0 ) 2 | 3 | project(ZED_Body_Fusion CSharp) 4 | 5 | add_executable(${PROJECT_NAME} 6 | Program.cs 7 | MainWindow.cs 8 | GLViewer.cs 9 | ClientPublisher.cs 10 | App.config 11 | packages.config 12 | Properties/AssemblyInfo.cs 13 | ) 14 | 15 | # Set the target platform to x64, since ZED SDK does not support 32-bits arch 16 | target_compile_options(${PROJECT_NAME} PRIVATE "/platform:x64" ) 17 | 18 | # Set the .NET Framework version for the target. 19 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1") 20 | 21 | # Set the C# language version, otherwise default 3.0 is taken 22 | set(CMAKE_CSharp_FLAGS "/langversion:7") 23 | 24 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCES 25 | "Microsoft.CSharp" 26 | "PresentationCore" 27 | "PresentationFramework" 28 | "System" 29 | "System.Xaml" 30 | "System.Data" 31 | "System.Linq" 32 | "System.Windows" 33 | "System.Windows.Forms" 34 | "System.Numerics" 35 | "WindowsBase" 36 | 37 | ) 38 | 39 | set(CMAKE_SUPPRESS_REGENERATION true) 40 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_PACKAGE_REFERENCES 41 | "Stereolabs.zed_4.*" 42 | "OpenGL.Net_0.8.4" 43 | "OpenGL.Net.CoreUI_0.8.4" 44 | ) -------------------------------------------------------------------------------- /body tracking/multi-camera/csharp/Program.cs: -------------------------------------------------------------------------------- 1 | //======= Copyright (c) Stereolabs Corporation, All rights reserved. =============== 2 | using System; 3 | using System.Runtime.InteropServices; 4 | using System.Threading.Tasks; 5 | 6 | namespace sl 7 | { 8 | class Program 9 | { 10 | [STAThread] 11 | static void Main(string[] args) 12 | { 13 | MainWindow window = new MainWindow(args); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /body tracking/multi-camera/csharp/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Ce code a été généré par un outil. 4 | // Version du runtime :4.0.30319.42000 5 | // 6 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 7 | // le code est régénéré. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Image_capture.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /body tracking/multi-camera/csharp/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /body tracking/multi-camera/csharp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Body Tracking 2 | 3 | This sample shows how to detect and track human bodies in space. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/), NuGet packages are automatically downloaded 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | 12 | ## Run the program 13 | *NOTE: The ZED v1 is not compatible with this module* 14 | - Navigate to the build directory and launch the executable 15 | - Or open a terminal in the build directory and run the sample : 16 | 17 | ./ZED_Body_Tracking 18 | 19 | ## Features 20 | - Display bodies bounding boxes by pressing the `b` key. 21 | 22 | ## Support 23 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /body tracking/multi-camera/csharp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /camera control/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Camera Control 2 | 3 | This sample shows how to capture images with the ZED SDK video module and adjust camera settings. You can find additional information on the Video module in our [Documentation](https://www.stereolabs.com/docs/video/camera-controls/) and [API Reference](https://www.stereolabs.com/docs/api/group__Video__group.html). 4 | 5 |

6 | 7 |

8 | 9 | 10 | ## Overview 11 | 12 | This repository demonstrates how to change the **ZED camera's video settings** and display the camera's image using OpenCV windows. The sample provides examples of how to change the following settings: 13 | 14 | - Brightness 15 | - Contrast 16 | - Saturation 17 | - Hue 18 | - Sharpness 19 | - Gamma 20 | - Gain 21 | - Exposure 22 | - Automatic GAIN_EXP behavior 23 | - White balance 24 | - LED state 25 | 26 | -------------------------------------------------------------------------------- /camera control/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_Camera_Control) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 | SET(CMAKE_BUILD_TYPE "Release") 7 | 8 | option(LINK_SHARED_ZED "Link with the ZED SDK shared executable" ON) 9 | 10 | if (NOT LINK_SHARED_ZED AND MSVC) 11 | message(FATAL_ERROR "LINK_SHARED_ZED OFF : ZED SDK static libraries not available on Windows") 12 | endif() 13 | 14 | find_package(ZED REQUIRED) 15 | find_package(OpenCV REQUIRED) 16 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 17 | 18 | include_directories(${CUDA_INCLUDE_DIRS}) 19 | include_directories(${ZED_INCLUDE_DIRS}) 20 | include_directories(${OpenCV_INCLUDE_DIRS}) 21 | 22 | link_directories(${ZED_LIBRARY_DIR}) 23 | link_directories(${OpenCV_LIBRARY_DIRS}) 24 | link_directories(${CUDA_LIBRARY_DIRS}) 25 | 26 | ADD_EXECUTABLE(${PROJECT_NAME} src/main.cpp) 27 | 28 | if (LINK_SHARED_ZED) 29 | SET(ZED_LIBS ${ZED_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 30 | else() 31 | SET(ZED_LIBS ${ZED_STATIC_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_LIBRARY}) 32 | endif() 33 | 34 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ZED_LIBS} ${OpenCV_LIBRARIES}) 35 | 36 | if(INSTALL_SAMPLES) 37 | LIST(APPEND SAMPLE_LIST ${PROJECT_NAME}) 38 | SET(SAMPLE_LIST "${SAMPLE_LIST}" PARENT_SCOPE) 39 | endif() 40 | -------------------------------------------------------------------------------- /camera control/cpp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Camera Control 2 | 3 | This sample shows how to capture images with the ZED SDK and adjust camera settings. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | - Build for [Linux/Jetson](https://www.stereolabs.com/docs/app-development/cpp/linux/) 12 | 13 | ## Run the program 14 | - Navigate to the build directory and launch the executable 15 | - Or open a terminal in the build directory and run the sample : 16 | 17 | ./ZED_Camera_Control 18 | 19 | ### Features 20 | - Camera images are displayed on an OpenCV windows 21 | 22 | The following parameters can be changed: 23 | - Brightness 24 | - Contrast 25 | - Saturation 26 | - Hue 27 | - Sharpness 28 | - Gamma 29 | - Gain 30 | - Exposure 31 | - Automatic GAIN_EXP behavior 32 | - White Balance 33 | - LED state 34 | 35 | 36 | ## Support 37 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /camera control/csharp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /camera control/csharp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required( VERSION 3.8.0 ) 2 | 3 | project(ZED_Camera_Control CSharp) 4 | 5 | add_executable(${PROJECT_NAME} 6 | Program.cs 7 | App.config 8 | packages.config 9 | Properties/AssemblyInfo.cs 10 | ) 11 | 12 | # Set the target platform to x64, since ZED SDK does not support 32-bits arch 13 | target_compile_options(${PROJECT_NAME} PRIVATE "/platform:x64" ) 14 | 15 | # Set the .NET Framework version for the target. 16 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1") 17 | 18 | # Set the C# language version, otherwise default 3.0 is taken 19 | set(CMAKE_CSharp_FLAGS "/langversion:7") 20 | 21 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCES 22 | "Microsoft.CSharp" 23 | "PresentationCore" 24 | "PresentationFramework" 25 | "System" 26 | "System.Numerics" 27 | "WindowsBase" 28 | ) 29 | 30 | set(CMAKE_SUPPRESS_REGENERATION true) 31 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_PACKAGE_REFERENCES 32 | "Stereolabs.zed_5.*" 33 | "OpenCvSharp4.Windows_4.5.0.20201013" 34 | ) 35 | -------------------------------------------------------------------------------- /camera control/csharp/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Tutorials")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Tutorials")] 13 | [assembly: AssemblyCopyright("Copyright © 2024")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("db8455c8-b2a9-4e62-9597-7b26c432a999")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /camera control/csharp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Camera Control 2 | 3 | This sample shows how to capture images with the ZED SDK and adjust camera settings. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/), NuGet packages are automatically downloaded 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | 12 | ## Run the program 13 | - Navigate to the build directory and launch the executable 14 | - Or open a terminal in the build directory and run the sample : 15 | 16 | ./ZED_Camera_Control 17 | 18 | ### Features 19 | - Camera images are displayed on an OpenCV windows 20 | 21 | The following parameters can be changed: 22 | - Brightness 23 | - Contrast 24 | - Saturation 25 | - Hue 26 | - Sharpness 27 | - Gamma 28 | - Gain 29 | - Exposure 30 | - Automatic GAIN_EXP behavior 31 | - White Balance 32 | - LED state 33 | 34 | ## Support 35 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /camera control/csharp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /camera control/python/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Camera Control 2 | 3 | This sample shows how to capture images with the ZED SDK and adjust camera settings. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) and [pyZED Package](https://www.stereolabs.com/docs/app-development/python/install/) 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Run the program 10 | To run the program, use the following command in your terminal: 11 | ```bash 12 | python camera_control.py 13 | ``` 14 | ### Features 15 | - Camera images are displayed on an OpenCV windows 16 | 17 | The following parameters can be changed: 18 | - Brightness 19 | - Contrast 20 | - Saturation 21 | - Hue 22 | - Sharpness 23 | - Gamma 24 | - Gain 25 | - Exposure 26 | - Automatic GAIN_EXP behavior 27 | - White Balance 28 | - LED state 29 | 30 | ## Support 31 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /camera streaming/README.md: -------------------------------------------------------------------------------- 1 | # Streaming 2 | 3 | This sample shows how to create a **video stream** from a ZED camera which can be read by a remote application for viewing or further processing. You can find additional information on the Video Streaming module in our [Documentation](https://www.stereolabs.com/docs/video/streaming/) and [API Reference](https://www.stereolabs.com/docs/api/structsl_1_1StreamingParameters.html). 4 | 5 | ## Overview 6 | 7 | This repository contains the following code samples: 8 | 9 | - [ZED Stream Sender](./sender): This sample demonstrates how to use the ZED SDK to establish a network connection, encode a live video stream, and transmit it to a remote client. The ZED SDK handles all aspects of network communication, video encoding, and transmission, making it easy to integrate the ZED camera into applications that require **remote video capture and processing**, such as computer vision, remote monitoring, or teleoperation. 10 | 11 | - [ZED Stream Receiver](./receiver/): This sample demonstrates how to use the ZED SDK to **receive and decode** video data sent from a remote ZED stream. 12 | 13 | -------------------------------------------------------------------------------- /camera streaming/receiver/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Streaming Receiver 2 | 3 | ## This sample shows how to connect to a broadcasting device. 4 | 5 | ### Features 6 | - Connects to a network ZED device. 7 | - Uses SDK to compute point cloud and displays it with OpenGL. 8 | -------------------------------------------------------------------------------- /camera streaming/receiver/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_Streaming_Receiver) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 | SET(CMAKE_BUILD_TYPE "Release") 7 | 8 | option(LINK_SHARED_ZED "Link with the ZED SDK shared executable" ON) 9 | 10 | if (NOT LINK_SHARED_ZED AND MSVC) 11 | message(FATAL_ERROR "LINK_SHARED_ZED OFF : ZED SDK static libraries not available on Windows") 12 | endif() 13 | 14 | find_package(ZED REQUIRED) 15 | find_package(OpenCV REQUIRED) 16 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 17 | 18 | include_directories(${CUDA_INCLUDE_DIRS}) 19 | include_directories(${ZED_INCLUDE_DIRS}) 20 | include_directories(${OpenCV_INCLUDE_DIRS}) 21 | 22 | link_directories(${ZED_LIBRARY_DIR}) 23 | link_directories(${OpenCV_LIBRARY_DIRS}) 24 | link_directories(${CUDA_LIBRARY_DIRS}) 25 | 26 | add_definitions(-g) 27 | ADD_EXECUTABLE(${PROJECT_NAME} src/main.cpp) 28 | 29 | if (LINK_SHARED_ZED) 30 | SET(ZED_LIBS ${ZED_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 31 | else() 32 | SET(ZED_LIBS ${ZED_STATIC_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_LIBRARY}) 33 | endif() 34 | 35 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ZED_LIBS} ${OpenCV_LIBRARIES}) 36 | 37 | if(INSTALL_SAMPLES) 38 | LIST(APPEND SAMPLE_LIST ${PROJECT_NAME}) 39 | SET(SAMPLE_LIST "${SAMPLE_LIST}" PARENT_SCOPE) 40 | endif() 41 | -------------------------------------------------------------------------------- /camera streaming/receiver/cpp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Streaming Receiver 2 | 3 | This sample shows how to connect to a broadcasting device. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | - Build for [Linux/Jetson](https://www.stereolabs.com/docs/app-development/cpp/linux/) 12 | 13 | ## Run the program 14 | - Navigate to the build directory and launch the executable 15 | - Or open a terminal in the build directory and run the sample : 16 | 17 | ./ZED_Streaming_Receiver 18 | 19 | ### Features 20 | - Connects to a network ZED device. 21 | - Uses SDK to compute point cloud and displays it with OpenGL. 22 | 23 | ## Support 24 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /camera streaming/receiver/python/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Streaming Receiver 2 | 3 | This sample shows how to connect to a broadcasting device. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) and [pyZED Package](https://www.stereolabs.com/docs/app-development/python/install/) 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Run the program 10 | To run the program, use the following command in your terminal: 11 | ```bash 12 | python streaming_receiver.py --ip_address 13 | ``` 14 | Arguments: 15 | - --ip_address IP address or hostname of the sender. Should be in format a.b.c.d:p or hostname:p 16 | 17 | 18 | ### Features 19 | - Connects to a network ZED device. 20 | - Display image from broadcast with Open-CV 21 | 22 | To setup a basic streaming setup, open two terminals, and navigate to the streaming_receiver and to the streaming_sender samples. Type in the first one : 23 | ```bash 24 | python streaming_sender.py 25 | ``` 26 | Find the port displayed, and then type in the other : 27 | ```bash 28 | python streaming_receiver.py --ip_address 127.0.0.1:port 29 | ``` 30 | 31 | ## Support 32 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /camera streaming/sender/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Streaming Sender 2 | 3 | ## This sample shows how to enable streaming module of the ZED SDK as image sender. 4 | 5 | ### Features 6 | - Defines camera resolution and its frame-rate 7 | - Broadcast Camera images on network 8 | -------------------------------------------------------------------------------- /camera streaming/sender/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_Streaming_Sender) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 | SET(CMAKE_BUILD_TYPE "Release") 7 | 8 | option(LINK_SHARED_ZED "Link with the ZED SDK shared executable" ON) 9 | 10 | if (NOT LINK_SHARED_ZED AND MSVC) 11 | message(FATAL_ERROR "LINK_SHARED_ZED OFF : ZED SDK static libraries not available on Windows") 12 | endif() 13 | 14 | find_package(ZED REQUIRED) 15 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 16 | 17 | include_directories(${CUDA_INCLUDE_DIRS}) 18 | include_directories(${ZED_INCLUDE_DIRS}) 19 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) 20 | 21 | link_directories(${ZED_LIBRARY_DIR}) 22 | link_directories(${CUDA_LIBRARY_DIRS}) 23 | 24 | add_definitions(-g) 25 | ADD_EXECUTABLE(${PROJECT_NAME} include/utils.hpp src/main.cpp) 26 | 27 | if (LINK_SHARED_ZED) 28 | SET(ZED_LIBS ${ZED_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 29 | else() 30 | SET(ZED_LIBS ${ZED_STATIC_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_LIBRARY}) 31 | endif() 32 | 33 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ZED_LIBS} ${OpenCV_LIBRARIES}) 34 | 35 | if(INSTALL_SAMPLES) 36 | LIST(APPEND SAMPLE_LIST ${PROJECT_NAME}) 37 | SET(SAMPLE_LIST "${SAMPLE_LIST}" PARENT_SCOPE) 38 | endif() 39 | -------------------------------------------------------------------------------- /camera streaming/sender/cpp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Streaming Sender 2 | 3 | This sample shows how to enable streaming module of the ZED SDK as image sender. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | - Build for [Linux/Jetson](https://www.stereolabs.com/docs/app-development/cpp/linux/) 12 | 13 | ## Run the program 14 | - Navigate to the build directory and launch the executable 15 | - Or open a terminal in the build directory and run the sample : 16 | 17 | ./ZED_Streaming_Sender 18 | 19 | ### Features 20 | - Defines camera resolution and its frame-rate 21 | - Broadcast Camera images on network 22 | 23 | ## Support 24 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /camera streaming/sender/python/README.md: -------------------------------------------------------------------------------- 1 | # Stereolabs ZED - Streaming Sender 2 | 3 | This sample shows how to enable streaming module of the ZED SDK as image sender. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) and [pyZED Package](https://www.stereolabs.com/docs/app-development/python/install/) 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Run the program 10 | 11 | To run the program, use the following command in your terminal: 12 | ```bash 13 | python streaming_sender.py --resolution 14 | ``` 15 | Arguments: 16 | - --resolution Resolution, can be either HD2K, HD1200, HD1080, HD720, SVGA or VGA 17 | 18 | 19 | ### Features 20 | - Defines camera resolution and its frame-rate 21 | - Broadcast Camera images on network 22 | 23 | To setup a basic streaming setup, open two terminals, and navigate to the streaming_receiver and to the streaming_sender samples. Type in the first one : 24 | ```bash 25 | python streaming_sender.py 26 | ``` 27 | Find the port displayed, and then type in the other : 28 | ```bash 29 | python streaming_receiver.py --ip_address 127.0.0.1:port 30 | ``` 31 | 32 | ## Support 33 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /depth sensing/automatic region of interest/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_Auto_Sensing_ROI) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 | SET(CMAKE_BUILD_TYPE "Release") 7 | 8 | option(LINK_SHARED_ZED "Link with the ZED SDK shared executable" ON) 9 | 10 | if (NOT LINK_SHARED_ZED AND MSVC) 11 | message(FATAL_ERROR "LINK_SHARED_ZED OFF : ZED SDK static libraries not available on Windows") 12 | endif() 13 | 14 | find_package(ZED REQUIRED) 15 | find_package(OpenCV REQUIRED) 16 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 17 | 18 | include_directories(${CUDA_INCLUDE_DIRS}) 19 | include_directories(${ZED_INCLUDE_DIRS}) 20 | include_directories(${OpenCV_INCLUDE_DIRS}) 21 | 22 | link_directories(${ZED_LIBRARY_DIR}) 23 | link_directories(${OpenCV_LIBRARY_DIRS}) 24 | link_directories(${CUDA_LIBRARY_DIRS}) 25 | 26 | ADD_EXECUTABLE(${PROJECT_NAME} src/main.cpp) 27 | 28 | if (LINK_SHARED_ZED) 29 | SET(ZED_LIBS ${ZED_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 30 | else() 31 | SET(ZED_LIBS ${ZED_STATIC_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_LIBRARY}) 32 | endif() 33 | 34 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ZED_LIBS} ${OpenCV_LIBRARIES}) 35 | 36 | if(INSTALL_SAMPLES) 37 | LIST(APPEND SAMPLE_LIST ${PROJECT_NAME}) 38 | SET(SAMPLE_LIST "${SAMPLE_LIST}" PARENT_SCOPE) 39 | endif() 40 | -------------------------------------------------------------------------------- /depth sensing/depth sensing/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Depth Sensing 2 | 3 | ## This sample shows how to retreive the current point cloud. 4 | 5 | ### Features 6 | - Camera live point cloud is retreived 7 | - An OpenGL windows displays it in 3D 8 | 9 | ![](depth_sensing.jpg) -------------------------------------------------------------------------------- /depth sensing/depth sensing/cpp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Depth Sensing 2 | 3 | This sample shows how to retreive the current point cloud. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | - Build for [Linux/Jetson](https://www.stereolabs.com/docs/app-development/cpp/linux/) 12 | 13 | ## Run the program 14 | - Navigate to the build directory and launch the executable 15 | - Or open a terminal in the build directory and run the sample : 16 | 17 | ./ZED_Depth_Sensing 18 | 19 | ### Features 20 | - Camera live point cloud is retreived 21 | - An OpenGL windows displays it in 3D 22 | 23 | ## Support 24 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /depth sensing/depth sensing/csharp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /depth sensing/depth sensing/csharp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required( VERSION 3.8.0 ) 2 | 3 | project(ZED_Depth_Sensing CSharp) 4 | 5 | add_executable(${PROJECT_NAME} 6 | Program.cs 7 | MainWindow.cs 8 | GLViewer.cs 9 | App.config 10 | packages.config 11 | Properties/AssemblyInfo.cs 12 | ) 13 | 14 | # Set the target platform to x64, since ZED SDK does not support 32-bits arch 15 | target_compile_options(${PROJECT_NAME} PRIVATE "/platform:x64" ) 16 | 17 | # Set the .NET Framework version for the target. 18 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1") 19 | 20 | # Set the C# language version, otherwise default 3.0 is taken 21 | set(CMAKE_CSharp_FLAGS "/langversion:7") 22 | 23 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCES 24 | "Microsoft.CSharp" 25 | "PresentationCore" 26 | "PresentationFramework" 27 | "System" 28 | "System.Xaml" 29 | "System.Data" 30 | "System.Linq" 31 | "System.Windows" 32 | "System.Windows.Forms" 33 | "System.Numerics" 34 | "System.Drawing" 35 | "WindowsBase" 36 | ) 37 | 38 | set(CMAKE_SUPPRESS_REGENERATION true) 39 | 40 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_PACKAGE_REFERENCES 41 | "OpenGL.Net_0.8.4" 42 | "OpenGL.Net.CoreUI_0.8.4" 43 | "Stereolabs.zed_5.*" 44 | ) 45 | 46 | -------------------------------------------------------------------------------- /depth sensing/depth sensing/csharp/Program.cs: -------------------------------------------------------------------------------- 1 | //======= Copyright (c) Stereolabs Corporation, All rights reserved. =============== 2 | using System; 3 | using System.Runtime.InteropServices; 4 | using System.Threading.Tasks; 5 | 6 | namespace sl 7 | { 8 | class Program 9 | { 10 | [STAThread] 11 | static void Main(string[] args) 12 | { 13 | MainWindow window = new MainWindow(args); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /depth sensing/depth sensing/csharp/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Ce code a été généré par un outil. 4 | // Version du runtime :4.0.30319.42000 5 | // 6 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 7 | // le code est régénéré. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Image_capture.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /depth sensing/depth sensing/csharp/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /depth sensing/depth sensing/csharp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Depth Sensing 2 | 3 | This sample shows how to retreive the current point cloud. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/), NuGet packages are automatically downloaded 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | 12 | ## Run the program 13 | - Navigate to the build directory and launch the executable 14 | - Or open a terminal in the build directory and run the sample : 15 | 16 | ./ZED_Depth_Sensing 17 | 18 | ### Features 19 | - Camera live point cloud is retreived 20 | - An OpenGL windows displays it in 3D 21 | 22 | ## Support 23 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /depth sensing/depth sensing/csharp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /depth sensing/depth sensing/depth_sensing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stereolabs/zed-sdk/e52c8385ede3c5ac6a6c914ed35b3bedf92c961c/depth sensing/depth sensing/depth_sensing.jpg -------------------------------------------------------------------------------- /depth sensing/depth sensing/python/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Depth Sensing 2 | 3 | This sample shows how to retreive the current point cloud. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) and [pyZED Package](https://www.stereolabs.com/docs/app-development/python/install/) 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Run the program 10 | 11 | To run the program, use the following command in your terminal : 12 | ```bash 13 | python depth_sensing.py 14 | ``` 15 | If you wish to run the program from an input_svo_file, or an IP adress, or specify a resolution run : 16 | 17 | ```bash 18 | python depth_sensing.py --input_svo_file --ip_address --resolution 19 | ``` 20 | Arguments: 21 | - --input_svo_file A path to an existing .svo file, that will be playbacked. If this parameter and ip_adress are not specified, the soft will use the camera wired as default. 22 | - --ip_address IP Address, in format a.b.c.d:port or a.b.c.d. If specified, the soft will try to connect to the IP. 23 | - --resolution Resolution, can be either HD2K, HD1200, HD1080, HD720, SVGA or VGA 24 | ### Features 25 | - Camera live point cloud is retreived 26 | - An OpenGL windows displays it in 3D 27 | 28 | ## Support 29 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /depth sensing/export/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_Depth_Export) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 | SET(CMAKE_BUILD_TYPE "Release") 7 | 8 | option(LINK_SHARED_ZED "Link with the ZED SDK shared executable" ON) 9 | 10 | if (NOT LINK_SHARED_ZED AND MSVC) 11 | message(FATAL_ERROR "LINK_SHARED_ZED OFF : ZED SDK static libraries not available on Windows") 12 | endif() 13 | 14 | find_package(ZED REQUIRED) 15 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 16 | find_package(OpenCV REQUIRED) 17 | 18 | include_directories(${ZED_INCLUDE_DIRS}) 19 | include_directories(${CUDA_INCLUDE_DIRS}) 20 | include_directories(${OpenCV_INCLUDE_DIRS}) 21 | 22 | link_directories(${ZED_LIBRARY_DIR}) 23 | link_directories(${CUDA_LIBRARY_DIRS}) 24 | include_directories(${OpenCV_LIBRARY_DIRS}) 25 | 26 | ADD_EXECUTABLE(${PROJECT_NAME} main.cpp) 27 | 28 | if (LINK_SHARED_ZED) 29 | SET(ZED_LIBS ${ZED_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 30 | else() 31 | SET(ZED_LIBS ${ZED_STATIC_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_LIBRARY}) 32 | endif() 33 | 34 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ZED_LIBS} ${OpenCV_LIBRARIES}) 35 | 36 | if(INSTALL_SAMPLES) 37 | LIST(APPEND SAMPLE_LIST ${PROJECT_NAME}) 38 | SET(SAMPLE_LIST "${SAMPLE_LIST}" PARENT_SCOPE) 39 | endif() -------------------------------------------------------------------------------- /depth sensing/fusion/cpp/include/ClientPublisher.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __SENDER_RUNNER_HDR__ 2 | #define __SENDER_RUNNER_HDR__ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | #include 9 | 10 | struct Trigger{ 11 | 12 | void notifyZED(){ 13 | 14 | cv.notify_all(); 15 | 16 | if(running){ 17 | bool wait_for_zed = true; 18 | const int nb_zed = states.size(); 19 | while(wait_for_zed){ 20 | int count_r = 0; 21 | for(auto &it:states) 22 | count_r += it.second; 23 | wait_for_zed = count_r != nb_zed; 24 | sl::sleep_ms(1); 25 | } 26 | for(auto &it:states) 27 | it.second = false; 28 | } 29 | } 30 | 31 | std::condition_variable cv; 32 | bool running = true; 33 | std::map states; 34 | }; 35 | 36 | class ClientPublisher{ 37 | 38 | public: 39 | ClientPublisher(); 40 | ~ClientPublisher(); 41 | 42 | bool open(sl::InputType, Trigger* ref); 43 | void start(); 44 | void stop(); 45 | void setStartSVOPosition(unsigned pos); 46 | 47 | private: 48 | sl::Camera zed; 49 | void work(); 50 | std::thread runner; 51 | int serial; 52 | std::mutex mtx; 53 | Trigger *p_trigger; 54 | }; 55 | 56 | #endif // ! __SENDER_RUNNER_HDR__ 57 | -------------------------------------------------------------------------------- /depth sensing/image refocus/cpp/include/dof_gpu.h: -------------------------------------------------------------------------------- 1 | #ifndef DOF_GPU_H 2 | #define DOF_GPU_H 3 | 4 | /* dof_gpu.h. 5 | * 6 | * This file contains the interface to the CUDA functions , 7 | * for rendering depth of field, based on Gaussian blurring 8 | * using separable convolution, with depth-dependent kernel size. 9 | * Separable convolution is based on convolution CUDA Sample with kernel-size adaptation 10 | */ 11 | 12 | // ZED includes 13 | #include 14 | 15 | #define KERNEL_RADIUS 32 //see assert in convolution kernel to see the limitations of size 16 | #define KERNEL_LENGTH_X(x) (2 * x + 1) 17 | #define MAX_KERNEL_LENGTH KERNEL_LENGTH(MAX_KERNEL_RADIUS) 18 | #define KERNEL_LENGTH (2 * KERNEL_RADIUS + 1) 19 | 20 | // Copy gaussien kernel into GPU memory 21 | void copyKernel(float *kernel_coefficients, int kernel_index); 22 | 23 | // Normalize depth between 0.f and 1.f 24 | void normalizeDepth(float* depth, float* depth_out, unsigned int step, float min_distance, float max_distance, unsigned int width, unsigned height); 25 | 26 | // GPU convolution 27 | void convolutionRows(sl::uchar4 *d_Dst, sl::uchar4 *d_Src, float* i_depth, int imageW, int imageH, int depth_pitch, float focus_point); 28 | void convolutionColumns(sl::uchar4 *d_Dst, sl::uchar4 *d_Src, float* i_depth, int imageW, int imageH, int depth_pitch, float focus_point); 29 | 30 | #endif //DOF_GPU_H -------------------------------------------------------------------------------- /depth sensing/manual region of interest/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Exclusion ROI measure 2 | 3 | ## This sample shows how to apply an exclusion ROI, to avoid noise from known invalid regions 4 | 5 | ### Features 6 | 7 | - Camera images are displayed on an OpenCV windows 8 | - The ROI can be constructed from multiple rectangles, selected using OpenCV mouse callback 9 | - The ROI can be saved and reloaded from an image, the result is shown for the depth map image, but it's also applied for the positional tracking, object detection and all modules that use the depth map. -------------------------------------------------------------------------------- /depth sensing/manual region of interest/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_Manual_Sensing_ROI) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 | SET(CMAKE_BUILD_TYPE "Release") 7 | 8 | option(LINK_SHARED_ZED "Link with the ZED SDK shared executable" ON) 9 | 10 | if (NOT LINK_SHARED_ZED AND MSVC) 11 | message(FATAL_ERROR "LINK_SHARED_ZED OFF : ZED SDK static libraries not available on Windows") 12 | endif() 13 | 14 | find_package(ZED REQUIRED) 15 | find_package(OpenCV REQUIRED) 16 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 17 | 18 | include_directories(${CUDA_INCLUDE_DIRS}) 19 | include_directories(${ZED_INCLUDE_DIRS}) 20 | include_directories(${OpenCV_INCLUDE_DIRS}) 21 | 22 | link_directories(${ZED_LIBRARY_DIR}) 23 | link_directories(${OpenCV_LIBRARY_DIRS}) 24 | link_directories(${CUDA_LIBRARY_DIRS}) 25 | 26 | ADD_EXECUTABLE(${PROJECT_NAME} src/main.cpp) 27 | 28 | if (LINK_SHARED_ZED) 29 | SET(ZED_LIBS ${ZED_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 30 | else() 31 | SET(ZED_LIBS ${ZED_STATIC_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_LIBRARY}) 32 | endif() 33 | 34 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ZED_LIBS} ${OpenCV_LIBRARIES}) 35 | 36 | if(INSTALL_SAMPLES) 37 | LIST(APPEND SAMPLE_LIST ${PROJECT_NAME}) 38 | SET(SAMPLE_LIST "${SAMPLE_LIST}" PARENT_SCOPE) 39 | endif() 40 | -------------------------------------------------------------------------------- /depth sensing/multi camera/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_Multi_Camera) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 | SET(CMAKE_BUILD_TYPE "Release") 7 | 8 | option(LINK_SHARED_ZED "Link with the ZED SDK shared executable" ON) 9 | 10 | if (NOT LINK_SHARED_ZED AND MSVC) 11 | message(FATAL_ERROR "LINK_SHARED_ZED OFF : ZED SDK static libraries not available on Windows") 12 | endif() 13 | 14 | IF(NOT MSVC) 15 | SET(SPECIAL_OS_LIBS "pthread") 16 | ENDIF() 17 | 18 | find_package(ZED REQUIRED) 19 | find_package(OpenCV REQUIRED) 20 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 21 | 22 | include_directories(${CUDA_INCLUDE_DIRS}) 23 | include_directories(${ZED_INCLUDE_DIRS}) 24 | include_directories(${OpenCV_INCLUDE_DIRS}) 25 | 26 | link_directories(${ZED_LIBRARY_DIR}) 27 | link_directories(${OpenCV_LIBRARY_DIRS}) 28 | link_directories(${CUDA_LIBRARY_DIRS}) 29 | 30 | ADD_EXECUTABLE(${PROJECT_NAME} src/main.cpp) 31 | 32 | if (LINK_SHARED_ZED) 33 | SET(ZED_LIBS ${ZED_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 34 | else() 35 | SET(ZED_LIBS ${ZED_STATIC_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_LIBRARY}) 36 | endif() 37 | 38 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ZED_LIBS} ${SPECIAL_OS_LIBS} ${OpenCV_LIBRARIES}) 39 | 40 | if(INSTALL_SAMPLES) 41 | LIST(APPEND SAMPLE_LIST ${PROJECT_NAME}) 42 | SET(SAMPLE_LIST "${SAMPLE_LIST}" PARENT_SCOPE) 43 | endif() -------------------------------------------------------------------------------- /global localization/README.md: -------------------------------------------------------------------------------- 1 | # Global Localization 2 | 3 | These samples show how to use the ZED SDK Global Localization module for **global scale localization on a real-world map**. 4 | 5 |

6 | 7 |

8 | 9 | ## Overview 10 | 11 | The samples provided using the Global Localization API are organized as follows: 12 | 13 | - [Live](./live/) The Live sample demonstrates how to use the Global Localization API using both the ZED camera and an external GNSS sensor. It displays the corrected positional tracking in the ZED reference frame on an OpenGL window and the geo-position on a real-world map in a browser. 14 | 15 | - [Recording](./recording/): The Recording sample demonstrates how to **record data** from both a ZED camera and an external GNSS sensor. The recorded data is saved in an SVO file and a JSON file, respectively. This sample provides the necessary data to be used by the Playback sample. 16 | 17 | - [Playback](./playback/): The Playback sample shows how to use the Global Localization API for global scale localization on a real-world map. It takes the data generated by the Recording sample and uses it to display geo-positions on a real-world map. 18 | 19 | - [Map Server](./map%20server/): The Map Server Sample is utilized by other samples to display location data in a web browser. 20 | 21 | -------------------------------------------------------------------------------- /global localization/live/cpp/cmake/FindGPS.cmake: -------------------------------------------------------------------------------- 1 | find_path(GPS_INCLUDE_DIR NAMES gps.h DOC "libgps include directory") 2 | find_library(GPS_LIBRARY NAMES gps DOC "libgps library") 3 | 4 | if(GPS_INCLUDE_DIR) 5 | file(STRINGS ${GPS_INCLUDE_DIR}/gps.h _version_lines REGEX "GPSD_API_(MAJOR|MINOR)_VERSION") 6 | string(REGEX MATCH "MAJOR_VERSION[ \t]+([0-9]+)" _version_major ${_version_lines}) 7 | set(GPS_VERSION_MAJOR ${CMAKE_MATCH_1}) 8 | string(REGEX MATCH "MINOR_VERSION[ \t]+([0-9]+)" _version_minor ${_version_lines}) 9 | set(GPS_VERSION_MINOR ${CMAKE_MATCH_1}) 10 | set(GPS_VERSION_STRING "${GPS_VERSION_MAJOR}.${GPS_VERSION_MINOR}") 11 | endif() 12 | 13 | include(FindPackageHandleStandardArgs) 14 | find_package_handle_standard_args(GPS 15 | REQUIRED_VARS GPS_INCLUDE_DIR GPS_LIBRARY 16 | VERSION_VAR GPS_VERSION_STRING) 17 | 18 | if(GPS_FOUND AND NOT TARGET GPS::GPS) 19 | add_library(GPS::GPS UNKNOWN IMPORTED) 20 | set_target_properties(GPS::GPS PROPERTIES 21 | IMPORTED_LOCATION "${GPS_LIBRARY}" 22 | INTERFACE_INCLUDE_DIRECTORIES "${GPS_INCLUDE_DIR}") 23 | endif() 24 | 25 | mark_as_advanced(GPS_INCLUDE_DIR GPS_LIBRARY) 26 | set(GPS_INCLUDE_DIRS ${GPS_INCLUDE_DIR}) 27 | set(GPS_LIBRARIES ${GPS_LIBRARY}) 28 | -------------------------------------------------------------------------------- /global localization/live/cpp/include/exporter/KMLExporter.h: -------------------------------------------------------------------------------- 1 | #ifndef KML_EXPORTER_H 2 | #define KML_EXPORTER_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | /** 10 | * @brief Save GeoPose in KML file that can be displayed into google map (maps.google.com) 11 | * 12 | * @param file_path path expected for the resulted KML file 13 | * @param geopose current data to save 14 | */ 15 | void saveKMLData(std::string file_path, sl::GeoPose geopose); 16 | /** 17 | * @brief Save GNSSData in KML file that can be displayed into google map (maps.google.com) 18 | * 19 | * @param file_path path expected for the resulted KML file 20 | * @param gnss_data current data to save 21 | */ 22 | void saveKMLData(std::string file_path, sl::GNSSData gnss_data); 23 | /** 24 | * @brief Close all KML file writer and place KML files footer 25 | * 26 | */ 27 | void closeAllKMLWriter(); 28 | 29 | #endif -------------------------------------------------------------------------------- /global localization/live/cpp/include/gnss_reader/GPSDReader.hpp: -------------------------------------------------------------------------------- 1 | #ifndef GPSD_Reader_H 2 | #define GPSD_Reader_H 3 | 4 | #include 5 | #include 6 | #ifdef GPSD_FOUND 7 | #include 8 | #endif 9 | #include "IGNSSReader.h" 10 | 11 | /** 12 | * @brief GPSDReader is a common interface that use GPSD for retrieving GNSS data. 13 | * 14 | */ 15 | class GPSDReader : public IGNSSReader 16 | { 17 | public: 18 | GPSDReader(); 19 | ~GPSDReader(); 20 | /** 21 | * @brief Initialize the GNSS sensor and is waiting for the first GNSS fix. 22 | * 23 | */ 24 | void initialize(); 25 | /** 26 | * @brief read next GNSS measurement. This function block until a GNSS measurement is retrieved. 27 | * 28 | * @return sl::GNSSData next GNSS measurement. 29 | */ 30 | sl::GNSSData getNextGNSSValue(); 31 | 32 | sl::ERROR_CODE grab(sl::GNSSData & current_data); 33 | 34 | protected: 35 | void grabGNSSData(); 36 | std::thread grab_gnss_data; 37 | bool continue_to_grab = true; 38 | bool new_data=false; 39 | bool is_initialized = false; 40 | std::mutex is_initialized_mtx; 41 | sl::GNSSData current_gnss_data; 42 | #ifdef GPSD_FOUND 43 | std::unique_ptr gnss_getter; 44 | #endif 45 | }; 46 | 47 | #endif -------------------------------------------------------------------------------- /global localization/live/cpp/include/gnss_reader/IGNSSReader.h: -------------------------------------------------------------------------------- 1 | #ifndef I_GNSS_READER_H 2 | #define I_GNSS_READER_H 3 | 4 | #include 5 | 6 | /** 7 | * @brief IGNSSRead is a common interface for reading data from an external GNSS sensor. 8 | * You can write your own gnss reader that match with your GNSS sensor: 9 | */ 10 | class IGNSSReader{ 11 | public: 12 | /** 13 | * @brief Initialize the GNSS sensor and is waiting for the first GNSS fix. 14 | * 15 | */ 16 | virtual void initialize() = 0; 17 | /** 18 | * @brief read next GNSS measurement. This function block until a GNSS measurement is retrieved. 19 | * 20 | * @return sl::GNSSData next GNSS measurement. 21 | */ 22 | virtual sl::GNSSData getNextGNSSValue() = 0; 23 | 24 | virtual sl::ERROR_CODE grab(sl::GNSSData & current_data) = 0; 25 | }; 26 | 27 | #endif -------------------------------------------------------------------------------- /global localization/live/python/requirements.txt: -------------------------------------------------------------------------------- 1 | PyOpenGL 2 | gpsdclient -------------------------------------------------------------------------------- /global localization/map server/README.md: -------------------------------------------------------------------------------- 1 | # Live Server 2 | 3 | ## Overview 4 | 5 | This sample displays in real-time the result of the [Live sample](../README.md) in a web browser with [Leaflet](https://leafletjs.com/). 6 | 7 | ## Usage 8 | 9 | In order to use this sample, you need to run a simple HTTP web server. 10 | 11 | With Python, you can run: 12 | 13 | ```bash 14 | python -m http.server 8000 15 | # or 16 | python3 -m http.server 8000 17 | ``` 18 | 19 | > **Note**: The map will be available on http://localhost:8000/. 20 | -------------------------------------------------------------------------------- /global localization/map server/assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stereolabs/zed-sdk/e52c8385ede3c5ac6a6c914ed35b3bedf92c961c/global localization/map server/assets/favicon.ico -------------------------------------------------------------------------------- /global localization/map server/assets/leaflet-elipse/README.md: -------------------------------------------------------------------------------- 1 | Leaflet.ellipse 2 | =============== 3 | 4 | A basic ellipse type for [Leaflet](http://leafletjs.com), a JS 5 | library for interactive maps. Allows specification of semi-major and 6 | semi-minor axis as well as a tilt degrees from west. 7 | 8 | *Supports Leaflet 1.0.0 or newer.* 9 | 10 | ## Supported browsers 11 | 12 | * Internet Explorer 10+ 13 | * Google Chrome 14 | * Safari 15 | * Firefox 17+ 16 | 17 | ## Demo 18 | 19 | A demo is available on the Github Pages webpage for Leaflet.ellipse [here](http://jdfergason.github.io/Leaflet.Ellipse/). 20 | 21 | ## Usage 22 | 23 | Include the ellipse javasript file: 24 | 25 | 26 | 27 | After instantiating the map create a new ellipse. 28 | 29 | var ellipse = L.ellipse([51.5, -0.09], [500, 100], 90).addTo(map); 30 | 31 | ## API 32 | 33 | *Factory method* 34 | 35 | L.ellipse( latlng, radii, tilt, 36 | options? ) 37 | 38 | * latlng - The position of the center of the ellipse. 39 | * radii - The semi-major and semi-minor axis in meters 40 | * tilt - The rotation of the ellipse in degrees from west 41 | * options - Options dictionary to pass to L.Path 42 | 43 | ## License 44 | 45 | This code is provided under the Apache 2.0 license. 46 | -------------------------------------------------------------------------------- /global localization/map server/assets/leaflet-elipse/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "leaflet-ellipse", 3 | "version": "0.9.1", 4 | "description": "A basic ellipse type for Leaflet, a JS library for interactive maps.", 5 | "main": "l.ellipse.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git://github.com/jdfergason/Leaflet.Ellipse" 9 | }, 10 | "keywords": [ 11 | "gis", 12 | "map" 13 | ], 14 | "license": "Apache 2.0" 15 | } 16 | -------------------------------------------------------------------------------- /global localization/map server/assets/leaflet/images/layers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stereolabs/zed-sdk/e52c8385ede3c5ac6a6c914ed35b3bedf92c961c/global localization/map server/assets/leaflet/images/layers.png -------------------------------------------------------------------------------- /global localization/playback/cpp/cmake/FindGPS.cmake: -------------------------------------------------------------------------------- 1 | find_path(GPS_INCLUDE_DIR NAMES gps.h DOC "libgps include directory") 2 | find_library(GPS_LIBRARY NAMES gps DOC "libgps library") 3 | 4 | if(GPS_INCLUDE_DIR) 5 | file(STRINGS ${GPS_INCLUDE_DIR}/gps.h _version_lines REGEX "GPSD_API_(MAJOR|MINOR)_VERSION") 6 | string(REGEX MATCH "MAJOR_VERSION[ \t]+([0-9]+)" _version_major ${_version_lines}) 7 | set(GPS_VERSION_MAJOR ${CMAKE_MATCH_1}) 8 | string(REGEX MATCH "MINOR_VERSION[ \t]+([0-9]+)" _version_minor ${_version_lines}) 9 | set(GPS_VERSION_MINOR ${CMAKE_MATCH_1}) 10 | set(GPS_VERSION_STRING "${GPS_VERSION_MAJOR}.${GPS_VERSION_MINOR}") 11 | endif() 12 | 13 | include(FindPackageHandleStandardArgs) 14 | find_package_handle_standard_args(GPS 15 | REQUIRED_VARS GPS_INCLUDE_DIR GPS_LIBRARY 16 | VERSION_VAR GPS_VERSION_STRING) 17 | 18 | if(GPS_FOUND AND NOT TARGET GPS::GPS) 19 | add_library(GPS::GPS UNKNOWN IMPORTED) 20 | set_target_properties(GPS::GPS PROPERTIES 21 | IMPORTED_LOCATION "${GPS_LIBRARY}" 22 | INTERFACE_INCLUDE_DIRECTORIES "${GPS_INCLUDE_DIR}") 23 | endif() 24 | 25 | mark_as_advanced(GPS_INCLUDE_DIR GPS_LIBRARY) 26 | set(GPS_INCLUDE_DIRS ${GPS_INCLUDE_DIR}) 27 | set(GPS_LIBRARIES ${GPS_LIBRARY}) 28 | -------------------------------------------------------------------------------- /global localization/playback/cpp/include/GNSSReplay.hpp: -------------------------------------------------------------------------------- 1 | #ifndef GPSD_Replay_H 2 | #define GPSD_Replay_H 3 | 4 | #include 5 | #include 6 | 7 | #include "json.hpp" 8 | 9 | /** 10 | * @brief GNSSReplay is a common interface that read GNSS saved data 11 | */ 12 | class GNSSReplay { 13 | public: 14 | GNSSReplay(std::string file_name, sl::Camera *zed = 0); 15 | ~GNSSReplay(); 16 | /** 17 | * @brief Initialize the GNSS sensor and is waiting for the first GNSS fix. 18 | * 19 | */ 20 | void initialize_from_json(); 21 | 22 | void initialize_from_svov2(sl::Camera *zed); 23 | 24 | void close(); 25 | 26 | 27 | sl::FUSION_ERROR_CODE grab(sl::GNSSData & current_data, uint64_t current_timestamp); 28 | 29 | protected: 30 | 31 | sl::GNSSData getNextGNSSValue(uint64_t current_timestamp); 32 | 33 | std::string _file_name; 34 | unsigned current_gnss_idx = 0; 35 | unsigned long long previous_ts = 0; 36 | unsigned long long last_cam_ts = 0; 37 | nlohmann::json gnss_data; 38 | }; 39 | 40 | #endif -------------------------------------------------------------------------------- /global localization/playback/cpp/include/exporter/KMLExporter.h: -------------------------------------------------------------------------------- 1 | #ifndef KML_EXPORTER_H 2 | #define KML_EXPORTER_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | /** 10 | * @brief Save GeoPose in KML file that can be displayed into google map (maps.google.com) 11 | * 12 | * @param file_path path expected for the resulted KML file 13 | * @param geopose current data to save 14 | */ 15 | void saveKMLData(std::string file_path, sl::GeoPose geopose); 16 | /** 17 | * @brief Save GNSSData in KML file that can be displayed into google map (maps.google.com) 18 | * 19 | * @param file_path path expected for the resulted KML file 20 | * @param gnss_data current data to save 21 | */ 22 | void saveKMLData(std::string file_path, sl::GNSSData gnss_data); 23 | /** 24 | * @brief Close all KML file writer and place KML files footer 25 | * 26 | */ 27 | void closeAllKMLWriter(); 28 | 29 | #endif -------------------------------------------------------------------------------- /global localization/playback/python/requirements.txt: -------------------------------------------------------------------------------- 1 | PyOpenGL 2 | opencv-python -------------------------------------------------------------------------------- /global localization/recording/cpp/cmake/FindGPS.cmake: -------------------------------------------------------------------------------- 1 | find_path(GPS_INCLUDE_DIR NAMES gps.h DOC "libgps include directory") 2 | find_library(GPS_LIBRARY NAMES gps DOC "libgps library") 3 | 4 | if(GPS_INCLUDE_DIR) 5 | file(STRINGS ${GPS_INCLUDE_DIR}/gps.h _version_lines REGEX "GPSD_API_(MAJOR|MINOR)_VERSION") 6 | string(REGEX MATCH "MAJOR_VERSION[ \t]+([0-9]+)" _version_major ${_version_lines}) 7 | set(GPS_VERSION_MAJOR ${CMAKE_MATCH_1}) 8 | string(REGEX MATCH "MINOR_VERSION[ \t]+([0-9]+)" _version_minor ${_version_lines}) 9 | set(GPS_VERSION_MINOR ${CMAKE_MATCH_1}) 10 | set(GPS_VERSION_STRING "${GPS_VERSION_MAJOR}.${GPS_VERSION_MINOR}") 11 | endif() 12 | 13 | include(FindPackageHandleStandardArgs) 14 | find_package_handle_standard_args(GPS 15 | REQUIRED_VARS GPS_INCLUDE_DIR GPS_LIBRARY 16 | VERSION_VAR GPS_VERSION_STRING) 17 | 18 | if(GPS_FOUND AND NOT TARGET GPS::GPS) 19 | add_library(GPS::GPS UNKNOWN IMPORTED) 20 | set_target_properties(GPS::GPS PROPERTIES 21 | IMPORTED_LOCATION "${GPS_LIBRARY}" 22 | INTERFACE_INCLUDE_DIRECTORIES "${GPS_INCLUDE_DIR}") 23 | endif() 24 | 25 | mark_as_advanced(GPS_INCLUDE_DIR GPS_LIBRARY) 26 | set(GPS_INCLUDE_DIRS ${GPS_INCLUDE_DIR}) 27 | set(GPS_LIBRARIES ${GPS_LIBRARY}) 28 | -------------------------------------------------------------------------------- /global localization/recording/cpp/include/exporter/GNSSSaver.h: -------------------------------------------------------------------------------- 1 | #ifndef GNSS_SAVER_H 2 | #define GNSS_SAVER_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class GNSSSaver { 9 | public: 10 | /** 11 | * @brief Construct a new GNSSSaver object 12 | * Either recorded to a json file or directly in SVO2 custom data 13 | * 14 | */ 15 | GNSSSaver(sl::Camera *zed = 0); 16 | /** 17 | * @brief Destroy the GNSSSaver object 18 | * 19 | */ 20 | ~GNSSSaver(); 21 | /** 22 | * @brief Add the input gnss_data into the exported GNSS json file 23 | * 24 | * @param gnss_data gnss data to add 25 | */ 26 | void addGNSSData(sl::GNSSData gnss_data); 27 | 28 | protected: 29 | /** 30 | * @brief Save all added data into the exported json file 31 | * 32 | */ 33 | void saveAllData(); 34 | std::string file_path; 35 | std::vector all_gnss_data; 36 | sl::Camera *p_zed = 0; 37 | }; 38 | 39 | #endif -------------------------------------------------------------------------------- /global localization/recording/cpp/include/exporter/KMLExporter.h: -------------------------------------------------------------------------------- 1 | #ifndef KML_EXPORTER_H 2 | #define KML_EXPORTER_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | /** 10 | * @brief Save GeoPose in KML file that can be displayed into google map (maps.google.com) 11 | * 12 | * @param file_path path expected for the resulted KML file 13 | * @param geopose current data to save 14 | */ 15 | void saveKMLData(std::string file_path, sl::GeoPose geopose); 16 | /** 17 | * @brief Save GNSSData in KML file that can be displayed into google map (maps.google.com) 18 | * 19 | * @param file_path path expected for the resulted KML file 20 | * @param gnss_data current data to save 21 | */ 22 | void saveKMLData(std::string file_path, sl::GNSSData gnss_data); 23 | /** 24 | * @brief Close all KML file writer and place KML files footer 25 | * 26 | */ 27 | void closeAllKMLWriter(); 28 | 29 | #endif -------------------------------------------------------------------------------- /global localization/recording/cpp/include/gnss_reader/GPSDReader.hpp: -------------------------------------------------------------------------------- 1 | #ifndef GPSD_Reader_H 2 | #define GPSD_Reader_H 3 | 4 | #include 5 | #include 6 | #ifdef GPSD_FOUND 7 | #include 8 | #endif 9 | #include "IGNSSReader.h" 10 | 11 | /** 12 | * @brief GPSDReader is a common interface that use GPSD for retrieving GNSS data. 13 | * 14 | */ 15 | class GPSDReader : public IGNSSReader 16 | { 17 | public: 18 | GPSDReader(); 19 | ~GPSDReader(); 20 | /** 21 | * @brief Initialize the GNSS sensor and is waiting for the first GNSS fix. 22 | * 23 | */ 24 | virtual void initialize(); 25 | /** 26 | * @brief read next GNSS measurement. This function block until a GNSS measurement is retrieved. 27 | * 28 | * @return sl::GNSSData next GNSS measurement. 29 | */ 30 | virtual sl::GNSSData getNextGNSSValue(); 31 | 32 | virtual sl::ERROR_CODE grab(sl::GNSSData & current_data); 33 | 34 | protected: 35 | void grabGNSSData(); 36 | std::thread grab_gnss_data; 37 | bool continue_to_grab = true; 38 | bool new_data=false; 39 | bool is_initialized=false; 40 | std::mutex is_initialized_mtx; 41 | sl::GNSSData current_gnss_data; 42 | #ifdef GPSD_FOUND 43 | std::unique_ptr gnss_getter; 44 | #endif 45 | }; 46 | 47 | #endif -------------------------------------------------------------------------------- /global localization/recording/cpp/include/gnss_reader/IGNSSReader.h: -------------------------------------------------------------------------------- 1 | #ifndef I_GNSS_READER_H 2 | #define I_GNSS_READER_H 3 | 4 | #include 5 | 6 | /** 7 | * @brief IGNSSRead is a common interface for reading data from an external GNSS sensor. 8 | * We can write your own gnss reader that math with your GNSS sensor: 9 | * 10 | */ 11 | class IGNSSReader{ 12 | public: 13 | /** 14 | * @brief Initialize the GNSS sensor and is waiting for the first GNSS fix. 15 | * 16 | */ 17 | virtual void initialize() = 0; 18 | /** 19 | * @brief read next GNSS measurement. This function block until a GNSS measurement is retrieved. 20 | * 21 | * @return sl::GNSSData next GNSS measurement. 22 | */ 23 | virtual sl::GNSSData getNextGNSSValue() = 0; 24 | 25 | virtual sl::ERROR_CODE grab(sl::GNSSData & current_data) = 0; 26 | }; 27 | 28 | #endif -------------------------------------------------------------------------------- /global localization/recording/cpp/include/utils.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2025, STEREOLABS. 4 | // 5 | // All rights reserved. 6 | // 7 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 18 | // 19 | /////////////////////////////////////////////////////////////////////////// 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | static bool exit_app = false; 26 | 27 | // Set the function to handle the CTRL-C 28 | void SetCtrlHandler() ; 29 | 30 | /** 31 | * @brief Get the current datetime in human readable string 32 | * 33 | * @return std::string current_data in human readable string 34 | */ 35 | std::string getCurrentDatetime(); -------------------------------------------------------------------------------- /global localization/recording/cpp/src/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.hpp" 2 | 3 | #include 4 | 5 | // Handle the CTRL-C keyboard signal 6 | #ifdef _WIN32 7 | #include 8 | 9 | void CtrlHandler(DWORD fdwCtrlType) { 10 | exit_app = (fdwCtrlType == CTRL_C_EVENT); 11 | } 12 | #else 13 | #include 14 | void nix_exit_handler(int s) { 15 | exit_app = true; 16 | } 17 | #endif 18 | 19 | // Set the function to handle the CTRL-C 20 | void SetCtrlHandler() { 21 | 22 | std::cout<<"CTRL-C to exit"< 6 | 7 |

8 | 9 | ## Overview 10 | 11 | This section contains the following code samples: 12 | 13 | - [Birds Eye Viewer](./birds%20eye%20viewer/) Detected objects are presented in a top-down view alongside the 3D point cloud, providing an intuitive perspective on object placement. 14 | 15 | - [Concurrent Detections](./concurrent%20detections/): This sample demonstrates how to simultaneously run **Object detection** and **Body Tracking** modules, which allow to use of both detectors in a single application. 16 | 17 | - [Image Viewer](./image%20viewer/): Detected objects are displayed in a 2D view making it simple to identify and track objects of interest. 18 | 19 | - [Custom Detector](./custom%20detector/): This sample shows how to use a custom object detector on ZED images. The ZED SDK then computes 3D information and performs object tracking on detected objects. 20 | -------------------------------------------------------------------------------- /object detection/birds eye viewer/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Object Detection 2 | 3 | ## This sample shows how to detect and track objects in space. 4 | 5 | ### Features 6 | - The camera point cloud is displayed in a 3D OpenGL view 7 | - 3D bounding boxes around detected objects are drawn 8 | - Objects classes and confidences can be changed 9 | 10 | ![](object_detection.jpg) 11 | 12 | 13 | >*NOTE: The ZED v1 is not compatible with this module* 14 | -------------------------------------------------------------------------------- /object detection/birds eye viewer/csharp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /object detection/birds eye viewer/csharp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required( VERSION 3.8.0 ) 2 | 3 | project(ZED_Object_detection_birds_eye CSharp) 4 | 5 | add_executable(${PROJECT_NAME} 6 | Program.cs 7 | MainWindow.cs 8 | GLViewer.cs 9 | BatchSystemHandler.cs 10 | TrackingViewer.cs 11 | Utils.cs 12 | App.config 13 | packages.config 14 | Properties/AssemblyInfo.cs 15 | ) 16 | 17 | # Set the target platform to x64, since ZED SDK does not support 32-bits arch 18 | target_compile_options(${PROJECT_NAME} PRIVATE "/platform:x64" ) 19 | 20 | # Set the .NET Framework version for the target. 21 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1") 22 | 23 | # Set the C# language version, otherwise default 3.0 is taken 24 | set(CMAKE_CSharp_FLAGS "/langversion:7") 25 | 26 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCES 27 | "Microsoft.CSharp" 28 | "PresentationCore" 29 | "PresentationFramework" 30 | "System" 31 | "System.Xaml" 32 | "System.Data" 33 | "System.Linq" 34 | "System.Windows" 35 | "System.Windows.Forms" 36 | "System.Numerics" 37 | "System.Drawing" 38 | "WindowsBase" 39 | ) 40 | 41 | set(CMAKE_SUPPRESS_REGENERATION true) 42 | 43 | 44 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_PACKAGE_REFERENCES 45 | "OpenGL.Net_0.8.4" 46 | "OpenGL.Net.CoreUI_0.8.4" 47 | "OpenCvSharp4.Windows_4.5.0.20201013" 48 | "Stereolabs.zed_5.*" 49 | ) 50 | 51 | -------------------------------------------------------------------------------- /object detection/birds eye viewer/csharp/Program.cs: -------------------------------------------------------------------------------- 1 | //======= Copyright (c) Stereolabs Corporation, All rights reserved. =============== 2 | using System; 3 | using System.Runtime.InteropServices; 4 | using System.Threading.Tasks; 5 | 6 | namespace sl 7 | { 8 | class Program 9 | { 10 | [STAThread] 11 | static void Main(string[] args) 12 | { 13 | MainWindow window = new MainWindow(args); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /object detection/birds eye viewer/csharp/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Ce code a été généré par un outil. 4 | // Version du runtime :4.0.30319.42000 5 | // 6 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 7 | // le code est régénéré. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Image_capture.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /object detection/birds eye viewer/csharp/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /object detection/birds eye viewer/csharp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Object Detection 2 | 3 | This sample shows how to detect and track objects in space. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/), NuGet packages are automatically downloaded 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | 12 | ## Run the program 13 | *NOTE: The ZED v1 is not compatible with this module* 14 | - Navigate to the build directory and launch the executable 15 | - Or open a terminal in the build directory and run the sample : 16 | 17 | ./ZED_Object_detection_birds_eye 18 | 19 | ### Features 20 | - The camera point cloud is displayed in a 3D OpenGL view 21 | - 3D bounding boxes around detected objects are drawn 22 | - Objects classes and confidences can be changed 23 | 24 | ## Support 25 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /object detection/birds eye viewer/csharp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /object detection/birds eye viewer/object_detection.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stereolabs/zed-sdk/e52c8385ede3c5ac6a6c914ed35b3bedf92c961c/object detection/birds eye viewer/object_detection.jpg -------------------------------------------------------------------------------- /object detection/birds eye viewer/python/cv_viewer/utils.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | import pyzed.sl as sl 4 | 5 | id_colors = [(232, 176,59), 6 | (175, 208,25), 7 | (102, 205,105), 8 | (185, 0 ,255), 9 | (99, 107,252)] 10 | 11 | 12 | def render_object(object_data, is_tracking_on): 13 | if is_tracking_on: 14 | return (object_data.tracking_state == sl.OBJECT_TRACKING_STATE.OK) 15 | else: 16 | return ((object_data.tracking_state == sl.OBJECT_TRACKING_STATE.OK) or (object_data.tracking_state == sl.OBJECT_TRACKING_STATE.OFF)) 17 | 18 | def generate_color_id_u(idx): 19 | arr = [] 20 | if(idx < 0): 21 | arr = [236,184,36,255] 22 | else: 23 | color_idx = idx % 5 24 | arr = [id_colors[color_idx][0], id_colors[color_idx][1], id_colors[color_idx][2], 255] 25 | return arr 26 | 27 | def draw_vertical_line(left_display, start_pt, end_pt, clr, thickness): 28 | n_steps = 7 29 | pt1 = [((n_steps - 1) * start_pt[0] + end_pt[0]) / n_steps 30 | , ((n_steps - 1) * start_pt[1] + end_pt[1]) / n_steps] 31 | pt4 = [(start_pt[0] + (n_steps - 1) * end_pt[0]) / n_steps 32 | , (start_pt[1] + (n_steps - 1) * end_pt[1]) / n_steps] 33 | 34 | cv2.line(left_display, (int(start_pt[0]),int(start_pt[1])), (int(pt1[0]), int(pt1[1])), clr, thickness) 35 | cv2.line(left_display, (int(pt4[0]), int(pt4[1])), (int(end_pt[0]),int(end_pt[1])), clr, thickness) -------------------------------------------------------------------------------- /object detection/concurrent detections/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Multi Instance Object Detection 2 | 3 | ## This sample shows how to detect and track objects in space as well as body tracking 4 | 5 | ### Features 6 | - The camera point cloud is displayed in a 3D OpenGL view 7 | - 3D bounding boxes and human skeletons around detected objects are drawn 8 | - Objects classes and confidences can be changed 9 | 10 | 11 | >*NOTE: The ZED v1 is not compatible with this module* 12 | -------------------------------------------------------------------------------- /object detection/concurrent detections/cpp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Multi Instance Object Detection 2 | 3 | This sample shows how to detect and track objects in space as well as human body tracking. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | - Build for [Linux/Jetson](https://www.stereolabs.com/docs/app-development/cpp/linux/) 12 | 13 | ## Run the program 14 | *NOTE: The ZED v1 is not compatible with this module* 15 | - Navigate to the build directory and launch the executable 16 | - Or open a terminal in the build directory and run the sample : 17 | 18 | ./ZED_Object_detection_multi_instance 19 | 20 | ### Features 21 | - The camera point cloud is displayed in a 3D OpenGL view 22 | - 3D bounding boxes and human skeletons around detected objects are drawn 23 | - Objects classes and confidences can be changed 24 | 25 | ## Support 26 | If you need assistance go to our Community site at https://community.stereolabs.com/ 27 | -------------------------------------------------------------------------------- /object detection/concurrent detections/python/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Multi Instance Object Detection 2 | 3 | This sample shows how to detect and track objects in space as well as human body tracking. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | - Build for [Linux/Jetson](https://www.stereolabs.com/docs/app-development/cpp/linux/) 12 | 13 | ## Run the program 14 | *NOTE: The ZED v1 is not compatible with this module* 15 | - Navigate to the build directory and launch the executable 16 | - Or open a terminal in the build directory and run the sample : 17 | 18 | python concurrent_object_detection_body_tracking.py 19 | 20 | ### Features 21 | - The camera point cloud is displayed in a 3D OpenGL view 22 | - 3D bounding boxes and human skeletons around detected objects are drawn 23 | - Objects classes and confidences can be changed 24 | 25 | ## Support 26 | If you need assistance go to our Community site at https://community.stereolabs.com/ 27 | -------------------------------------------------------------------------------- /object detection/concurrent detections/python/cv_viewer/utils.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | import pyzed.sl as sl 4 | 5 | id_colors = [(232, 176,59), 6 | (175, 208,25), 7 | (102, 205,105), 8 | (185, 0 ,255), 9 | (99, 107,252)] 10 | 11 | 12 | def render_object(object_data, is_tracking_on): 13 | if is_tracking_on: 14 | return (object_data.tracking_state == sl.OBJECT_TRACKING_STATE.OK) 15 | else: 16 | return ((object_data.tracking_state == sl.OBJECT_TRACKING_STATE.OK) or (object_data.tracking_state == sl.OBJECT_TRACKING_STATE.OFF)) 17 | 18 | def generate_color_id_u(idx): 19 | arr = [] 20 | if(idx < 0): 21 | arr = [236,184,36,255] 22 | else: 23 | color_idx = idx % 5 24 | arr = [id_colors[color_idx][0], id_colors[color_idx][1], id_colors[color_idx][2], 255] 25 | return arr 26 | 27 | def draw_vertical_line(left_display, start_pt, end_pt, clr, thickness): 28 | n_steps = 7 29 | pt1 = [((n_steps - 1) * start_pt[0] + end_pt[0]) / n_steps 30 | , ((n_steps - 1) * start_pt[1] + end_pt[1]) / n_steps] 31 | pt4 = [(start_pt[0] + (n_steps - 1) * end_pt[0]) / n_steps 32 | , (start_pt[1] + (n_steps - 1) * end_pt[1]) / n_steps] 33 | 34 | cv2.line(left_display, (int(start_pt[0]),int(start_pt[1])), (int(pt1[0]), int(pt1[1])), clr, thickness) 35 | cv2.line(left_display, (int(pt4[0]), int(pt4[1])), (int(end_pt[0]),int(end_pt[1])), clr, thickness) -------------------------------------------------------------------------------- /object detection/custom detector/cpp/opencv_dnn_yolov4/coco.names.txt: -------------------------------------------------------------------------------- 1 | person 2 | bicycle 3 | car 4 | motorbike 5 | aeroplane 6 | bus 7 | train 8 | truck 9 | boat 10 | traffic light 11 | fire hydrant 12 | stop sign 13 | parking meter 14 | bench 15 | bird 16 | cat 17 | dog 18 | horse 19 | sheep 20 | cow 21 | elephant 22 | bear 23 | zebra 24 | giraffe 25 | backpack 26 | umbrella 27 | handbag 28 | tie 29 | suitcase 30 | frisbee 31 | skis 32 | snowboard 33 | sports ball 34 | kite 35 | baseball bat 36 | baseball glove 37 | skateboard 38 | surfboard 39 | tennis racket 40 | bottle 41 | wine glass 42 | cup 43 | fork 44 | knife 45 | spoon 46 | bowl 47 | banana 48 | apple 49 | sandwich 50 | orange 51 | broccoli 52 | carrot 53 | hot dog 54 | pizza 55 | donut 56 | cake 57 | chair 58 | sofa 59 | pottedplant 60 | bed 61 | diningtable 62 | toilet 63 | tvmonitor 64 | laptop 65 | mouse 66 | remote 67 | keyboard 68 | cell phone 69 | microwave 70 | oven 71 | toaster 72 | sink 73 | refrigerator 74 | book 75 | clock 76 | vase 77 | scissors 78 | teddy bear 79 | hair drier 80 | toothbrush 81 | -------------------------------------------------------------------------------- /object detection/custom detector/cpp/tensorrt_yolov5-v6-v8_onnx/include/cuda_utils.h: -------------------------------------------------------------------------------- 1 | #ifndef TRTX_CUDA_UTILS_H_ 2 | #define TRTX_CUDA_UTILS_H_ 3 | 4 | #include 5 | 6 | #ifndef CUDA_CHECK 7 | #define CUDA_CHECK(callstr)\ 8 | {\ 9 | cudaError_t error_code = callstr;\ 10 | if (error_code != cudaSuccess) {\ 11 | std::cerr << "CUDA error " << error_code << " at " << __FILE__ << ":" << __LINE__;\ 12 | assert(0);\ 13 | }\ 14 | } 15 | #endif // CUDA_CHECK 16 | 17 | #endif // TRTX_CUDA_UTILS_H_ 18 | 19 | -------------------------------------------------------------------------------- /object detection/custom detector/cpp/tensorrt_yolov5-v6-v8_onnx_async/include/cuda_utils.h: -------------------------------------------------------------------------------- 1 | #ifndef TRTX_CUDA_UTILS_H_ 2 | #define TRTX_CUDA_UTILS_H_ 3 | 4 | #include 5 | 6 | #ifndef CUDA_CHECK 7 | #define CUDA_CHECK(callstr)\ 8 | {\ 9 | cudaError_t error_code = callstr;\ 10 | if (error_code != cudaSuccess) {\ 11 | std::cerr << "CUDA error " << error_code << " at " << __FILE__ << ":" << __LINE__;\ 12 | assert(0);\ 13 | }\ 14 | } 15 | #endif // CUDA_CHECK 16 | 17 | #endif // TRTX_CUDA_UTILS_H_ 18 | 19 | -------------------------------------------------------------------------------- /object detection/custom detector/cpp/tensorrt_yolov8_seg_onnx/include/yolov8-seg_optim.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __YOLOV8SEG_OPTIM_HPP__ 2 | #define __YOLOV8SEG_OPTIM_HPP__ 3 | 4 | #include 5 | 6 | #include 7 | 8 | struct OptimDim { 9 | nvinfer1::Dims4 size; 10 | std::string tensor_name; 11 | 12 | int setFromString(std::string const& arg); 13 | }; 14 | 15 | int build_engine(std::string const& onnx_path, std::string const& engine_path, OptimDim const& dyn_dim_profile); 16 | 17 | #endif // __YOLOV8SEG_OPTIM_HPP__ -------------------------------------------------------------------------------- /object detection/custom detector/python/pytorch_yolov5/cv_viewer/utils.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | import pyzed.sl as sl 4 | 5 | id_colors = [(232, 176, 59), 6 | (175, 208, 25), 7 | (102, 205, 105), 8 | (185, 0, 255), 9 | (99, 107, 252)] 10 | 11 | 12 | def render_object(object_data, is_tracking_on): 13 | if is_tracking_on: 14 | return object_data.tracking_state == sl.OBJECT_TRACKING_STATE.OK 15 | else: 16 | return (object_data.tracking_state == sl.OBJECT_TRACKING_STATE.OK) or ( 17 | object_data.tracking_state == sl.OBJECT_TRACKING_STATE.OFF) 18 | 19 | 20 | def generate_color_id_u(idx): 21 | arr = [] 22 | if idx < 0: 23 | arr = [236, 184, 36, 255] 24 | else: 25 | color_idx = idx % 5 26 | arr = [id_colors[color_idx][0], id_colors[color_idx][1], id_colors[color_idx][2], 255] 27 | return arr 28 | 29 | 30 | def draw_vertical_line(left_display, start_pt, end_pt, clr, thickness): 31 | n_steps = 7 32 | pt1 = [((n_steps - 1) * start_pt[0] + end_pt[0]) / n_steps 33 | , ((n_steps - 1) * start_pt[1] + end_pt[1]) / n_steps] 34 | pt4 = [(start_pt[0] + (n_steps - 1) * end_pt[0]) / n_steps 35 | , (start_pt[1] + (n_steps - 1) * end_pt[1]) / n_steps] 36 | 37 | cv2.line(left_display, (int(start_pt[0]), int(start_pt[1])), (int(pt1[0]), int(pt1[1])), clr, thickness) 38 | cv2.line(left_display, (int(pt4[0]), int(pt4[1])), (int(end_pt[0]), int(end_pt[1])), clr, thickness) 39 | -------------------------------------------------------------------------------- /object detection/custom detector/python/pytorch_yolov8/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Object Detection 2 | 3 | This sample shows how to detect custom objects using the official Pytorch implementation of YOLOv8 from a ZED camera and ingest them into the ZED SDK to extract 3D informations and tracking for each objects. 4 | 5 | ## Getting Started 6 | 7 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) and [pyZED Package](https://www.stereolabs.com/docs/app-development/python/install/) 8 | - Check the [Documentation](https://www.stereolabs.com/docs/object-detection/custom-od/) 9 | 10 | ## Setting up 11 | 12 | - Install yolov8 using pip 13 | 14 | ```sh 15 | pip install ultralytics 16 | ``` 17 | 18 | ## Run the program 19 | 20 | *NOTE: The ZED v1 is not compatible with this module* 21 | 22 | ``` 23 | python detector.py --weights yolov8m.pt # [--img_size 512 --conf_thres 0.1 --svo path/to/file.svo] 24 | ``` 25 | 26 | ### Features 27 | 28 | - The camera point cloud is displayed in a 3D OpenGL view 29 | - 3D bounding boxes around detected objects are drawn 30 | - Objects classes and confidences can be changed 31 | 32 | ## Training your own model 33 | 34 | This sample can use any model trained with YOLOv8, including custom trained one. For a getting started on how to trained a model on a custom dataset with YOLOv5, see here https://docs.ultralytics.com/tutorials/train-custom-datasets/ 35 | 36 | ## Support 37 | 38 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /object detection/custom detector/python/pytorch_yolov8/cv_viewer/utils.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | import pyzed.sl as sl 4 | 5 | id_colors = [(232, 176, 59), 6 | (175, 208, 25), 7 | (102, 205, 105), 8 | (185, 0, 255), 9 | (99, 107, 252)] 10 | 11 | 12 | def render_object(object_data, is_tracking_on): 13 | if is_tracking_on: 14 | return object_data.tracking_state == sl.OBJECT_TRACKING_STATE.OK 15 | else: 16 | return (object_data.tracking_state == sl.OBJECT_TRACKING_STATE.OK) or ( 17 | object_data.tracking_state == sl.OBJECT_TRACKING_STATE.OFF) 18 | 19 | 20 | def generate_color_id_u(idx): 21 | arr = [] 22 | if idx < 0: 23 | arr = [236, 184, 36, 255] 24 | else: 25 | color_idx = idx % 5 26 | arr = [id_colors[color_idx][0], id_colors[color_idx][1], id_colors[color_idx][2], 255] 27 | return arr 28 | 29 | 30 | def draw_vertical_line(left_display, start_pt, end_pt, clr, thickness): 31 | n_steps = 7 32 | pt1 = [((n_steps - 1) * start_pt[0] + end_pt[0]) / n_steps 33 | , ((n_steps - 1) * start_pt[1] + end_pt[1]) / n_steps] 34 | pt4 = [(start_pt[0] + (n_steps - 1) * end_pt[0]) / n_steps 35 | , (start_pt[1] + (n_steps - 1) * end_pt[1]) / n_steps] 36 | 37 | cv2.line(left_display, (int(start_pt[0]), int(start_pt[1])), (int(pt1[0]), int(pt1[1])), clr, thickness) 38 | cv2.line(left_display, (int(pt4[0]), int(pt4[1])), (int(end_pt[0]), int(end_pt[1])), clr, thickness) 39 | -------------------------------------------------------------------------------- /object detection/custom detector/python/pytorch_yolov8_async/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Object Detection 2 | 3 | This sample shows how to detect custom objects using the official Pytorch implementation of YOLOv8 from a ZED camera and ingest them into the ZED SDK to extract 3D informations and tracking for each objects. 4 | 5 | ## Getting Started 6 | 7 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) and [pyZED Package](https://www.stereolabs.com/docs/app-development/python/install/) 8 | - Check the [Documentation](https://www.stereolabs.com/docs/object-detection/custom-od/) 9 | 10 | ## Setting up 11 | 12 | - Install yolov8 using pip 13 | 14 | ```sh 15 | pip install ultralytics 16 | ``` 17 | 18 | ## Run the program 19 | 20 | *NOTE: The ZED v1 is not compatible with this module* 21 | 22 | ``` 23 | python detector.py --weights yolov8m.pt # [--img_size 512 --conf_thres 0.1 --svo path/to/file.svo] 24 | ``` 25 | 26 | ### Features 27 | 28 | - The camera point cloud is displayed in a 3D OpenGL view 29 | - 3D bounding boxes around detected objects are drawn 30 | - Objects classes and confidences can be changed 31 | 32 | ## Training your own model 33 | 34 | This sample can use any model trained with YOLOv8, including custom trained one. For a getting started on how to trained a model on a custom dataset with YOLOv5, see here https://docs.ultralytics.com/tutorials/train-custom-datasets/ 35 | 36 | ## Support 37 | 38 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /object detection/custom detector/python/pytorch_yolov8_async/cv_viewer/utils.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | import pyzed.sl as sl 4 | 5 | id_colors = [(232, 176, 59), 6 | (175, 208, 25), 7 | (102, 205, 105), 8 | (185, 0, 255), 9 | (99, 107, 252)] 10 | 11 | 12 | def render_object(object_data, is_tracking_on): 13 | if is_tracking_on: 14 | return object_data.tracking_state == sl.OBJECT_TRACKING_STATE.OK 15 | else: 16 | return (object_data.tracking_state == sl.OBJECT_TRACKING_STATE.OK) or ( 17 | object_data.tracking_state == sl.OBJECT_TRACKING_STATE.OFF) 18 | 19 | 20 | def generate_color_id_u(idx): 21 | arr = [] 22 | if idx < 0: 23 | arr = [236, 184, 36, 255] 24 | else: 25 | color_idx = idx % 5 26 | arr = [id_colors[color_idx][0], id_colors[color_idx][1], id_colors[color_idx][2], 255] 27 | return arr 28 | 29 | 30 | def draw_vertical_line(left_display, start_pt, end_pt, clr, thickness): 31 | n_steps = 7 32 | pt1 = [((n_steps - 1) * start_pt[0] + end_pt[0]) / n_steps 33 | , ((n_steps - 1) * start_pt[1] + end_pt[1]) / n_steps] 34 | pt4 = [(start_pt[0] + (n_steps - 1) * end_pt[0]) / n_steps 35 | , (start_pt[1] + (n_steps - 1) * end_pt[1]) / n_steps] 36 | 37 | cv2.line(left_display, (int(start_pt[0]), int(start_pt[1])), (int(pt1[0]), int(pt1[1])), clr, thickness) 38 | cv2.line(left_display, (int(pt4[0]), int(pt4[1])), (int(end_pt[0]), int(end_pt[1])), clr, thickness) 39 | -------------------------------------------------------------------------------- /object detection/custom detector/python/yolov5-v6-v8_onnx_internal/cv_viewer/utils.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | import pyzed.sl as sl 4 | 5 | id_colors = [(232, 176,59), 6 | (175, 208,25), 7 | (102, 205,105), 8 | (185, 0 ,255), 9 | (99, 107,252)] 10 | 11 | 12 | def render_object(object_data, is_tracking_on): 13 | if is_tracking_on: 14 | return (object_data.tracking_state == sl.OBJECT_TRACKING_STATE.OK) 15 | else: 16 | return ((object_data.tracking_state == sl.OBJECT_TRACKING_STATE.OK) or (object_data.tracking_state == sl.OBJECT_TRACKING_STATE.OFF)) 17 | 18 | def generate_color_id_u(idx): 19 | arr = [] 20 | if(idx < 0): 21 | arr = [236,184,36,255] 22 | else: 23 | color_idx = idx % 5 24 | arr = [id_colors[color_idx][0], id_colors[color_idx][1], id_colors[color_idx][2], 255] 25 | return arr 26 | 27 | def draw_vertical_line(left_display, start_pt, end_pt, clr, thickness): 28 | n_steps = 7 29 | pt1 = [((n_steps - 1) * start_pt[0] + end_pt[0]) / n_steps 30 | , ((n_steps - 1) * start_pt[1] + end_pt[1]) / n_steps] 31 | pt4 = [(start_pt[0] + (n_steps - 1) * end_pt[0]) / n_steps 32 | , (start_pt[1] + (n_steps - 1) * end_pt[1]) / n_steps] 33 | 34 | cv2.line(left_display, (int(start_pt[0]),int(start_pt[1])), (int(pt1[0]), int(pt1[1])), clr, thickness) 35 | cv2.line(left_display, (int(pt4[0]), int(pt4[1])), (int(end_pt[0]),int(end_pt[1])), clr, thickness) -------------------------------------------------------------------------------- /object detection/image viewer/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Object Detection 2 | 3 | ## This sample shows how to detect and track objects in space. 4 | 5 | ### Features 6 | - The camera image is displayed on a 2D OpenGL view 7 | - 3D bounding boxes around detected objects are drawn 8 | - Objects classes and confidences can be changed 9 | 10 | ![](object_detection.jpg) 11 | 12 | 13 | >*NOTE: The ZED v1 is not compatible with this module* 14 | -------------------------------------------------------------------------------- /object detection/image viewer/cpp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Object Detection 2 | 3 | This sample shows how to detect and track objects in space. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | - Build for [Linux/Jetson](https://www.stereolabs.com/docs/app-development/cpp/linux/) 12 | 13 | ## Run the program 14 | *NOTE: The ZED v1 is not compatible with this module* 15 | - Navigate to the build directory and launch the executable 16 | - Or open a terminal in the build directory and run the sample : 17 | 18 | ./ZED_Object_detection_image_viewer 19 | 20 | ### Features 21 | - The camera point cloud is displayed in a 3D OpenGL view 22 | - 3D bounding boxes around detected objects are drawn 23 | - Objects classes and confidences can be changed 24 | 25 | ## Support 26 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /object detection/image viewer/csharp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /object detection/image viewer/csharp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required( VERSION 3.8.0 ) 2 | 3 | project(ZED_Object_detection_image CSharp) 4 | 5 | add_executable(${PROJECT_NAME} 6 | Program.cs 7 | MainWindow.cs 8 | GLViewer.cs 9 | App.config 10 | packages.config 11 | Properties/AssemblyInfo.cs 12 | ) 13 | 14 | # Set the target platform to x64, since ZED SDK does not support 32-bits arch 15 | target_compile_options(${PROJECT_NAME} PRIVATE "/platform:x64" ) 16 | 17 | # Set the .NET Framework version for the target. 18 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1") 19 | 20 | # Set the C# language version, otherwise default 3.0 is taken 21 | set(CMAKE_CSharp_FLAGS "/langversion:7") 22 | 23 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCES 24 | "Microsoft.CSharp" 25 | "PresentationCore" 26 | "PresentationFramework" 27 | "System" 28 | "System.Xaml" 29 | "System.Data" 30 | "System.Linq" 31 | "System.Windows" 32 | "System.Windows.Forms" 33 | "System.Numerics" 34 | "System.Drawing" 35 | "WindowsBase" 36 | ) 37 | 38 | set(CMAKE_SUPPRESS_REGENERATION true) 39 | 40 | 41 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_PACKAGE_REFERENCES 42 | "OpenGL.Net_0.8.4" 43 | "OpenGL.Net.CoreUI_0.8.4" 44 | "Stereolabs.zed_5.*" 45 | ) 46 | -------------------------------------------------------------------------------- /object detection/image viewer/csharp/Program.cs: -------------------------------------------------------------------------------- 1 | //======= Copyright (c) Stereolabs Corporation, All rights reserved. =============== 2 | using System; 3 | using System.Runtime.InteropServices; 4 | using System.Threading.Tasks; 5 | 6 | namespace sl 7 | { 8 | class Program 9 | { 10 | [STAThread] 11 | static void Main(string[] args) 12 | { 13 | MainWindow window = new MainWindow(args); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /object detection/image viewer/csharp/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Ce code a été généré par un outil. 4 | // Version du runtime :4.0.30319.42000 5 | // 6 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 7 | // le code est régénéré. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Image_capture.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /object detection/image viewer/csharp/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /object detection/image viewer/csharp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Object Detection 2 | 3 | This sample shows how to detect and track objects in space. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/), NuGet packages are automatically downloaded 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | 12 | ## Run the program 13 | *NOTE: The ZED v1 is not compatible with this module* 14 | - Navigate to the build directory and launch the executable 15 | - Or open a terminal in the build directory and run the sample : 16 | 17 | ./ZED_Object_detection_image 18 | 19 | ### Features 20 | - The camera point cloud is displayed in a 3D OpenGL view 21 | - 3D bounding boxes around detected objects are drawn 22 | - Objects classes and confidences can be changed 23 | 24 | ## Support 25 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /object detection/image viewer/csharp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /object detection/image viewer/object_detection.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stereolabs/zed-sdk/e52c8385ede3c5ac6a6c914ed35b3bedf92c961c/object detection/image viewer/object_detection.jpg -------------------------------------------------------------------------------- /object detection/multi-camera/cpp/include/ClientPublisher.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __SENDER_RUNNER_HDR__ 2 | #define __SENDER_RUNNER_HDR__ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | #include 9 | 10 | struct Trigger{ 11 | 12 | void notifyZED() { 13 | cv.notify_all(); 14 | if (running) { 15 | bool wait_for_zed = true; 16 | size_t const nb_zed{states.size()}; 17 | while (wait_for_zed) { 18 | int count_r = 0; 19 | for (auto const& it : states) 20 | count_r += it.second; 21 | wait_for_zed = count_r != nb_zed; 22 | sl::sleep_ms(1); 23 | } 24 | for (auto &it : states) 25 | it.second = false; 26 | } 27 | } 28 | 29 | std::condition_variable cv; 30 | bool running = true; 31 | std::map states; 32 | }; 33 | 34 | class ClientPublisher{ 35 | 36 | public: 37 | ClientPublisher(); 38 | ~ClientPublisher(); 39 | 40 | bool open(const sl::InputType& input, Trigger* ref); 41 | void start(); 42 | void stop(); 43 | void setStartSVOPosition(const unsigned pos); 44 | 45 | private: 46 | sl::Camera zed; 47 | void work(); 48 | std::thread runner; 49 | int serial; 50 | std::mutex mtx; 51 | Trigger *p_trigger; 52 | }; 53 | 54 | #endif // ! __SENDER_RUNNER_HDR__ 55 | -------------------------------------------------------------------------------- /plane detection/README.md: -------------------------------------------------------------------------------- 1 | # Plane Detection Samples 2 | 3 | These samples show how to use ZED SDK for **plane detection**. You can find additional information on the Plane Detection features in our [Documentation](https://www.stereolabs.com/docs/spatial-mapping/plane-detection/). 4 | 5 |

6 | 7 |

8 | 9 | 10 | ## Overview 11 | 12 | This section contains the following code samples: 13 | 14 | - [Floor Plane Sample](./floor%20plane/): This sample shows two ways to automatically detect the floor plane and set it as origin of a virtual view. 15 | 16 | - [Plane Detection Sample](./plane%20detection/): This sample shows how to perform plane detection with a ZED Camera. You can use either the plane at hit functionality or the automatic floor plane detection. 17 | -------------------------------------------------------------------------------- /plane detection/plane detection/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Plane Detection 2 | 3 | ## This sample shows how to retrieve surfaces data. 4 | 5 | ## Features 6 | - Live image is displayed in an OpenGL window 7 | - click on the image to estimate the plane of the pointed surface 8 | - press 'Spacebar' to estimate the floor plane 9 | 10 | ![](plane_detection.jpg) -------------------------------------------------------------------------------- /plane detection/plane detection/cpp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Plane Detection 2 | 3 | This sample shows how to retrieve surfaces data. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | - Build for [Linux/Jetson](https://www.stereolabs.com/docs/app-development/cpp/linux/) 12 | 13 | ## Run the program 14 | - Navigate to the build directory and launch the executable 15 | - Or open a terminal in the build directory and run the sample : 16 | 17 | ./ZED_Plane_Detection 18 | 19 | ### Features 20 | - Live image is displayed in an OpenGL window 21 | - click on the image to estimate the plane of the pointed surface 22 | - press 'Spacebar' to estimate the floor plane 23 | 24 | ## Support 25 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /plane detection/plane detection/csharp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /plane detection/plane detection/csharp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required( VERSION 3.8.0 ) 2 | 3 | project(ZED_Plane_Detection CSharp) 4 | 5 | add_executable(${PROJECT_NAME} 6 | Program.cs 7 | MainWindow.cs 8 | GLViewer.cs 9 | App.config 10 | packages.config 11 | Properties/AssemblyInfo.cs 12 | ) 13 | 14 | # Set the target platform to x64, since ZED SDK does not support 32-bits arch 15 | target_compile_options(${PROJECT_NAME} PRIVATE "/platform:x64" ) 16 | 17 | # Set the .NET Framework version for the target. 18 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1") 19 | 20 | # Set the C# language version, otherwise default 3.0 is taken 21 | set(CMAKE_CSharp_FLAGS "/langversion:7") 22 | 23 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCES 24 | "Microsoft.CSharp" 25 | "PresentationCore" 26 | "PresentationFramework" 27 | "System" 28 | "System.Xaml" 29 | "System.Data" 30 | "System.Linq" 31 | "System.Windows" 32 | "System.Windows.Forms" 33 | "System.Numerics" 34 | "System.Drawing" 35 | "WindowsBase" 36 | ) 37 | 38 | set(CMAKE_SUPPRESS_REGENERATION true) 39 | 40 | 41 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_PACKAGE_REFERENCES 42 | "OpenGL.Net_0.8.4" 43 | "OpenGL.Net.CoreUI_0.8.4" 44 | "Stereolabs.zed_5.*" 45 | ) -------------------------------------------------------------------------------- /plane detection/plane detection/csharp/Program.cs: -------------------------------------------------------------------------------- 1 | //======= Copyright (c) Stereolabs Corporation, All rights reserved. =============== 2 | using System; 3 | using System.Runtime.InteropServices; 4 | using System.Threading.Tasks; 5 | 6 | namespace sl 7 | { 8 | class Program 9 | { 10 | static void Main(string[] args) 11 | { 12 | MainWindow window = new MainWindow(args); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /plane detection/plane detection/csharp/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Ce code a été généré par un outil. 4 | // Version du runtime :4.0.30319.42000 5 | // 6 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 7 | // le code est régénéré. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Image_capture.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /plane detection/plane detection/csharp/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /plane detection/plane detection/csharp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Plane Detection 2 | 3 | This sample shows how to retrieve surfaces data. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/), NuGet packages are automatically downloaded 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | 12 | ## Run the program 13 | - Navigate to the build directory and launch the executable 14 | - Or open a terminal in the build directory and run the sample : 15 | 16 | ./ZED_Plane_Detection 17 | 18 | ### Features 19 | - Live image is displayed in an OpenGL window 20 | - click on the image to estimate the plane of the pointed surface 21 | - press 'Spacebar' to estimate the floor plane 22 | 23 | ## Support 24 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /plane detection/plane detection/csharp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /plane detection/plane detection/plane_detection.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stereolabs/zed-sdk/e52c8385ede3c5ac6a6c914ed35b3bedf92c961c/plane detection/plane detection/plane_detection.jpg -------------------------------------------------------------------------------- /plane detection/plane detection/python/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Plane Detection 2 | 3 | This sample shows how to retrieve surfaces data. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) and [pyZED Package](https://www.stereolabs.com/docs/app-development/python/install/) 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Run the program 10 | 11 | To run the program, use the following command in your terminal : 12 | ```bash 13 | python plane_detection.py 14 | ``` 15 | If you wish to run the program from an input_svo_file, or an IP adress, or specify a resolution, run : 16 | 17 | ```bash 18 | python plane_detection.py --input_svo_file --ip_address --resolution 19 | ``` 20 | Arguments: 21 | - --input_svo_file A path to an existing .svo file, that will be playbacked with plane detection feature. If this parameter and ip_adress are not specified, the soft will use the camera wired as default. 22 | - --ip_address IP Address, in format a.b.c.d:port or a.b.c.d. If specified, the soft will try to connect to the IP and apply the plane detection features. 23 | - --resolution Resolution, can be either HD2K, HD1200, HD1080, HD720, SVGA or VGA 24 | 25 | ### Features 26 | - Live image is displayed in an OpenGL window 27 | - click on the image to estimate the plane of the pointed surface 28 | - press 'Spacebar' to estimate the floor plane 29 | 30 | ## Support 31 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /positional tracking/README.md: -------------------------------------------------------------------------------- 1 | # Positional tracking 2 | 3 | These samples show how to use ZED SDK for performing positional tracking. You can find additional information on the Positional Tracking module in our [Documentation](https://www.stereolabs.com/docs/positional-tracking/) and [API Reference](https://www.stereolabs.com/docs/api/group__PositionalTracking__group.html). 4 | 5 |

6 | 7 |

8 | 9 | 10 | ## Overview 11 | 12 | This section contains the following code samples: 13 | 14 | - [FBX Export](./export/) This sample shows how to **export tracking data** generated by the ZED SDK tracking module, in the **FBX Format**. 15 | 16 | - [Positional Tracking](./positional%20tracking/) This sample shows how to use the ZED SDK's powerful **Positional Tracking module**. With this sample, users can gain a solid understanding of how to leverage the ZED stereo camera for accurate and reliable tracking of the device's position and orientation in 3D space. 17 | -------------------------------------------------------------------------------- /positional tracking/export/fbx/cpp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - FBX Export 2 | 3 | 4 | This sample shows how to export ZED Camera Path data as FBX file compatible with 3D software like Blender or Maya. 5 | It is using the [FBX SDK](https://www.autodesk.com/developer-network/platform-technologies/fbx-sdk-2020-2-1), make sure it is installed on your computer. 6 | 7 | ____ 8 | -------------------------------------------------------------------------------- /positional tracking/positional tracking/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Positional Tracking 2 | 3 | ## This sample shows how to get the camera pose in a world reference 4 | 5 | ### Features 6 | - An OpenGL window displays the camera path in a 3D window 7 | - path data, translation and rotation, are displayed 8 | 9 | ![](positional_tracking.jpg) 10 | 11 | ### Global Localization 12 | 13 | If you have GNSS sensor, you can fuse its data with your ZED positional tracking to improve outdoor positioning, to do so check ou [Global Localization sample](../../global%20localization/live/) -------------------------------------------------------------------------------- /positional tracking/positional tracking/cpp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Positional Tracking 2 | 3 | This sample shows how to get the camera pose in a world reference 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | - Build for [Linux/Jetson](https://www.stereolabs.com/docs/app-development/cpp/linux/) 12 | 13 | ## Run the program 14 | - Navigate to the build directory and launch the executable 15 | - Or open a terminal in the build directory and run the sample : 16 | 17 | ./ZED_Positional_Tracking 18 | 19 | ### Features 20 | - An OpenGL window displays the camera path in a 3D window 21 | - path data, translation and rotation, are displayed 22 | 23 | ## Support 24 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /positional tracking/positional tracking/csharp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /positional tracking/positional tracking/csharp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required( VERSION 3.8.0 ) 2 | 3 | project(ZED_Positional_Tracking CSharp) 4 | 5 | add_executable(${PROJECT_NAME} 6 | Program.cs 7 | MainWindow.cs 8 | GLViewer.cs 9 | App.config 10 | packages.config 11 | Properties/AssemblyInfo.cs 12 | ) 13 | 14 | # Set the target platform to x64, since ZED SDK does not support 32-bits arch 15 | target_compile_options(${PROJECT_NAME} PRIVATE "/platform:x64" ) 16 | 17 | # Set the .NET Framework version for the target. 18 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1") 19 | 20 | # Set the C# language version, otherwise default 3.0 is taken 21 | set(CMAKE_CSharp_FLAGS "/langversion:7") 22 | 23 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCES 24 | "Microsoft.CSharp" 25 | "PresentationCore" 26 | "PresentationFramework" 27 | "System" 28 | "System.Xaml" 29 | "System.Data" 30 | "System.Linq" 31 | "System.Windows" 32 | "System.Windows.Forms" 33 | "System.Numerics" 34 | "System.Drawing" 35 | "WindowsBase" 36 | ) 37 | 38 | set(CMAKE_SUPPRESS_REGENERATION true) 39 | 40 | 41 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_PACKAGE_REFERENCES 42 | "OpenGL.Net_0.8.4" 43 | "OpenGL.Net.CoreUI_0.8.4" 44 | "Stereolabs.zed_5.*" 45 | ) -------------------------------------------------------------------------------- /positional tracking/positional tracking/csharp/Program.cs: -------------------------------------------------------------------------------- 1 | //======= Copyright (c) Stereolabs Corporation, All rights reserved. =============== 2 | using System; 3 | using System.Runtime.InteropServices; 4 | using System.Threading.Tasks; 5 | 6 | namespace sl 7 | { 8 | class Program 9 | { 10 | [STAThread] 11 | static void Main(string[] args) 12 | { 13 | MainWindow window = new MainWindow(args); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /positional tracking/positional tracking/csharp/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Ce code a été généré par un outil. 4 | // Version du runtime :4.0.30319.42000 5 | // 6 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 7 | // le code est régénéré. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Image_capture.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /positional tracking/positional tracking/csharp/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /positional tracking/positional tracking/csharp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Positional Tracking 2 | 3 | This sample shows how to get the camera pose in a world reference 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/), NuGet packages are automatically downloaded 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | 12 | ## Run the program 13 | - Navigate to the build directory and launch the executable 14 | - Or open a terminal in the build directory and run the sample : 15 | 16 | ./ZED_Positional_Tracking 17 | 18 | ### Features 19 | - An OpenGL window displays the camera path in a 3D window 20 | - path data, translation and rotation, are displayed 21 | 22 | ## Support 23 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /positional tracking/positional tracking/csharp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /positional tracking/positional tracking/positional_tracking.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stereolabs/zed-sdk/e52c8385ede3c5ac6a6c914ed35b3bedf92c961c/positional tracking/positional tracking/positional_tracking.jpg -------------------------------------------------------------------------------- /recording/README.md: -------------------------------------------------------------------------------- 1 | 2 | # SVO 3 | 4 | These samples show how to use ZED SDK for recording and playback SVO files. SVO files are a proprietary format developed by Stereolabs, designed to facilitate the storage and replay of data captured by the ZED camera. You can find additional information on the **video recording features** in our [Documentation](https://www.stereolabs.com/docs/video/recording/). 5 | 6 | ## Overview 7 | 8 | This section contains the following code samples: 9 | 10 | - [Recording](./recording/): Shows how to **record** a svo to be played later with the ZED SDK. 11 | - [Playback](./playback/): Shows how to **read** a recorded '.svo' file and how it can be controlled. 12 | - [Export](./export/): Contains a list of samples that allow you to **export** ZED SDK data in different common file formats. 13 | 14 | -------------------------------------------------------------------------------- /recording/export/README.md: -------------------------------------------------------------------------------- 1 | # Export Samples 2 | 3 | ## AVI / MP4 exports 4 | This sample allows you to export the images retrieved from the SDK into a standard video format. 5 | You can find it in [the recording folder](/recording/export/svo/) 6 | 7 | ## Body tracking JSON exports 8 | This sample show how to export Bodies retrieved with the SDK as a JSON file. 9 | You can find it in [the body racking folder](../body%20tracking/export/JSON%20export/) 10 | 11 | ## FBX animations exports 12 | This sample shows how to export ZED Camera data or skeleton data as FBX file compatible with 3D software like Blender or Maya. 13 | You can find it in [the body tracking folder](../body%20tracking/export/fbx%20export/) 14 | 15 | ## PLY Point cloud exports 16 | This sample allows you to export the point cloud from a frame into a PLY file. 17 | You can find it in [the depth sensing folder](../depth%20sensing/overview/) 18 | 19 | ## OBJ 3D Mesh exports 20 | This sample allows you to export the 3D mesh obtained from a spatial mapping into an OBJ file. 21 | You can find it in [the spatial mapping folder](../spatial%20mapping/overview/) 22 | 23 | ## Sensors export 24 | This sample allows you to export the output of the sensors of the camera as a JSON. 25 | You can find it in [the camera controls folder](export/sensors/) 26 | 27 | ## KML GNSS export 28 | This sample allows you to export the GNSS data retrieved from the SDK, and also the positional tracking data fused by the SDK from GNSS and odometry. 29 | You can find it in [the global localization folder](../global%20localization/export/) -------------------------------------------------------------------------------- /recording/export/sensors/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.6) 2 | 3 | project(ZED_Export_Sensors) 4 | 5 | find_package(ZED REQUIRED) 6 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 7 | 8 | include_directories(${ZED_INCLUDE_DIRS}) 9 | include_directories(${CUDA_INCLUDE_DIRS}) 10 | include_directories(include) 11 | 12 | link_directories(${ZED_LIBRARY_DIR}) 13 | link_directories(${CUDA_LIBRARY_DIRS}) 14 | 15 | add_executable(${PROJECT_NAME} src/main.cpp) 16 | set(LIBS ${ZED_LIBRARIES} ) 17 | 18 | target_link_libraries(${PROJECT_NAME} ${LIBS}) 19 | 20 | if(INSTALL_SAMPLES) 21 | LIST(APPEND SAMPLE_LIST ${PROJECT_NAME}) 22 | SET(SAMPLE_LIST "${SAMPLE_LIST}" PARENT_SCOPE) 23 | endif() 24 | -------------------------------------------------------------------------------- /recording/export/svo/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_SVO_Export) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 | SET(CMAKE_BUILD_TYPE "Release") 7 | 8 | option(LINK_SHARED_ZED "Link with the ZED SDK shared executable" ON) 9 | 10 | if (NOT LINK_SHARED_ZED AND MSVC) 11 | message(FATAL_ERROR "LINK_SHARED_ZED OFF : ZED SDK static libraries not available on Windows") 12 | endif() 13 | 14 | find_package(ZED REQUIRED) 15 | find_package(OpenCV REQUIRED) 16 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 17 | 18 | include_directories(${CUDA_INCLUDE_DIRS}) 19 | include_directories(${ZED_INCLUDE_DIRS}) 20 | include_directories(${OpenCV_INCLUDE_DIRS}) 21 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) 22 | 23 | link_directories(${ZED_LIBRARY_DIR}) 24 | link_directories(${CUDA_LIBRARY_DIRS}) 25 | link_directories(${OpenCV_LIBRARY_DIRS}) 26 | 27 | ADD_EXECUTABLE(${PROJECT_NAME} include/utils.hpp src/main.cpp) 28 | 29 | if (LINK_SHARED_ZED) 30 | SET(ZED_LIBS ${ZED_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 31 | else() 32 | SET(ZED_LIBS ${ZED_STATIC_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_LIBRARY}) 33 | endif() 34 | 35 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ZED_LIBS} ${OpenCV_LIBRARIES}) 36 | 37 | if(INSTALL_SAMPLES) 38 | LIST(APPEND SAMPLE_LIST ${PROJECT_NAME}) 39 | SET(SAMPLE_LIST "${SAMPLE_LIST}" PARENT_SCOPE) 40 | endif() -------------------------------------------------------------------------------- /recording/export/svo/csharp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /recording/export/svo/csharp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required( VERSION 3.8.0 ) 2 | 3 | project(ZED_SVO_Export CSharp) 4 | 5 | add_executable(${PROJECT_NAME} 6 | Program.cs 7 | App.config 8 | packages.config 9 | Properties/AssemblyInfo.cs 10 | ) 11 | 12 | # Set the target platform to x64, since ZED SDK does not support 32-bits arch 13 | target_compile_options(${PROJECT_NAME} PRIVATE "/platform:x64" ) 14 | 15 | # Set the .NET Framework version for the target. 16 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1") 17 | 18 | # Set the C# language version, otherwise default 3.0 is taken 19 | set(CMAKE_CSharp_FLAGS "/langversion:7") 20 | 21 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCES 22 | "Microsoft.CSharp" 23 | "PresentationCore" 24 | "PresentationFramework" 25 | "System" 26 | "System.Numerics" 27 | "WindowsBase" 28 | ) 29 | 30 | set(CMAKE_SUPPRESS_REGENERATION true) 31 | 32 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_PACKAGE_REFERENCES 33 | "Stereolabs.zed_5.*" 34 | "OpenCvSharp4.Windows_4.5.0.20201013" 35 | ) -------------------------------------------------------------------------------- /recording/export/svo/csharp/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Tutorials")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Tutorials")] 13 | [assembly: AssemblyCopyright("Copyright © 2024")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("db8455c8-b2a9-4e62-9597-7b26c432a999")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /recording/export/svo/csharp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /recording/playback/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - SVO Playback 2 | 3 | ## This sample demonstrates how to read a SVO video file. 4 | 5 | ### Features 6 | - Displays readed frame as an OpenCV image 7 | - Press 's' to save the current image as a PNG 8 | - Press 'f' to move forward in the recorded file 9 | - Press 'b' to move backward in the recorded file -------------------------------------------------------------------------------- /recording/playback/external_data/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_SVO_Playback) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 | SET(CMAKE_BUILD_TYPE "RelWithDebInfo") 7 | 8 | option(LINK_SHARED_ZED "Link with the ZED SDK shared executable" ON) 9 | 10 | if (NOT LINK_SHARED_ZED AND MSVC) 11 | message(FATAL_ERROR "LINK_SHARED_ZED OFF : ZED SDK static libraries not available on Windows") 12 | endif() 13 | 14 | find_package(ZED REQUIRED) 15 | find_package(OpenCV REQUIRED) 16 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 17 | 18 | include_directories(${CUDA_INCLUDE_DIRS}) 19 | include_directories(${ZED_INCLUDE_DIRS}) 20 | include_directories(${OpenCV_INCLUDE_DIRS}) 21 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) 22 | 23 | link_directories(${ZED_LIBRARY_DIR}) 24 | link_directories(${CUDA_LIBRARY_DIRS}) 25 | link_directories(${OpenCV_LIBRARY_DIRS}) 26 | 27 | ADD_EXECUTABLE(${PROJECT_NAME} include/utils.hpp src/main.cpp) 28 | 29 | if (LINK_SHARED_ZED) 30 | SET(ZED_LIBS ${ZED_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 31 | else() 32 | SET(ZED_LIBS ${ZED_STATIC_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_LIBRARY}) 33 | endif() 34 | 35 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ZED_LIBS} ${OpenCV_LIBRARIES}) 36 | 37 | if(INSTALL_SAMPLES) 38 | LIST(APPEND SAMPLE_LIST ${PROJECT_NAME}) 39 | SET(SAMPLE_LIST "${SAMPLE_LIST}" PARENT_SCOPE) 40 | endif() 41 | -------------------------------------------------------------------------------- /recording/playback/external_data/csharp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /recording/playback/external_data/csharp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required( VERSION 3.8.0 ) 2 | 3 | project(ZED_SVO_Playback CSharp) 4 | 5 | add_executable(${PROJECT_NAME} 6 | Program.cs 7 | App.config 8 | packages.config 9 | Properties/AssemblyInfo.cs 10 | ) 11 | 12 | # Set the target platform to x64, since ZED SDK does not support 32-bits arch 13 | target_compile_options(${PROJECT_NAME} PRIVATE "/platform:x64" ) 14 | 15 | # Set the .NET Framework version for the target. 16 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1") 17 | 18 | # Set the C# language version, otherwise default 3.0 is taken 19 | set(CMAKE_CSharp_FLAGS "/langversion:7") 20 | 21 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCES 22 | "Microsoft.CSharp" 23 | "PresentationCore" 24 | "PresentationFramework" 25 | "System" 26 | "System.Numerics" 27 | ) 28 | 29 | set(CMAKE_SUPPRESS_REGENERATION true) 30 | 31 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_PACKAGE_REFERENCES 32 | "Stereolabs.zed_4.*" 33 | ) 34 | -------------------------------------------------------------------------------- /recording/playback/external_data/csharp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /recording/playback/multi camera/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_SVO_Playback_Multi) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 | SET(CMAKE_BUILD_TYPE "Release") 7 | 8 | option(LINK_SHARED_ZED "Link with the ZED SDK shared executable" ON) 9 | 10 | if (NOT LINK_SHARED_ZED AND MSVC) 11 | message(FATAL_ERROR "LINK_SHARED_ZED OFF : ZED SDK static libraries not available on Windows") 12 | endif() 13 | 14 | find_package(ZED REQUIRED) 15 | find_package(OpenCV REQUIRED) 16 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 17 | 18 | include_directories(${CUDA_INCLUDE_DIRS}) 19 | include_directories(${ZED_INCLUDE_DIRS}) 20 | include_directories(${OpenCV_INCLUDE_DIRS}) 21 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) 22 | 23 | link_directories(${ZED_LIBRARY_DIR}) 24 | link_directories(${CUDA_LIBRARY_DIRS}) 25 | link_directories(${OpenCV_LIBRARY_DIRS}) 26 | 27 | ADD_EXECUTABLE(${PROJECT_NAME} include/utils.hpp src/main.cpp) 28 | 29 | if (LINK_SHARED_ZED) 30 | SET(ZED_LIBS ${ZED_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 31 | else() 32 | SET(ZED_LIBS ${ZED_STATIC_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_LIBRARY}) 33 | endif() 34 | 35 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ZED_LIBS} ${OpenCV_LIBRARIES}) 36 | 37 | if(INSTALL_SAMPLES) 38 | LIST(APPEND SAMPLE_LIST ${PROJECT_NAME}) 39 | SET(SAMPLE_LIST "${SAMPLE_LIST}" PARENT_SCOPE) 40 | endif() -------------------------------------------------------------------------------- /recording/playback/multi camera/cpp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - SVO Playback Multi-Camera 2 | 3 | This sample demonstrates how to read a SVO video file. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | - Build for [Linux/Jetson](https://www.stereolabs.com/docs/app-development/cpp/linux/) 12 | 13 | ## Run the program 14 | - Navigate to the build directory and launch the executable 15 | - Or open a terminal in the build directory and run the sample : 16 | 17 | ./ZED_SVO_Playback svo_file_1.svo svo_file_2.svo ... 18 | 19 | ### Features 20 | - Displays current frame as an OpenCV image 21 | - Press 's' to save the current images as PNG 22 | 23 | ## Support 24 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /recording/playback/single camera/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_SVO_Playback) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 | SET(CMAKE_BUILD_TYPE "Release") 7 | 8 | option(LINK_SHARED_ZED "Link with the ZED SDK shared executable" ON) 9 | 10 | if (NOT LINK_SHARED_ZED AND MSVC) 11 | message(FATAL_ERROR "LINK_SHARED_ZED OFF : ZED SDK static libraries not available on Windows") 12 | endif() 13 | 14 | find_package(ZED REQUIRED) 15 | find_package(OpenCV REQUIRED) 16 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 17 | 18 | include_directories(${CUDA_INCLUDE_DIRS}) 19 | include_directories(${ZED_INCLUDE_DIRS}) 20 | include_directories(${OpenCV_INCLUDE_DIRS}) 21 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) 22 | 23 | link_directories(${ZED_LIBRARY_DIR}) 24 | link_directories(${CUDA_LIBRARY_DIRS}) 25 | link_directories(${OpenCV_LIBRARY_DIRS}) 26 | 27 | ADD_EXECUTABLE(${PROJECT_NAME} include/utils.hpp src/main.cpp) 28 | 29 | if (LINK_SHARED_ZED) 30 | SET(ZED_LIBS ${ZED_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 31 | else() 32 | SET(ZED_LIBS ${ZED_STATIC_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_LIBRARY}) 33 | endif() 34 | 35 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ZED_LIBS} ${OpenCV_LIBRARIES}) 36 | 37 | if(INSTALL_SAMPLES) 38 | LIST(APPEND SAMPLE_LIST ${PROJECT_NAME}) 39 | SET(SAMPLE_LIST "${SAMPLE_LIST}" PARENT_SCOPE) 40 | endif() -------------------------------------------------------------------------------- /recording/playback/single camera/cpp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - SVO Playback 2 | 3 | This sample demonstrates how to read a SVO video file. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | - Build for [Linux/Jetson](https://www.stereolabs.com/docs/app-development/cpp/linux/) 12 | 13 | ## Run the program 14 | - Navigate to the build directory and launch the executable 15 | - Or open a terminal in the build directory and run the sample : 16 | 17 | ./ZED_SVO_Playback svo_file.svo 18 | 19 | ### Features 20 | - Displays readed frame as an OpenCV image 21 | - Press 's' to save the current image as a PNG 22 | - Press 'f' to move forward in the recorded file 23 | - Press 'b' to move backward in the recorded file 24 | 25 | ## Support 26 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /recording/playback/single camera/csharp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /recording/playback/single camera/csharp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required( VERSION 3.8.0 ) 2 | 3 | project(ZED_SVO_Playback CSharp) 4 | 5 | add_executable(${PROJECT_NAME} 6 | Program.cs 7 | App.config 8 | packages.config 9 | Properties/AssemblyInfo.cs 10 | ) 11 | 12 | # Set the target platform to x64, since ZED SDK does not support 32-bits arch 13 | target_compile_options(${PROJECT_NAME} PRIVATE "/platform:x64" ) 14 | 15 | # Set the .NET Framework version for the target. 16 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1") 17 | 18 | # Set the C# language version, otherwise default 3.0 is taken 19 | set(CMAKE_CSharp_FLAGS "/langversion:7") 20 | 21 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCES 22 | "Microsoft.CSharp" 23 | "PresentationCore" 24 | "PresentationFramework" 25 | "System" 26 | "System.Numerics" 27 | ) 28 | 29 | set(CMAKE_SUPPRESS_REGENERATION true) 30 | 31 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_PACKAGE_REFERENCES 32 | "Stereolabs.zed_5.*" 33 | "OpenCvSharp4.Windows_4.5.0.20201013" 34 | ) 35 | -------------------------------------------------------------------------------- /recording/playback/single camera/csharp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - SVO Playback 2 | 3 | This sample demonstrates how to read a SVO video file. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/), NuGet packages are automatically downloaded 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | 12 | ## Run the program 13 | - Navigate to the build directory and launch the executable 14 | - Or open a terminal in the build directory and run the sample : 15 | 16 | ./ZED_SVO_Playback svo_file.svo 17 | 18 | ### Features 19 | - Displays readed frame as an OpenCV image 20 | - Press 's' to save the current image as a PNG 21 | - Press 'f' to move forward in the recorded file 22 | - Press 'b' to move backward in the recorded file 23 | 24 | ## Support 25 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /recording/playback/single camera/csharp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /recording/playback/single camera/python/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - SVO Playback 2 | 3 | This sample demonstrates how to read a SVO video file. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) and [pyZED Package](https://www.stereolabs.com/docs/app-development/python/install/) 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Run the program 10 | 11 | To run the program, use the following command in your terminal: 12 | ```bash 13 | python svo_playback.py --input_svo_file 14 | ``` 15 | 16 | Arguments: 17 | - --input_svo_file Path to an existing .svo file 18 | 19 | ### Features 20 | - Displays readed frame as an OpenCV image 21 | - Press 's' to save the current image as a PNG 22 | - Press 'f' to move forward in the recorded file 23 | - Press 'b' to move backward in the recorded file 24 | 25 | ## Support 26 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /recording/recording/external_data/csharp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /recording/recording/external_data/csharp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required( VERSION 3.8.0 ) 2 | 3 | project(ZED_SVO_Recording CSharp) 4 | 5 | add_executable(${PROJECT_NAME} 6 | Program.cs 7 | App.config 8 | packages.config 9 | Properties/AssemblyInfo.cs 10 | ) 11 | 12 | # Set the target platform to x64, since ZED SDK does not support 32-bits arch 13 | target_compile_options(${PROJECT_NAME} PRIVATE "/platform:x64" ) 14 | 15 | # Set the .NET Framework version for the target. 16 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1") 17 | 18 | # Set the C# language version, otherwise default 3.0 is taken 19 | set(CMAKE_CSharp_FLAGS "/langversion:7") 20 | 21 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCES 22 | "Microsoft.CSharp" 23 | "PresentationCore" 24 | "PresentationFramework" 25 | "System" 26 | "System.Numerics" 27 | "WindowsBase" 28 | ) 29 | 30 | set(CMAKE_SUPPRESS_REGENERATION true) 31 | 32 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_PACKAGE_REFERENCES 33 | "Stereolabs.zed_4.*" 34 | ) -------------------------------------------------------------------------------- /recording/recording/external_data/csharp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /recording/recording/multi camera/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_SVO_Recording_Multi) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 | SET(CMAKE_BUILD_TYPE "Release") 7 | 8 | option(LINK_SHARED_ZED "Link with the ZED SDK shared executable" ON) 9 | 10 | if (NOT LINK_SHARED_ZED AND MSVC) 11 | message(FATAL_ERROR "LINK_SHARED_ZED OFF : ZED SDK static libraries not available on Windows") 12 | endif() 13 | 14 | IF(NOT MSVC) 15 | SET(SPECIAL_OS_LIBS "pthread") 16 | ENDIF() 17 | 18 | find_package(ZED REQUIRED) 19 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 20 | 21 | include_directories(${CUDA_INCLUDE_DIRS}) 22 | include_directories(${ZED_INCLUDE_DIRS}) 23 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) 24 | 25 | link_directories(${ZED_LIBRARY_DIR}) 26 | link_directories(${CUDA_LIBRARY_DIRS}) 27 | 28 | ADD_EXECUTABLE(${PROJECT_NAME} include/utils.hpp src/main.cpp) 29 | 30 | if (LINK_SHARED_ZED) 31 | SET(ZED_LIBS ${ZED_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 32 | else() 33 | SET(ZED_LIBS ${ZED_STATIC_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_LIBRARY}) 34 | endif() 35 | 36 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ZED_LIBS} ${SPECIAL_OS_LIBS} ${OpenCV_LIBRARIES}) 37 | 38 | if(INSTALL_SAMPLES) 39 | LIST(APPEND SAMPLE_LIST ${PROJECT_NAME}) 40 | SET(SAMPLE_LIST "${SAMPLE_LIST}" PARENT_SCOPE) 41 | endif() -------------------------------------------------------------------------------- /recording/recording/single camera/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - SVO Playback 2 | 3 | ## This sample shows how to record video in SVO format 4 | 5 | ### Features 6 | - give a name to the file to be created 7 | - press 'ctrl+c' to stop the file creation -------------------------------------------------------------------------------- /recording/recording/single camera/cpp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - SVO Recording 2 | 3 | This sample shows how to record video in SVO format. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | - Build for [Linux/Jetson](https://www.stereolabs.com/docs/app-development/cpp/linux/) 12 | 13 | ## Run the program 14 | - Navigate to the build directory and launch the executable 15 | - Or open a terminal in the build directory and run the sample : 16 | 17 | ./ZED_SVO_Recording my_svo_file.svo 18 | 19 | ### Features 20 | - give a name to the file to be created 21 | - press 'ctrl+c' to stop the file creation 22 | 23 | ## Support 24 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /recording/recording/single camera/csharp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /recording/recording/single camera/csharp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required( VERSION 3.8.0 ) 2 | 3 | project(ZED_SVO_Recording CSharp) 4 | 5 | add_executable(${PROJECT_NAME} 6 | Program.cs 7 | App.config 8 | packages.config 9 | Properties/AssemblyInfo.cs 10 | ) 11 | 12 | # Set the target platform to x64, since ZED SDK does not support 32-bits arch 13 | target_compile_options(${PROJECT_NAME} PRIVATE "/platform:x64" ) 14 | 15 | # Set the .NET Framework version for the target. 16 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1") 17 | 18 | # Set the C# language version, otherwise default 3.0 is taken 19 | set(CMAKE_CSharp_FLAGS "/langversion:7") 20 | 21 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCES 22 | "Microsoft.CSharp" 23 | "PresentationCore" 24 | "PresentationFramework" 25 | "System" 26 | "System.Numerics" 27 | "WindowsBase" 28 | ) 29 | 30 | set(CMAKE_SUPPRESS_REGENERATION true) 31 | 32 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_PACKAGE_REFERENCES 33 | "Stereolabs.zed_5.*" 34 | ) -------------------------------------------------------------------------------- /recording/recording/single camera/csharp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - SVO Recording 2 | 3 | This sample shows how to record video in SVO format. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/), NuGet packages are automatically downloaded 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | 12 | ## Run the program 13 | - Navigate to the build directory and launch the executable 14 | - Or open a terminal in the build directory and run the sample : 15 | 16 | ./ZED_SVO_Recording my_svo_file.svo 17 | 18 | ### Features 19 | - give a name to the file to be created 20 | - press 'ctrl+c' to stop the file creation 21 | 22 | ## Support 23 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /recording/recording/single camera/csharp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /recording/recording/single camera/python/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - SVO Recording 2 | 3 | This sample shows how to record video in SVO format 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) and [pyZED Package](https://www.stereolabs.com/docs/app-development/python/install/) 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Run the program 10 | 11 | To run the program, use the following command in your terminal: 12 | ```bash 13 | python svo_recording.py --output_svo_file 14 | ``` 15 | 16 | Arguments: 17 | - --output_svo_file Path to .svo file that will be created 18 | 19 | ### Features 20 | - give a name to the file to be created 21 | - press 'ctrl+c' to stop the file creation 22 | 23 | ## Support 24 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /spatial mapping/multi camera/cpp/include/ClientPublisher.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __SENDER_RUNNER_HDR__ 2 | #define __SENDER_RUNNER_HDR__ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | class ClientPublisher{ 10 | 11 | public: 12 | ClientPublisher(); 13 | ~ClientPublisher(); 14 | 15 | bool open(sl::InputType); 16 | 17 | void start(); 18 | void stop(); 19 | void setStartSVOPosition(unsigned pos); 20 | 21 | bool isRunning() { 22 | return running; 23 | } 24 | 25 | private: 26 | sl::Camera zed; 27 | sl::InitParameters init_parameters; 28 | void work(); 29 | std::thread runner; 30 | bool running; 31 | }; 32 | 33 | #endif // ! __SENDER_RUNNER_HDR__ 34 | -------------------------------------------------------------------------------- /spatial mapping/spatial mapping/README.md: -------------------------------------------------------------------------------- 1 | # Spatial Mapping 2 | 3 | These samples provide a comprehensive overview of how to leverage the ZED SDK for effective spatial mapping using a single ZED camera. With these samples, users can gain a solid understanding of how to utilize the ZED stereo camera to create detailed 3D maps of indoor and outdoor environments, all without requiring the use of additional sensors or equipment. You can find additional information on the Spatial Mapping module in our [Documentation](https://www.stereolabs.com/docs/spatial-mapping/) and [API Reference](https://www.stereolabs.com/docs/api/group__SpatialMapping__group.html). 4 | 5 |

6 | 7 |

8 | 9 | ## Overview 10 | 11 | This section contains the following code samples: 12 | 13 | - [Spatial Mapping Sample](./spatial%20mapping/): A full presentation of the spatial mapping module, which can create Meshes or Fused Point Clouds, all parameters are exposed. 14 | 15 | -------------------------------------------------------------------------------- /spatial mapping/spatial mapping/csharp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /spatial mapping/spatial mapping/csharp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required( VERSION 3.8.0 ) 2 | 3 | project(ZED_Spatial_Mapping CSharp) 4 | 5 | add_executable(${PROJECT_NAME} 6 | Program.cs 7 | MainWindow.cs 8 | GLViewer.cs 9 | App.config 10 | packages.config 11 | Properties/AssemblyInfo.cs 12 | ) 13 | 14 | # Set the target platform to x64, since ZED SDK does not support 32-bits arch 15 | target_compile_options(${PROJECT_NAME} PRIVATE "/platform:x64" ) 16 | 17 | # Set the .NET Framework version for the target. 18 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1") 19 | 20 | # Set the C# language version, otherwise default 3.0 is taken 21 | set(CMAKE_CSharp_FLAGS "/langversion:7") 22 | 23 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCES 24 | "Microsoft.CSharp" 25 | "PresentationCore" 26 | "PresentationFramework" 27 | "System" 28 | "System.Xaml" 29 | "System.Data" 30 | "System.Linq" 31 | "System.Windows" 32 | "System.Windows.Forms" 33 | "System.Numerics" 34 | "System.Drawing" 35 | "WindowsBase" 36 | ) 37 | set(CMAKE_SUPPRESS_REGENERATION true) 38 | 39 | 40 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_PACKAGE_REFERENCES 41 | "OpenGL.Net_0.8.4" 42 | "OpenGL.Net.CoreUI_0.8.4" 43 | "Stereolabs.zed_5.*" 44 | ) -------------------------------------------------------------------------------- /spatial mapping/spatial mapping/csharp/Program.cs: -------------------------------------------------------------------------------- 1 | //======= Copyright (c) Stereolabs Corporation, All rights reserved. =============== 2 | using System; 3 | using System.Runtime.InteropServices; 4 | using System.Threading.Tasks; 5 | 6 | namespace sl 7 | { 8 | class Program 9 | { 10 | static void Main(string[] args) 11 | { 12 | MainWindow window = new MainWindow(args); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /spatial mapping/spatial mapping/csharp/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Ce code a été généré par un outil. 4 | // Version du runtime :4.0.30319.42000 5 | // 6 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 7 | // le code est régénéré. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Image_capture.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /spatial mapping/spatial mapping/csharp/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /spatial mapping/spatial mapping/csharp/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Spatial Mapping 2 | 3 | This sample shows how to map your environment. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/), NuGet packages are automatically downloaded 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Build the program 10 | - Build for [Windows](https://www.stereolabs.com/docs/app-development/cpp/windows/) 11 | 12 | ## Run the program 13 | - Navigate to the build directory and launch the executable 14 | - Or open a terminal in the build directory and run the sample : 15 | 16 | ./ZED_Spatial_Mapping 17 | 18 | ### Features 19 | - Press 'Spacebar' to start/stop the mapping process 20 | - real time overlay of the mesh to the image 21 | - textures and post filters can be apply to the Mesh 22 | - final mesh is saved 23 | 24 | ## Support 25 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /spatial mapping/spatial mapping/csharp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /spatial mapping/spatial mapping/python/README.md: -------------------------------------------------------------------------------- 1 | # ZED SDK - Spatial Mapping 2 | 3 | This sample shows how to map your environment. 4 | 5 | ## Getting Started 6 | - Get the latest [ZED SDK](https://www.stereolabs.com/developers/release/) and [pyZED Package](https://www.stereolabs.com/docs/app-development/python/install/) 7 | - Check the [Documentation](https://www.stereolabs.com/docs/) 8 | 9 | ## Run the program 10 | 11 | To run the program, use the following command in your terminal : 12 | ```bash 13 | python spatial_mapping.py 14 | ``` 15 | If you wish to run the program from an input_svo_file, or an IP adress, or specify a resolution run : 16 | 17 | ```bash 18 | python spatial_mapping.py --input_svo_file --ip_address --resolution 19 | ``` 20 | Arguments: 21 | - --input_svo_file A path to an existing .svo file, that will be playbacked. If this parameter and ip_adress are not specified, the soft will use the camera wired as default. 22 | - --ip_address IP Address, in format a.b.c.d:port or a.b.c.d. If specified, the soft will try to connect to the IP. 23 | - --resolution Resolution, can be either HD2K, HD1200, HD1080, HD720, SVGA or VGA 24 | 25 | ### Features 26 | - Press 'Spacebar' to start/stop the mapping process 27 | - real time overlay of the mesh to the image 28 | - textures and post filters can be apply to the Mesh 29 | - final mesh is saved 30 | 31 | ## Support 32 | If you need assistance go to our Community site at https://community.stereolabs.com/ -------------------------------------------------------------------------------- /spatial mapping/spatial mapping/spatial_mapping.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stereolabs/zed-sdk/e52c8385ede3c5ac6a6c914ed35b3bedf92c961c/spatial mapping/spatial mapping/spatial_mapping.jpg -------------------------------------------------------------------------------- /tutorials/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | PROJECT(Tutos) 3 | 4 | OPTION(BUILD_CPP "Build c++ samples else c#" ON) 5 | 6 | if(${BUILD_CPP}) 7 | SET(TYPE "cpp") 8 | else() 9 | SET(TYPE "csharp") 10 | endif() 11 | 12 | add_subdirectory("tutorial 1 - hello ZED/${TYPE}") 13 | add_subdirectory("tutorial 2 - image capture/${TYPE}") 14 | add_subdirectory("tutorial 3 - depth sensing/${TYPE}") 15 | add_subdirectory("tutorial 4 - positional tracking/${TYPE}") 16 | add_subdirectory("tutorial 5 - spatial mapping/${TYPE}") 17 | add_subdirectory("tutorial 6 - object detection/${TYPE}") 18 | add_subdirectory("tutorial 7 - sensor data/${TYPE}") 19 | add_subdirectory("tutorial 8 - body tracking/${TYPE}") 20 | 21 | 22 | if(${BUILD_CPP}) 23 | add_subdirectory("tutorial 9 - global localization/${TYPE}") 24 | endif() -------------------------------------------------------------------------------- /tutorials/tutorial 1 - hello ZED/c/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_C_Tutorial_1) 3 | 4 | if(COMMAND cmake_policy) 5 | cmake_policy(SET CMP0003 OLD) 6 | cmake_policy(SET CMP0015 OLD) 7 | endif(COMMAND cmake_policy) 8 | 9 | SET(EXECUTABLE_OUTPUT_PATH ".") 10 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 11 | include_directories(${CUDA_INCLUDE_DIRS}) 12 | link_directories(${CUDA_LIBRARY_DIRS}) 13 | 14 | if (WIN32) 15 | include_directories($ENV{ZED_SDK_ROOT_DIR}/include/) 16 | link_directories($ENV{ZED_SDK_ROOT_DIR}/lib/) 17 | 18 | else (WIN32) 19 | include_directories("/usr/local/zed/include/") 20 | link_directories("/usr/local/zed/lib/") 21 | endif(WIN32) 22 | 23 | 24 | ADD_EXECUTABLE(${PROJECT_NAME} main.c) 25 | 26 | target_link_libraries(${PROJECT_NAME} sl_zed_c ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) -------------------------------------------------------------------------------- /tutorials/tutorial 1 - hello ZED/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_Tutorial_1) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 | 7 | option(LINK_SHARED_ZED "Link with the ZED SDK shared executable" ON) 8 | 9 | if (NOT LINK_SHARED_ZED AND MSVC) 10 | message(FATAL_ERROR "LINK_SHARED_ZED OFF : ZED SDK static libraries not available on Windows") 11 | endif() 12 | 13 | find_package(ZED REQUIRED) 14 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 15 | 16 | include_directories(${CUDA_INCLUDE_DIRS}) 17 | include_directories(${ZED_INCLUDE_DIRS}) 18 | 19 | link_directories(${ZED_LIBRARY_DIR}) 20 | link_directories(${CUDA_LIBRARY_DIRS}) 21 | 22 | ADD_EXECUTABLE(${PROJECT_NAME} main.cpp) 23 | 24 | if (LINK_SHARED_ZED) 25 | SET(ZED_LIBS ${ZED_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 26 | else() 27 | SET(ZED_LIBS ${ZED_STATIC_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_LIBRARY}) 28 | endif() 29 | 30 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ZED_LIBS}) -------------------------------------------------------------------------------- /tutorials/tutorial 1 - hello ZED/csharp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tutorials/tutorial 1 - hello ZED/csharp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required( VERSION 3.8.0 ) 2 | 3 | project(Hello_ZED CSharp) 4 | 5 | 6 | add_executable(${PROJECT_NAME} 7 | Program.cs 8 | App.config 9 | packages.config 10 | Properties/AssemblyInfo.cs 11 | ) 12 | 13 | # Set the target platform to x64, since ZED SDK does not support 32-bits arch 14 | target_compile_options(${PROJECT_NAME} PRIVATE "/platform:x64" ) 15 | 16 | # Set the .NET Framework version for the target. 17 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1") 18 | 19 | # Set the C# language version, otherwise default 3.0 is taken 20 | set(CMAKE_CSharp_FLAGS "/langversion:7") 21 | 22 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCES 23 | "Microsoft.CSharp" 24 | "PresentationCore" 25 | "PresentationFramework" 26 | "System" 27 | "System.Numerics" 28 | ) 29 | 30 | set(CMAKE_SUPPRESS_REGENERATION true) 31 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_PACKAGE_REFERENCES 32 | "Stereolabs.zed_5.*" 33 | ) 34 | -------------------------------------------------------------------------------- /tutorials/tutorial 1 - hello ZED/csharp/Program.cs: -------------------------------------------------------------------------------- 1 | //======= Copyright (c) Stereolabs Corporation, All rights reserved. =============== 2 | using System; 3 | using System.Runtime.InteropServices; 4 | using System.Numerics; 5 | 6 | namespace sl 7 | { 8 | class Program 9 | { 10 | static void Main(string[] args) 11 | { 12 | // Create the camera 13 | Camera zedCamera = new Camera(0); 14 | // Create default configuration parameters 15 | InitParameters init_params = new InitParameters(); 16 | ERROR_CODE err = zedCamera.Open(ref init_params); 17 | if (err != ERROR_CODE.SUCCESS) 18 | Environment.Exit(-1); 19 | 20 | // Get camera information (serial number) 21 | int zed_serial = zedCamera.GetZEDSerialNumber(); 22 | Console.WriteLine("Hello! This is my serial number: " + zed_serial); 23 | Console.ReadLine(); 24 | 25 | zedCamera.Close(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /tutorials/tutorial 1 - hello ZED/csharp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tutorials/tutorial 10 - split process/README.md: -------------------------------------------------------------------------------- 1 | # Tutorial 10: Split Process with the ZED 2 | 3 | This tutorial shows how to get an image then the depth from the ZED SDK. The program will loop until 50 frames are grabbed. 4 | We assume that you have followed previous tutorials (opening the ZED and image capture). 5 | 6 | ### Prerequisites 7 | 8 | - Windows 10, Ubuntu LTS 9 | - [ZED SDK](https://www.stereolabs.com/developers/) and its dependencies ([CUDA](https://developer.nvidia.com/cuda-downloads)) 10 | 11 | # Code overview 12 | 13 | ## Create a camera 14 | 15 | As in other tutorials, we create, configure and open the ZED. 16 | We set the ZED in HD720 mode at 60fps and enable depth in NEURAL mode. The ZED SDK provides different depth modes: NEURAL_PLUS, NEURAL, NEURAL_LIGHT. For more information, see online documentation. 17 | 18 | ## Capture data 19 | 20 | In previous tutorials, you have seen that images and depth can be captured using the grab method (See Tutorial on Depth Sensing). 21 | 22 | It is also possible to first capture the image and then depth. To do so, you can use the read method and then the grab method. 23 | -------------------------------------------------------------------------------- /tutorials/tutorial 10 - split process/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_Tutorial_10) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 | 7 | option(LINK_SHARED_ZED "Link with the ZED SDK shared executable" ON) 8 | 9 | if (NOT LINK_SHARED_ZED AND MSVC) 10 | message(FATAL_ERROR "LINK_SHARED_ZED OFF : ZED SDK static libraries not available on Windows") 11 | endif() 12 | 13 | find_package(ZED REQUIRED) 14 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 15 | 16 | include_directories(${CUDA_INCLUDE_DIRS}) 17 | include_directories(${ZED_INCLUDE_DIRS}) 18 | 19 | link_directories(${ZED_LIBRARY_DIR}) 20 | link_directories(${CUDA_LIBRARY_DIRS}) 21 | 22 | ADD_EXECUTABLE(${PROJECT_NAME} main.cpp) 23 | 24 | if (LINK_SHARED_ZED) 25 | SET(ZED_LIBS ${ZED_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 26 | else() 27 | SET(ZED_LIBS ${ZED_STATIC_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_LIBRARY}) 28 | endif() 29 | 30 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ZED_LIBS}) -------------------------------------------------------------------------------- /tutorials/tutorial 11 - health status/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_Tutorial_11) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 | 7 | option(LINK_SHARED_ZED "Link with the ZED SDK shared executable" ON) 8 | 9 | if (NOT LINK_SHARED_ZED AND MSVC) 10 | message(FATAL_ERROR "LINK_SHARED_ZED OFF : ZED SDK static libraries not available on Windows") 11 | endif() 12 | 13 | find_package(ZED REQUIRED) 14 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 15 | 16 | include_directories(${CUDA_INCLUDE_DIRS}) 17 | include_directories(${ZED_INCLUDE_DIRS}) 18 | 19 | link_directories(${ZED_LIBRARY_DIR}) 20 | link_directories(${CUDA_LIBRARY_DIRS}) 21 | 22 | ADD_EXECUTABLE(${PROJECT_NAME} main.cpp) 23 | 24 | if (LINK_SHARED_ZED) 25 | SET(ZED_LIBS ${ZED_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 26 | else() 27 | SET(ZED_LIBS ${ZED_STATIC_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_LIBRARY}) 28 | endif() 29 | 30 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ZED_LIBS}) -------------------------------------------------------------------------------- /tutorials/tutorial 2 - image capture/c/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_C_Tutorial_2) 3 | 4 | if(COMMAND cmake_policy) 5 | cmake_policy(SET CMP0003 OLD) 6 | cmake_policy(SET CMP0015 OLD) 7 | endif(COMMAND cmake_policy) 8 | 9 | SET(EXECUTABLE_OUTPUT_PATH ".") 10 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 11 | include_directories(${CUDA_INCLUDE_DIRS}) 12 | link_directories(${CUDA_LIBRARY_DIRS}) 13 | 14 | if (WIN32) 15 | include_directories($ENV{ZED_SDK_ROOT_DIR}/include/) 16 | link_directories($ENV{ZED_SDK_ROOT_DIR}/lib/) 17 | 18 | else (WIN32) 19 | include_directories("/usr/local/zed/include/") 20 | link_directories("/usr/local/zed/lib/") 21 | endif(WIN32) 22 | 23 | 24 | ADD_EXECUTABLE(${PROJECT_NAME} main.c) 25 | 26 | target_link_libraries(${PROJECT_NAME} sl_zed_c ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 27 | -------------------------------------------------------------------------------- /tutorials/tutorial 2 - image capture/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_Tutorial_2) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 | 7 | option(LINK_SHARED_ZED "Link with the ZED SDK shared executable" ON) 8 | 9 | if (NOT LINK_SHARED_ZED AND MSVC) 10 | message(FATAL_ERROR "LINK_SHARED_ZED OFF : ZED SDK static libraries not available on Windows") 11 | endif() 12 | 13 | find_package(ZED REQUIRED) 14 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 15 | 16 | include_directories(${CUDA_INCLUDE_DIRS}) 17 | include_directories(${ZED_INCLUDE_DIRS}) 18 | 19 | link_directories(${ZED_LIBRARY_DIR}) 20 | link_directories(${CUDA_LIBRARY_DIRS}) 21 | 22 | ADD_EXECUTABLE(${PROJECT_NAME} main.cpp) 23 | 24 | if (LINK_SHARED_ZED) 25 | SET(ZED_LIBS ${ZED_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 26 | else() 27 | SET(ZED_LIBS ${ZED_STATIC_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_LIBRARY}) 28 | endif() 29 | 30 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ZED_LIBS}) -------------------------------------------------------------------------------- /tutorials/tutorial 2 - image capture/csharp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tutorials/tutorial 2 - image capture/csharp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required( VERSION 3.8.0 ) 2 | 3 | project(Image_Capture CSharp) 4 | 5 | add_executable(${PROJECT_NAME} 6 | Program.cs 7 | App.config 8 | packages.config 9 | Properties/AssemblyInfo.cs 10 | ) 11 | 12 | # Set the target platform to x64, since ZED SDK does not support 32-bits arch 13 | target_compile_options(${PROJECT_NAME} PRIVATE "/platform:x64" ) 14 | 15 | # Set the .NET Framework version for the target. 16 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1") 17 | 18 | # Set the C# language version, otherwise default 3.0 is taken 19 | set(CMAKE_CSharp_FLAGS "/langversion:7") 20 | 21 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCES 22 | "Microsoft.CSharp" 23 | "PresentationCore" 24 | "PresentationFramework" 25 | "System" 26 | "System.Numerics" 27 | ) 28 | 29 | set(CMAKE_SUPPRESS_REGENERATION true) 30 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_PACKAGE_REFERENCES 31 | "Stereolabs.zed_5.*" 32 | ) -------------------------------------------------------------------------------- /tutorials/tutorial 2 - image capture/csharp/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Ce code a été généré par un outil. 4 | // Version du runtime :4.0.30319.42000 5 | // 6 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 7 | // le code est régénéré. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Image_capture.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tutorials/tutorial 2 - image capture/csharp/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tutorials/tutorial 2 - image capture/csharp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tutorials/tutorial 3 - depth sensing/README.md: -------------------------------------------------------------------------------- 1 | # Tutorial 3: Depth sensing with the ZED 2 | 3 | This tutorial shows how to get the depth from the ZED SDK. The program will loop until 50 frames are grabbed. 4 | We assume that you have followed previous tutorials (opening the ZED and image capture). 5 | 6 | ### Prerequisites 7 | 8 | - Windows 10, Ubuntu LTS 9 | - [ZED SDK](https://www.stereolabs.com/developers/) and its dependencies ([CUDA](https://developer.nvidia.com/cuda-downloads)) 10 | 11 | # Code overview 12 | 13 | ## Create a camera 14 | 15 | As in other tutorials, we create, configure and open the ZED. 16 | We set the ZED in HD720 mode at 60fps and enable depth in NEURAL mode. The ZED SDK provides different depth modes: NEURAL_PLUS, NEURAL, NEURAL_LIGHT. For more information, see online documentation. 17 | 18 | ## Capture data 19 | 20 | Now that the ZED is opened, we can capture images and depth. Retrieving the depth map is as simple as retrieving an image: 21 | * We create a Mat to store the depth map. 22 | * We call retrieveMeasure() to get the depth map. 23 | * We call retrieveMeasure() to get the point cloud. 24 | -------------------------------------------------------------------------------- /tutorials/tutorial 3 - depth sensing/c/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_C_Tutorial_3) 3 | 4 | if(COMMAND cmake_policy) 5 | cmake_policy(SET CMP0003 OLD) 6 | cmake_policy(SET CMP0015 OLD) 7 | endif(COMMAND cmake_policy) 8 | 9 | SET(EXECUTABLE_OUTPUT_PATH ".") 10 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 11 | include_directories(${CUDA_INCLUDE_DIRS}) 12 | link_directories(${CUDA_LIBRARY_DIRS}) 13 | 14 | if (WIN32) 15 | include_directories($ENV{ZED_SDK_ROOT_DIR}/include/) 16 | link_directories($ENV{ZED_SDK_ROOT_DIR}/lib/) 17 | 18 | else (WIN32) 19 | include_directories("/usr/local/zed/include/") 20 | link_directories("/usr/local/zed/lib/") 21 | endif(WIN32) 22 | 23 | 24 | ADD_EXECUTABLE(${PROJECT_NAME} main.c) 25 | 26 | target_link_libraries(${PROJECT_NAME} sl_zed_c ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 27 | -------------------------------------------------------------------------------- /tutorials/tutorial 3 - depth sensing/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_Tutorial_3) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 | 7 | option(LINK_SHARED_ZED "Link with the ZED SDK shared executable" ON) 8 | 9 | if (NOT LINK_SHARED_ZED AND MSVC) 10 | message(FATAL_ERROR "LINK_SHARED_ZED OFF : ZED SDK static libraries not available on Windows") 11 | endif() 12 | 13 | find_package(ZED REQUIRED) 14 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 15 | 16 | include_directories(${CUDA_INCLUDE_DIRS}) 17 | include_directories(${ZED_INCLUDE_DIRS}) 18 | 19 | link_directories(${ZED_LIBRARY_DIR}) 20 | link_directories(${CUDA_LIBRARY_DIRS}) 21 | 22 | ADD_EXECUTABLE(${PROJECT_NAME} main.cpp) 23 | 24 | if (LINK_SHARED_ZED) 25 | SET(ZED_LIBS ${ZED_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 26 | else() 27 | SET(ZED_LIBS ${ZED_STATIC_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_LIBRARY}) 28 | endif() 29 | 30 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ZED_LIBS}) -------------------------------------------------------------------------------- /tutorials/tutorial 3 - depth sensing/csharp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tutorials/tutorial 3 - depth sensing/csharp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required( VERSION 3.8.0 ) 2 | 3 | project(Depth_Sensing CSharp) 4 | 5 | add_executable(${PROJECT_NAME} 6 | Program.cs 7 | App.config 8 | packages.config 9 | Properties/AssemblyInfo.cs 10 | ) 11 | 12 | # Set the target platform to x64, since ZED SDK does not support 32-bits arch 13 | target_compile_options(${PROJECT_NAME} PRIVATE "/platform:x64" ) 14 | 15 | # Set the .NET Framework version for the target. 16 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1") 17 | 18 | # Set the C# language version, otherwise default 3.0 is taken 19 | set(CMAKE_CSharp_FLAGS "/langversion:7") 20 | 21 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCES 22 | "Microsoft.CSharp" 23 | "PresentationCore" 24 | "PresentationFramework" 25 | "System" 26 | "System.Numerics" 27 | ) 28 | 29 | set(CMAKE_SUPPRESS_REGENERATION true) 30 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_PACKAGE_REFERENCES 31 | "Stereolabs.zed_5.*" 32 | ) -------------------------------------------------------------------------------- /tutorials/tutorial 3 - depth sensing/csharp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tutorials/tutorial 4 - positional tracking/README.md: -------------------------------------------------------------------------------- 1 | # Tutorial 4: Positional tracking with the ZED 2 | 3 | This tutorial shows how to use the ZED as a positional tracker. The program will loop until 1000 position are grabbed. 4 | We assume that you have followed previous tutorials. 5 | 6 | ### Prerequisites 7 | 8 | - Windows 10, Ubuntu LTS 9 | - [ZED SDK](https://www.stereolabs.com/developers/) and its dependencies ([CUDA](https://developer.nvidia.com/cuda-downloads)) 10 | 11 | # Code overview 12 | 13 | ## Enable positional tracking 14 | 15 | Once the camera is opened, we must enable the positional tracking module in order to get the position and orientation of the ZED. 16 | 17 | ## Capture pose data 18 | 19 | The camera position is given by the class `sl::Pose`. This class contains the translation and orientation of the camera, as well as image timestamp and tracking confidence (quality). 20 | 21 | A pose is always linked to a reference frame. The SDK provides two reference frame : `REFERENCE_FRAME::WORLD` and `REFERENCE_FRAME::CAMERA`. 22 | 23 | It is not the purpose of this tutorial to go into the details of these reference frame. Read the documentation for more information. 24 | 25 | In the example, we get the device position in the World Frame. 26 | 27 | ### Inertial Data 28 | 29 | If a ZED Mini or a ZED 2 is open, we can have access to the inertial data from the integrated IMU -------------------------------------------------------------------------------- /tutorials/tutorial 4 - positional tracking/c/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_C_Tutorial_4) 3 | 4 | if(COMMAND cmake_policy) 5 | cmake_policy(SET CMP0003 OLD) 6 | cmake_policy(SET CMP0015 OLD) 7 | endif(COMMAND cmake_policy) 8 | 9 | SET(EXECUTABLE_OUTPUT_PATH ".") 10 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 11 | include_directories(${CUDA_INCLUDE_DIRS}) 12 | link_directories(${CUDA_LIBRARY_DIRS}) 13 | 14 | if (WIN32) 15 | include_directories($ENV{ZED_SDK_ROOT_DIR}/include/) 16 | link_directories($ENV{ZED_SDK_ROOT_DIR}/lib/) 17 | 18 | else (WIN32) 19 | include_directories("/usr/local/zed/include/") 20 | link_directories("/usr/local/zed/lib/") 21 | endif(WIN32) 22 | 23 | 24 | ADD_EXECUTABLE(${PROJECT_NAME} main.c) 25 | 26 | target_link_libraries(${PROJECT_NAME} sl_zed_c ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) -------------------------------------------------------------------------------- /tutorials/tutorial 4 - positional tracking/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_Tutorial_4) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 | 7 | option(LINK_SHARED_ZED "Link with the ZED SDK shared executable" ON) 8 | 9 | if (NOT LINK_SHARED_ZED AND MSVC) 10 | message(FATAL_ERROR "LINK_SHARED_ZED OFF : ZED SDK static libraries not available on Windows") 11 | endif() 12 | 13 | find_package(ZED REQUIRED) 14 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 15 | 16 | include_directories(${CUDA_INCLUDE_DIRS}) 17 | include_directories(${ZED_INCLUDE_DIRS}) 18 | 19 | link_directories(${ZED_LIBRARY_DIR}) 20 | link_directories(${CUDA_LIBRARY_DIRS}) 21 | 22 | ADD_EXECUTABLE(${PROJECT_NAME} main.cpp) 23 | 24 | if (LINK_SHARED_ZED) 25 | SET(ZED_LIBS ${ZED_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 26 | else() 27 | SET(ZED_LIBS ${ZED_STATIC_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_LIBRARY}) 28 | endif() 29 | 30 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ZED_LIBS}) -------------------------------------------------------------------------------- /tutorials/tutorial 4 - positional tracking/csharp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tutorials/tutorial 4 - positional tracking/csharp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required( VERSION 3.8.0 ) 2 | 3 | project(Positional_Tracking CSharp) 4 | 5 | add_executable(${PROJECT_NAME} 6 | Program.cs 7 | App.config 8 | packages.config 9 | Properties/AssemblyInfo.cs 10 | ) 11 | 12 | # Set the target platform to x64, since ZED SDK does not support 32-bits arch 13 | target_compile_options(${PROJECT_NAME} PRIVATE "/platform:x64" ) 14 | 15 | # Set the .NET Framework version for the target. 16 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1") 17 | 18 | # Set the C# language version, otherwise default 3.0 is taken 19 | set(CMAKE_CSharp_FLAGS "/langversion:7") 20 | 21 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCES 22 | "Microsoft.CSharp" 23 | "PresentationCore" 24 | "PresentationFramework" 25 | "System" 26 | "System.Numerics" 27 | ) 28 | 29 | set(CMAKE_SUPPRESS_REGENERATION true) 30 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_PACKAGE_REFERENCES 31 | "Stereolabs.zed_5.*" 32 | ) -------------------------------------------------------------------------------- /tutorials/tutorial 4 - positional tracking/csharp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tutorials/tutorial 5 - spatial mapping/c/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_C_Tutorial_5 C) 3 | 4 | if(COMMAND cmake_policy) 5 | cmake_policy(SET CMP0003 OLD) 6 | cmake_policy(SET CMP0015 OLD) 7 | endif(COMMAND cmake_policy) 8 | 9 | SET(EXECUTABLE_OUTPUT_PATH ".") 10 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 11 | include_directories(${CUDA_INCLUDE_DIRS}) 12 | link_directories(${CUDA_LIBRARY_DIRS}) 13 | 14 | if (WIN32) 15 | include_directories($ENV{ZED_SDK_ROOT_DIR}/include/) 16 | link_directories($ENV{ZED_SDK_ROOT_DIR}/lib/) 17 | 18 | else (WIN32) 19 | include_directories("/usr/local/zed/include/") 20 | link_directories("/usr/local/zed/lib/") 21 | endif(WIN32) 22 | 23 | 24 | ADD_EXECUTABLE(${PROJECT_NAME} main.c) 25 | 26 | target_link_libraries(${PROJECT_NAME} sl_zed_c ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 27 | -------------------------------------------------------------------------------- /tutorials/tutorial 5 - spatial mapping/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_Tutorial_5) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 | 7 | option(LINK_SHARED_ZED "Link with the ZED SDK shared executable" ON) 8 | 9 | if (NOT LINK_SHARED_ZED AND MSVC) 10 | message(FATAL_ERROR "LINK_SHARED_ZED OFF : ZED SDK static libraries not available on Windows") 11 | endif() 12 | 13 | find_package(ZED REQUIRED) 14 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 15 | 16 | include_directories(${CUDA_INCLUDE_DIRS}) 17 | include_directories(${ZED_INCLUDE_DIRS}) 18 | 19 | link_directories(${ZED_LIBRARY_DIR}) 20 | link_directories(${CUDA_LIBRARY_DIRS}) 21 | 22 | ADD_EXECUTABLE(${PROJECT_NAME} main.cpp) 23 | 24 | if (LINK_SHARED_ZED) 25 | SET(ZED_LIBS ${ZED_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 26 | else() 27 | SET(ZED_LIBS ${ZED_STATIC_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_LIBRARY}) 28 | endif() 29 | 30 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ZED_LIBS}) -------------------------------------------------------------------------------- /tutorials/tutorial 5 - spatial mapping/csharp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tutorials/tutorial 5 - spatial mapping/csharp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required( VERSION 3.8.0 ) 2 | 3 | project(Spatial_Mapping CSharp) 4 | 5 | add_executable(${PROJECT_NAME} 6 | Program.cs 7 | App.config 8 | packages.config 9 | Properties/AssemblyInfo.cs 10 | ) 11 | 12 | # Set the target platform to x64, since ZED SDK does not support 32-bits arch 13 | target_compile_options(${PROJECT_NAME} PRIVATE "/platform:x64" ) 14 | 15 | # Set the .NET Framework version for the target. 16 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1") 17 | 18 | # Set the C# language version, otherwise default 3.0 is taken 19 | set(CMAKE_CSharp_FLAGS "/langversion:7") 20 | 21 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCES 22 | "Microsoft.CSharp" 23 | "PresentationCore" 24 | "PresentationFramework" 25 | "System" 26 | "System.Numerics" 27 | ) 28 | 29 | set(CMAKE_SUPPRESS_REGENERATION true) 30 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_PACKAGE_REFERENCES 31 | "Stereolabs.zed_5.*" 32 | ) 33 | -------------------------------------------------------------------------------- /tutorials/tutorial 5 - spatial mapping/csharp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tutorials/tutorial 6 - object detection/c/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_C_Tutorial_6) 3 | 4 | if(COMMAND cmake_policy) 5 | cmake_policy(SET CMP0003 OLD) 6 | cmake_policy(SET CMP0015 OLD) 7 | endif(COMMAND cmake_policy) 8 | 9 | SET(EXECUTABLE_OUTPUT_PATH ".") 10 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 11 | include_directories(${CUDA_INCLUDE_DIRS}) 12 | link_directories(${CUDA_LIBRARY_DIRS}) 13 | 14 | if (WIN32) 15 | include_directories($ENV{ZED_SDK_ROOT_DIR}/include/) 16 | link_directories($ENV{ZED_SDK_ROOT_DIR}/lib/) 17 | 18 | else (WIN32) 19 | include_directories("/usr/local/zed/include/") 20 | link_directories("/usr/local/zed/lib/") 21 | endif(WIN32) 22 | 23 | 24 | ADD_EXECUTABLE(${PROJECT_NAME} main.c) 25 | 26 | target_link_libraries(${PROJECT_NAME} sl_zed_c ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) -------------------------------------------------------------------------------- /tutorials/tutorial 6 - object detection/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_Tutorial_6) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 | 7 | option(LINK_SHARED_ZED "Link with the ZED SDK shared executable" ON) 8 | 9 | if (NOT LINK_SHARED_ZED AND MSVC) 10 | message(FATAL_ERROR "LINK_SHARED_ZED OFF : ZED SDK static libraries not available on Windows") 11 | endif() 12 | 13 | find_package(ZED REQUIRED) 14 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 15 | 16 | include_directories(${CUDA_INCLUDE_DIRS}) 17 | include_directories(${ZED_INCLUDE_DIRS}) 18 | 19 | link_directories(${ZED_LIBRARY_DIR}) 20 | link_directories(${CUDA_LIBRARY_DIRS}) 21 | 22 | ADD_EXECUTABLE(${PROJECT_NAME} main.cpp) 23 | 24 | if (LINK_SHARED_ZED) 25 | SET(ZED_LIBS ${ZED_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 26 | else() 27 | SET(ZED_LIBS ${ZED_STATIC_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_LIBRARY}) 28 | endif() 29 | 30 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ZED_LIBS}) -------------------------------------------------------------------------------- /tutorials/tutorial 6 - object detection/csharp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tutorials/tutorial 6 - object detection/csharp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required( VERSION 3.8.0 ) 2 | 3 | project(Object_Detection CSharp) 4 | 5 | add_executable(${PROJECT_NAME} 6 | Program.cs 7 | App.config 8 | packages.config 9 | Properties/AssemblyInfo.cs 10 | ) 11 | 12 | # Set the target platform to x64, since ZED SDK does not support 32-bits arch 13 | target_compile_options(${PROJECT_NAME} PRIVATE "/platform:x64" ) 14 | 15 | # Set the .NET Framework version for the target. 16 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1") 17 | 18 | # Set the C# language version, otherwise default 3.0 is taken 19 | set(CMAKE_CSharp_FLAGS "/langversion:7") 20 | 21 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCES 22 | "Microsoft.CSharp" 23 | "PresentationCore" 24 | "PresentationFramework" 25 | "System" 26 | "System.Numerics" 27 | ) 28 | 29 | set(CMAKE_SUPPRESS_REGENERATION true) 30 | 31 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_PACKAGE_REFERENCES 32 | "Stereolabs.zed_5.*" 33 | ) -------------------------------------------------------------------------------- /tutorials/tutorial 6 - object detection/csharp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tutorials/tutorial 7 - sensor data/README.md: -------------------------------------------------------------------------------- 1 | # Tutorial 7: Getting sensor data from ZED Mini and ZED2 2 | 3 | This tutorial shows how to use retrieve sensor data from ZED Mini and ZED2. It will loop until 800 data samples are grabbed, printing the updated values on console.
4 | We assume that you have followed previous tutorials. 5 | 6 | ### Prerequisites 7 | 8 | - Windows 10, Ubuntu LTS, L4T 9 | - [ZED SDK](https://www.stereolabs.com/developers/) and its dependencies ([CUDA](https://developer.nvidia.com/cuda-downloads)) 10 | 11 | # Code overview 12 | 13 | ## Capture data 14 | 15 | The sensor data can be retrieved in two ways: synchronized or not synchronized to the image frames. 16 | 17 | ## Process data 18 | 19 | To be sure that data are updated, since they are not synchronized to camera frames, we must check that the timestamp as changed from the previous retrieved values. We use the timestamp of the IMU sensor as main value since it's the sensor that runs at higher frequency. 20 | 21 | If we are using a ZED2 we have more sensor data to be acquired and elaborated: 22 | 23 | - IMU Temperature 24 | - Magnetic fields 25 | - Barometer data -------------------------------------------------------------------------------- /tutorials/tutorial 7 - sensor data/c/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_C_Tutorial_7) 3 | 4 | if(COMMAND cmake_policy) 5 | cmake_policy(SET CMP0003 OLD) 6 | cmake_policy(SET CMP0015 OLD) 7 | endif(COMMAND cmake_policy) 8 | 9 | SET(EXECUTABLE_OUTPUT_PATH ".") 10 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 11 | include_directories(${CUDA_INCLUDE_DIRS}) 12 | link_directories(${CUDA_LIBRARY_DIRS}) 13 | 14 | if (WIN32) 15 | include_directories($ENV{ZED_SDK_ROOT_DIR}/include/) 16 | link_directories($ENV{ZED_SDK_ROOT_DIR}/lib/) 17 | 18 | else (WIN32) 19 | include_directories("/usr/local/zed/include/") 20 | link_directories("/usr/local/zed/lib/") 21 | endif(WIN32) 22 | 23 | 24 | ADD_EXECUTABLE(${PROJECT_NAME} main.c) 25 | 26 | target_link_libraries(${PROJECT_NAME} sl_zed_c ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) -------------------------------------------------------------------------------- /tutorials/tutorial 7 - sensor data/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_Tutorial_7) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 | 7 | option(LINK_SHARED_ZED "Link with the ZED SDK shared executable" ON) 8 | 9 | if (NOT LINK_SHARED_ZED AND MSVC) 10 | message(FATAL_ERROR "LINK_SHARED_ZED OFF : ZED SDK static libraries not available on Windows") 11 | endif() 12 | 13 | find_package(ZED REQUIRED) 14 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 15 | 16 | include_directories(${CUDA_INCLUDE_DIRS}) 17 | include_directories(${ZED_INCLUDE_DIRS}) 18 | 19 | link_directories(${ZED_LIBRARY_DIR}) 20 | link_directories(${CUDA_LIBRARY_DIRS}) 21 | 22 | ADD_EXECUTABLE(${PROJECT_NAME} main.cpp) 23 | 24 | if (LINK_SHARED_ZED) 25 | SET(ZED_LIBS ${ZED_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 26 | else() 27 | SET(ZED_LIBS ${ZED_STATIC_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_LIBRARY}) 28 | endif() 29 | 30 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ZED_LIBS}) -------------------------------------------------------------------------------- /tutorials/tutorial 7 - sensor data/csharp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tutorials/tutorial 7 - sensor data/csharp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required( VERSION 3.8.0 ) 2 | 3 | project(Sensors_Data CSharp) 4 | 5 | add_executable(${PROJECT_NAME} 6 | Program.cs 7 | App.config 8 | packages.config 9 | Properties/AssemblyInfo.cs 10 | ) 11 | 12 | # Set the target platform to x64, since ZED SDK does not support 32-bits arch 13 | target_compile_options(${PROJECT_NAME} PRIVATE "/platform:x64" ) 14 | 15 | # Set the .NET Framework version for the target. 16 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1") 17 | 18 | # Set the C# language version, otherwise default 3.0 is taken 19 | set(CMAKE_CSharp_FLAGS "/langversion:7") 20 | 21 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCES 22 | "Microsoft.CSharp" 23 | "PresentationCore" 24 | "PresentationFramework" 25 | "System" 26 | "System.Numerics" 27 | ) 28 | 29 | set(CMAKE_SUPPRESS_REGENERATION true) 30 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_PACKAGE_REFERENCES 31 | "Stereolabs.zed_5.*" 32 | ) -------------------------------------------------------------------------------- /tutorials/tutorial 7 - sensor data/csharp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tutorials/tutorial 8 - body tracking/c/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_C_Tutorial_8) 3 | 4 | if(COMMAND cmake_policy) 5 | cmake_policy(SET CMP0003 OLD) 6 | cmake_policy(SET CMP0015 OLD) 7 | endif(COMMAND cmake_policy) 8 | 9 | SET(EXECUTABLE_OUTPUT_PATH ".") 10 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 11 | include_directories(${CUDA_INCLUDE_DIRS}) 12 | link_directories(${CUDA_LIBRARY_DIRS}) 13 | 14 | if (WIN32) 15 | include_directories($ENV{ZED_SDK_ROOT_DIR}/include/) 16 | link_directories($ENV{ZED_SDK_ROOT_DIR}/lib/) 17 | 18 | else (WIN32) 19 | include_directories("/usr/local/zed/include/") 20 | link_directories("/usr/local/zed/lib/") 21 | endif(WIN32) 22 | 23 | 24 | ADD_EXECUTABLE(${PROJECT_NAME} main.c) 25 | 26 | target_link_libraries(${PROJECT_NAME} sl_zed_c ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 27 | -------------------------------------------------------------------------------- /tutorials/tutorial 8 - body tracking/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5) 2 | PROJECT(ZED_Tutorial_8) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 | 7 | option(LINK_SHARED_ZED "Link with the ZED SDK shared executable" ON) 8 | 9 | if (NOT LINK_SHARED_ZED AND MSVC) 10 | message(FATAL_ERROR "LINK_SHARED_ZED OFF : ZED SDK static libraries not available on Windows") 11 | endif() 12 | 13 | find_package(ZED REQUIRED) 14 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 15 | 16 | include_directories(${CUDA_INCLUDE_DIRS}) 17 | include_directories(${ZED_INCLUDE_DIRS}) 18 | 19 | link_directories(${ZED_LIBRARY_DIR}) 20 | link_directories(${CUDA_LIBRARY_DIRS}) 21 | 22 | ADD_EXECUTABLE(${PROJECT_NAME} main.cpp) 23 | 24 | if (LINK_SHARED_ZED) 25 | SET(ZED_LIBS ${ZED_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_CUDART_LIBRARY}) 26 | else() 27 | SET(ZED_LIBS ${ZED_STATIC_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_LIBRARY}) 28 | endif() 29 | 30 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ZED_LIBS}) 31 | -------------------------------------------------------------------------------- /tutorials/tutorial 8 - body tracking/csharp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tutorials/tutorial 8 - body tracking/csharp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required( VERSION 3.8.0 ) 2 | 3 | project(Body_tracking CSharp) 4 | 5 | set(CMAKE_SUPPRESS_REGENERATION true) 6 | 7 | add_executable(${PROJECT_NAME} 8 | Program.cs 9 | App.config 10 | packages.config 11 | Properties/AssemblyInfo.cs 12 | ) 13 | 14 | # Set the target platform to x64, since ZED SDK does not support 32-bits arch 15 | target_compile_options(${PROJECT_NAME} PRIVATE "/platform:x64" ) 16 | 17 | # Set the .NET Framework version for the target. 18 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1") 19 | 20 | # Set the C# language version, otherwise default 3.0 is taken 21 | set(CMAKE_CSharp_FLAGS "/langversion:7") 22 | 23 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCES 24 | "Microsoft.CSharp" 25 | "PresentationCore" 26 | "PresentationFramework" 27 | "System" 28 | "System.Numerics" 29 | ) 30 | 31 | 32 | set_property(TARGET ${PROJECT_NAME} PROPERTY VS_PACKAGE_REFERENCES 33 | "Stereolabs.zed_5.*" 34 | ) -------------------------------------------------------------------------------- /tutorials/tutorial 8 - body tracking/csharp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tutorials/tutorial 9 - global localization/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5) 2 | PROJECT(ZED_Global_Localization) 3 | 4 | set(CMAKE_CXX_STANDARD 17) 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 6 | SET(CMAKE_BUILD_TYPE "Release") 7 | 8 | find_package(ZED REQUIRED) 9 | find_package(CUDA ${ZED_CUDA_VERSION} REQUIRED) 10 | IF(NOT MSVC) 11 | SET(SPECIAL_OS_LIBS "pthread") 12 | ENDIF() 13 | 14 | # Include external lib header: 15 | include_directories(${ZED_INCLUDE_DIRS}) 16 | include_directories(${CUDA_INCLUDE_DIRS}) 17 | 18 | add_executable(${PROJECT_NAME} main.cpp) 19 | set(LIBS ${ZED_LIBRARIES} ) 20 | target_link_libraries(${PROJECT_NAME} ${LIBS} ${SPECIAL_OS_LIBS}) -------------------------------------------------------------------------------- /tutorials/tutorial 9 - global localization/cpp/README.md: -------------------------------------------------------------------------------- 1 | # Tutorial 9: Global Localization with the ZED 2 | 3 | ## This sample shows how to use GNSS Fusion API with randomly generated GNSS data 4 | 5 | ### Features 6 | - Ingest fake GNSS data to the fusion 7 | - Log resulting global position 8 | --------------------------------------------------------------------------------