Skip to content

Commit

Permalink
4.1.0 (#628)
Browse files Browse the repository at this point in the history
  • Loading branch information
adujardin authored Apr 4, 2024
1 parent b38a7ea commit 301ac04
Show file tree
Hide file tree
Showing 271 changed files with 8,142 additions and 8,990 deletions.
18 changes: 4 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@

---

:tada: The **ZED SDK 4.0** is released! We support the [**ZED X**](https://www.stereolabs.com/zed-x/) and [**ZED X Mini**](https://www.stereolabs.com/zed-x/) cameras, added the **Fusion API** for multi-camera Body Tracking, and more! Please check the [Release Notes](https://www.stereolabs.com/developers/release/) of the latest version for more details.
:tada: The **ZED SDK 4.1** is released! We support the [**ZED X**](https://www.stereolabs.com/zed-x/) and [**ZED X Mini**](https://www.stereolabs.com/zed-x/) cameras, added the **Fusion API** for multi-camera Body Tracking, and more! Please check the [Release Notes](https://www.stereolabs.com/developers/release/) of the latest version for more details.

## Overview

Depth Sensing | Object Detection | Body Tracking |
:------------: | :----------: | :-------------: |
[![Depth Sensing](https://user-images.githubusercontent.com/32394882/230639409-356b8dfa-df66-4bc2-84d8-a25fd0229779.gif)](https://www.stereolabs.com/docs/depth-sensing) | [![Object Detection](https://user-images.githubusercontent.com/32394882/230630901-9d53502a-f3f9-45b6-bf57-027148bb18ad.gif)](https://www.stereolabs.com/docs/object-detection) | [![Body Tracking](https://user-images.githubusercontent.com/32394882/230631989-24dd2b58-2c85-451b-a4ed-558d74d1b922.gif)](https://www.stereolabs.com/docs/body-tracking) |

Positional Tracking | Geo Tracking | Spatial Mapping |
Positional Tracking | Global Localization | Spatial Mapping |
:------------: | :----------: | :-------------: |
[![Positional Tracking](https://user-images.githubusercontent.com/32394882/229093429-a445e8ae-7109-4995-bc1d-6a27a61bdb60.gif)](https://www.stereolabs.com/docs/positional-tracking/) | [![GeoTracking](https://user-images.githubusercontent.com/32394882/230602944-ed61e6dd-e485-4911-8a4c-d6c9e4fab0fd.gif)](/geotracking) | [![Spatial Mapping](https://user-images.githubusercontent.com/32394882/229099549-63ca7832-b7a2-42eb-9971-c1635d205b0c.gif)](https://www.stereolabs.com/docs/spatial-mapping) |
[![Positional Tracking](https://user-images.githubusercontent.com/32394882/229093429-a445e8ae-7109-4995-bc1d-6a27a61bdb60.gif)](https://www.stereolabs.com/docs/positional-tracking/) | [![Global Localization](https://user-images.githubusercontent.com/32394882/230602944-ed61e6dd-e485-4911-8a4c-d6c9e4fab0fd.gif)](/global%20localization) | [![Spatial Mapping](https://user-images.githubusercontent.com/32394882/229099549-63ca7832-b7a2-42eb-9971-c1635d205b0c.gif)](https://www.stereolabs.com/docs/spatial-mapping) |

Camera Control | Plane Detection | Multi Camera Fusion |
:------------: | :----------: | :-------------: |
Expand Down Expand Up @@ -83,7 +83,7 @@ This repository contains ready-to-use and samples to start using the ZED SDK wit

* [**Positional Tracking**](/positional%20tracking) - This sample shows how to use **positional tracking** and display the result with *OpenGL*.

* [**GeoTracking**](/geotracking) - This sample shows how to fuse the ZED SDK's **positional tracking with GNSS data** for global positioning.
* [**Global Localization**](/global%20localization) - This sample shows how to fuse the ZED SDK's **positional tracking with GNSS data** for global positioning.

* [**Spatial Mapping**](/spatial%20mapping) - This sample shows how to capture **3D meshes** with the ZED and display it with *OpenGL*. Classic Mesh and Point Cloud fusion are available.

Expand Down Expand Up @@ -127,16 +127,6 @@ Thanks to its comprehensive API, ZED cameras can be interfaced with **multiple t
| <div align="center"><a href="https://www.stereolabs.com/docs/pytorch"><img src="https://user-images.githubusercontent.com/32394882/229475918-1add790d-b10e-4529-a1d7-097f015a481f.png" width="70%" alt="" /></a></div> | <div align="center"><a href="https://www.stereolabs.com/docs/yolo/"><img src="https://user-images.githubusercontent.com/32394882/230623781-3c87a5c9-b6af-4f93-bcc7-5ec381acf5d7.png" width="70%" alt="" /></a></div> | <div align="center"><a href="https://www.stereolabs.com/docs/matlab/"><img src="https://user-images.githubusercontent.com/32394882/229472074-4747f789-4ce6-4aef-b4f7-eab3bb77ab52.png" width="70%" alt="" /></a></div> | <div align="center"><a href="https://www.stereolabs.com/"><img src="https://user-images.githubusercontent.com/32394882/229472012-fe8d4458-219b-4825-8e87-9a3e9bc55e62.png" width="70%" alt="" /></a></div> | <div align="center"><a href="https://derivative.ca/UserGuide/ZED"><img src="https://user-images.githubusercontent.com/32394882/230623653-630e7bd2-1300-47ad-8133-39543470b2b1.png" width="70%" alt="" /></a></div>


## ZED Hub

Experience ZED like never before with [ZED Hub](https://hub.stereolabs.com), Stereolabs' IoT platform allowing **easy management of camera fleets** and **data aggregation**, fully managed on the cloud. Unlike competitors, ZED Hub offers **plug-and-play** functionality and dedicated features for your applications developed with the ZED SDK. ZED Hub simplifies the **integration of 3D perception**, offering **remote access** and **monitoring** to your cameras . Start for **Free** now!

<br />

<div align="center">
<img src="https://cdn2.stereolabs.com/assets/images/zed-hub/zed-hub-workflow.png" width="60%"/>
</div>

<br />

## Community
Expand Down
4 changes: 2 additions & 2 deletions body tracking/body tracking/cpp/include/GLViewer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,15 @@ class Shader {

Shader() {
}
Shader(GLchar* vs, GLchar* fs);
Shader(const GLchar* vs, const GLchar* fs);
~Shader();
GLuint getProgramId();

static const GLint ATTRIB_VERTICES_POS = 0;
static const GLint ATTRIB_COLOR_POS = 1;
static const GLint ATTRIB_NORMAL = 2;
private:
bool compile(GLuint &shaderId, GLenum type, GLchar* src);
bool compile(GLuint &shaderId, GLenum type, const GLchar* src);
GLuint verterxId_;
GLuint fragmentId_;
GLuint programId_;
Expand Down
12 changes: 6 additions & 6 deletions body tracking/body tracking/cpp/src/GLViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#error "This sample should not be built in Debug mode, use RelWithDebInfo if you want to do step by step."
#endif

GLchar* VERTEX_SHADER =
const GLchar* VERTEX_SHADER =
"#version 330 core\n"
"layout(location = 0) in vec3 in_Vertex;\n"
"layout(location = 1) in vec4 in_Color;\n"
Expand All @@ -16,15 +16,15 @@ GLchar* VERTEX_SHADER =
" gl_Position = u_mvpMatrix * vec4(in_Vertex, 1);\n"
"}";

GLchar* FRAGMENT_SHADER =
const GLchar* FRAGMENT_SHADER =
"#version 330 core\n"
"in vec4 b_color;\n"
"layout(location = 0) out vec4 out_Color;\n"
"void main() {\n"
" out_Color = b_color;\n"
"}";

GLchar* SK_VERTEX_SHADER =
const GLchar* SK_VERTEX_SHADER =
"#version 330 core\n"
"layout(location = 0) in vec3 in_Vertex;\n"
"layout(location = 1) in vec4 in_Color;\n"
Expand All @@ -41,7 +41,7 @@ GLchar* SK_VERTEX_SHADER =
" gl_Position = u_mvpMatrix * vec4(in_Vertex, 1);\n"
"}";

GLchar* SK_FRAGMENT_SHADER =
const GLchar* SK_FRAGMENT_SHADER =
"#version 330 core\n"
"in vec4 b_color;\n"
"in vec3 b_position;\n"
Expand Down Expand Up @@ -731,7 +731,7 @@ sl::Transform Simple3DObject::getModelMatrix() const {
return tmp;
}

Shader::Shader(GLchar* vs, GLchar* fs) {
Shader::Shader(const GLchar* vs, const GLchar* fs) {
if (!compile(verterxId_, GL_VERTEX_SHADER, vs)) {
std::cout << "ERROR: while compiling vertex shader" << std::endl;
}
Expand Down Expand Up @@ -779,7 +779,7 @@ GLuint Shader::getProgramId() {
return programId_;
}

bool Shader::compile(GLuint &shaderId, GLenum type, GLchar* src) {
bool Shader::compile(GLuint &shaderId, GLenum type, const GLchar* src) {
shaderId = glCreateShader(type);
if (shaderId == 0) {
std::cout << "ERROR: shader type (" << type << ") does not exist" << std::endl;
Expand Down
11 changes: 6 additions & 5 deletions body tracking/body tracking/cpp/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2023, STEREOLABS.
// Copyright (c) 2024, STEREOLABS.
//
// All rights reserved.
//
Expand Down Expand Up @@ -50,7 +50,8 @@ int main(int argc, char **argv) {
Camera zed;
InitParameters init_parameters;
init_parameters.camera_resolution = RESOLUTION::AUTO;
init_parameters.depth_mode = DEPTH_MODE::ULTRA;
init_parameters.depth_mode = isJetson ? DEPTH_MODE::PERFORMANCE : DEPTH_MODE::ULTRA;
//init_parameters.depth_mode = DEPTH_MODE::ULTRA;
init_parameters.coordinate_system = COORDINATE_SYSTEM::RIGHT_HANDED_Y_UP;

parseArgs(argc, argv, init_parameters);
Expand Down Expand Up @@ -78,7 +79,7 @@ int main(int argc, char **argv) {
// Enable the Body tracking module
BodyTrackingParameters body_tracker_params;
body_tracker_params.enable_tracking = true; // track people across images flow
body_tracker_params.enable_body_fitting = true; // smooth skeletons moves
body_tracker_params.enable_body_fitting = false; // smooth skeletons moves
body_tracker_params.body_format = sl::BODY_FORMAT::BODY_34;
body_tracker_params.detection_model = isJetson ? BODY_TRACKING_MODEL::HUMAN_BODY_FAST : BODY_TRACKING_MODEL::HUMAN_BODY_ACCURATE;
//body_tracker_params.allow_reduced_precision_inference = true;
Expand Down Expand Up @@ -111,7 +112,7 @@ int main(int argc, char **argv) {

// Configure object detection runtime parameters
BodyTrackingRuntimeParameters body_tracker_parameters_rt;
body_tracker_parameters_rt.detection_confidence_threshold = 60;
body_tracker_parameters_rt.detection_confidence_threshold = 40;
body_tracker_parameters_rt.skeleton_smoothing = 0.7;

// Create ZED Bodies filled in the main loop
Expand Down Expand Up @@ -221,4 +222,4 @@ void print(string msg_prefix, ERROR_CODE err_code, string msg_suffix) {
if (!msg_suffix.empty())
cout << " " << msg_suffix;
cout << endl;
}
}
2 changes: 1 addition & 1 deletion body tracking/body tracking/csharp/MainWindow.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2023, STEREOLABS.
// Copyright (c) 2024, STEREOLABS.
//
// All rights reserved.
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Tutorials")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
4 changes: 2 additions & 2 deletions body tracking/export/JSON export/cpp/include/GLViewer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,15 @@ class Shader {

Shader() {
}
Shader(GLchar* vs, GLchar* fs);
Shader(const GLchar* vs, const GLchar* fs);
~Shader();
GLuint getProgramId();

static const GLint ATTRIB_VERTICES_POS = 0;
static const GLint ATTRIB_COLOR_POS = 1;
static const GLint ATTRIB_NORMAL = 2;
private:
bool compile(GLuint &shaderId, GLenum type, GLchar* src);
bool compile(GLuint &shaderId, GLenum type, const GLchar* src);
GLuint verterxId_;
GLuint fragmentId_;
GLuint programId_;
Expand Down
12 changes: 6 additions & 6 deletions body tracking/export/JSON export/cpp/src/GLViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#error "This sample should not be built in Debug mode, use RelWithDebInfo if you want to do step by step."
#endif

GLchar* VERTEX_SHADER =
const GLchar* VERTEX_SHADER =
"#version 330 core\n"
"layout(location = 0) in vec3 in_Vertex;\n"
"layout(location = 1) in vec4 in_Color;\n"
Expand All @@ -16,15 +16,15 @@ GLchar* VERTEX_SHADER =
" gl_Position = u_mvpMatrix * vec4(in_Vertex, 1);\n"
"}";

GLchar* FRAGMENT_SHADER =
const GLchar* FRAGMENT_SHADER =
"#version 330 core\n"
"in vec4 b_color;\n"
"layout(location = 0) out vec4 out_Color;\n"
"void main() {\n"
" out_Color = b_color;\n"
"}";

GLchar* SK_VERTEX_SHADER =
const GLchar* SK_VERTEX_SHADER =
"#version 330 core\n"
"layout(location = 0) in vec3 in_Vertex;\n"
"layout(location = 1) in vec4 in_Color;\n"
Expand All @@ -41,7 +41,7 @@ GLchar* SK_VERTEX_SHADER =
" gl_Position = u_mvpMatrix * vec4(in_Vertex, 1);\n"
"}";

GLchar* SK_FRAGMENT_SHADER =
const GLchar* SK_FRAGMENT_SHADER =
"#version 330 core\n"
"in vec4 b_color;\n"
"in vec3 b_position;\n"
Expand Down Expand Up @@ -720,7 +720,7 @@ sl::Transform Simple3DObject::getModelMatrix() const {
return tmp;
}

Shader::Shader(GLchar* vs, GLchar* fs) {
Shader::Shader(const GLchar* vs, const GLchar* fs) {
if (!compile(verterxId_, GL_VERTEX_SHADER, vs)) {
std::cout << "ERROR: while compiling vertex shader" << std::endl;
}
Expand Down Expand Up @@ -768,7 +768,7 @@ GLuint Shader::getProgramId() {
return programId_;
}

bool Shader::compile(GLuint &shaderId, GLenum type, GLchar* src) {
bool Shader::compile(GLuint &shaderId, GLenum type, const GLchar* src) {
shaderId = glCreateShader(type);
if (shaderId == 0) {
std::cout << "ERROR: shader type (" << type << ") does not exist" << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion body tracking/export/JSON export/cpp/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2023, STEREOLABS.
// Copyright (c) 2024, STEREOLABS.
//
// All rights reserved.
//
Expand Down
2 changes: 1 addition & 1 deletion body tracking/export/fbx export/cpp/include/utils.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2023, STEREOLABS.
// Copyright (c) 2024, STEREOLABS.
//
// All rights reserved.
//
Expand Down
2 changes: 1 addition & 1 deletion body tracking/export/fbx export/cpp/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2023, STEREOLABS.
// Copyright (c) 2024, STEREOLABS.
//
// All rights reserved.
//
Expand Down
4 changes: 2 additions & 2 deletions body tracking/multi-camera/cpp/include/GLViewer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ class Shader {

Shader() {
}
Shader(GLchar* vs, GLchar* fs);
Shader(const GLchar* vs, const GLchar* fs);
~Shader();
GLuint getProgramId();

static const GLint ATTRIB_VERTICES_POS = 0;
static const GLint ATTRIB_COLOR_POS = 1;
static const GLint ATTRIB_NORMAL = 2;
private:
bool compile(GLuint &shaderId, GLenum type, GLchar* src);
bool compile(GLuint &shaderId, GLenum type, const GLchar* src);
GLuint verterxId_;
GLuint fragmentId_;
GLuint programId_;
Expand Down
20 changes: 10 additions & 10 deletions body tracking/multi-camera/cpp/src/GLViewer.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "GLViewer.hpp"

GLchar* VERTEX_SHADER =
const GLchar* VERTEX_SHADER =
"#version 330 core\n"
"layout(location = 0) in vec3 in_Vertex;\n"
"layout(location = 1) in vec3 in_Color;\n"
Expand All @@ -11,7 +11,7 @@ GLchar* VERTEX_SHADER =
" gl_Position = u_mvpMatrix * vec4(in_Vertex, 1);\n"
"}";

GLchar* FRAGMENT_SHADER =
const GLchar* FRAGMENT_SHADER =
"#version 330 core\n"
"in vec3 b_color;\n"
"layout(location = 0) out vec4 color;\n"
Expand All @@ -20,7 +20,7 @@ GLchar* FRAGMENT_SHADER =
"}";


GLchar* POINTCLOUD_VERTEX_SHADER =
const GLchar* POINTCLOUD_VERTEX_SHADER =
"#version 330 core\n"
"layout(location = 0) in vec4 in_VertexRGBA;\n"
"out vec4 b_color;\n"
Expand All @@ -39,15 +39,15 @@ GLchar* POINTCLOUD_VERTEX_SHADER =
" gl_Position = u_mvpMatrix * vec4(in_VertexRGBA.xyz, 1);\n"
"}";

GLchar* POINTCLOUD_FRAGMENT_SHADER =
const GLchar* POINTCLOUD_FRAGMENT_SHADER =
"#version 330 core\n"
"in vec4 b_color;\n"
"layout(location = 0) out vec4 out_Color;\n"
"void main() {\n"
" out_Color = b_color;\n"
"}";

GLchar* VERTEX_SHADER_TEXTURE =
const GLchar* VERTEX_SHADER_TEXTURE =
"#version 330 core\n"
"layout(location = 0) in vec3 in_Vertex;\n"
"layout(location = 1) in vec2 in_UVs;\n"
Expand All @@ -58,7 +58,7 @@ GLchar* VERTEX_SHADER_TEXTURE =
" UV = in_UVs;\n"
"}\n";

GLchar* FRAGMENT_SHADER_TEXTURE =
const GLchar* FRAGMENT_SHADER_TEXTURE =
"#version 330 core\n"
"in vec2 UV;\n"
"uniform sampler2D texture_sampler;\n"
Expand Down Expand Up @@ -651,7 +651,7 @@ void Simple3DObject::draw() {
glBindVertexArray(0);
}

Shader::Shader(GLchar* vs, GLchar* fs) {
Shader::Shader(const GLchar* vs, const GLchar* fs) {
if (!compile(verterxId_, GL_VERTEX_SHADER, vs)) {
std::cout << "ERROR: while compiling vertex shader" << std::endl;
}
Expand Down Expand Up @@ -699,7 +699,7 @@ GLuint Shader::getProgramId() {
return programId_;
}

bool Shader::compile(GLuint &shaderId, GLenum type, GLchar* src) {
bool Shader::compile(GLuint &shaderId, GLenum type, const GLchar* src) {
shaderId = glCreateShader(type);
if (shaderId == 0) {
std::cout << "ERROR: shader type (" << type << ") does not exist" << std::endl;
Expand Down Expand Up @@ -727,7 +727,7 @@ bool Shader::compile(GLuint &shaderId, GLenum type, GLchar* src) {
return true;
}

GLchar* IMAGE_FRAGMENT_SHADER =
const GLchar* IMAGE_FRAGMENT_SHADER =
"#version 330 core\n"
" in vec2 UV;\n"
" out vec4 color;\n"
Expand All @@ -739,7 +739,7 @@ GLchar* IMAGE_FRAGMENT_SHADER =
" color = vec4(color_rgb,1);\n"
"}";

GLchar* IMAGE_VERTEX_SHADER =
const GLchar* IMAGE_VERTEX_SHADER =
"#version 330\n"
"layout(location = 0) in vec3 vert;\n"
"out vec2 UV;"
Expand Down
Loading

0 comments on commit 301ac04

Please sign in to comment.