Skip to content

Commit 43e634d

Browse files
authored
5.0.4 (#709)
1 parent 71d7a13 commit 43e634d

File tree

79 files changed

+107
-106
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+107
-106
lines changed

body tracking/body tracking/cpp/src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ int main(int argc, char **argv) {
126126
while (!quit) {
127127
// Grab images
128128
auto err = zed.grab();
129-
if (err == ERROR_CODE::SUCCESS) {
129+
if (err <= ERROR_CODE::SUCCESS) {
130130
// Retrieve Detected Human Bodies
131131
zed.retrieveBodies(bodies, body_tracker_parameters_rt);
132132

body tracking/body tracking/csharp/MainWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ private void NativeWindow_Render(object sender, NativeWindowEventArgs e)
220220
Gl.Clear(ClearBufferMask.ColorBufferBit);
221221

222222
ERROR_CODE err = ERROR_CODE.FAILURE;
223-
if (viewer.isAvailable() && zedCamera.Grab(ref runtimeParameters) == ERROR_CODE.SUCCESS)
223+
if (viewer.isAvailable() && zedCamera.Grab(ref runtimeParameters) <= ERROR_CODE.SUCCESS)
224224
{
225225
if (imageLeft.IsInit())
226226
{

body tracking/body tracking/python/body_tracking.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import argparse
3232

3333
def parse_args(init, opt):
34-
if len(opt.input_svo_file)>0 and opt.input_svo_file.endswith(".svo"):
34+
if len(opt.input_svo_file)>0 and opt.input_svo_file.endswith((".svo", ".svo2")):
3535
init.set_from_svo_file(opt.input_svo_file)
3636
print("[Sample] Using SVO File input: {0}".format(opt.input_svo_file))
3737
elif len(opt.ip_address)>0 :
@@ -123,7 +123,7 @@ def main(opt):
123123
key_wait = 10
124124
while viewer.is_available():
125125
# Grab an image
126-
if zed.grab() == sl.ERROR_CODE.SUCCESS:
126+
if zed.grab() <= sl.ERROR_CODE.SUCCESS:
127127
# Retrieve left image
128128
zed.retrieve_image(image, sl.VIEW.LEFT, sl.MEM.CPU, display_resolution)
129129
# Retrieve bodies

body tracking/export/JSON export/cpp/src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ int main(int argc, char **argv)
6666
sl::Bodies bodies;
6767
while (viewer.isAvailable())
6868
{
69-
if (zed.grab() == ERROR_CODE::SUCCESS)
69+
if (zed.grab() <= ERROR_CODE::SUCCESS)
7070
{
7171
// Retrieve Detected Human Bodies
7272
zed.retrieveBodies(bodies);

body tracking/export/JSON export/python/json_export.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def default(self, obj):
119119

120120
skeleton_file_data = {}
121121
while (viewer.is_available()):
122-
if zed.grab() == sl.ERROR_CODE.SUCCESS:
122+
if zed.grab() <= sl.ERROR_CODE.SUCCESS:
123123
zed.retrieve_bodies(bodies)
124124
skeleton_file_data[str(bodies.timestamp.get_milliseconds())] = serializeBodies(bodies)
125125
viewer.update_bodies(bodies)

body tracking/multi-camera/csharp/ClientPublisher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ private void Work()
169169
while (IsRunning())
170170
{
171171
err = zedCamera.Grab(ref runtimeParameters);
172-
if (err == sl.ERROR_CODE.SUCCESS)
172+
if (err <= sl.ERROR_CODE.SUCCESS)
173173
{
174174
err = zedCamera.RetrieveBodies(ref bodies, ref bodyTrackingRuntimeParameters);
175175
}

body tracking/multi-camera/python/fused_cameras.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
bodies = sl.Bodies()
125125
for serial in senders:
126126
zed = senders[serial]
127-
if zed.grab() == sl.ERROR_CODE.SUCCESS:
127+
if zed.grab() <= sl.ERROR_CODE.SUCCESS:
128128
zed.retrieve_bodies(bodies)
129129

130130
for i in range(0, len(fusion_configurations)):
@@ -162,7 +162,7 @@
162162
while (viewer.is_available()):
163163
for serial in senders:
164164
zed = senders[serial]
165-
if zed.grab() == sl.ERROR_CODE.SUCCESS:
165+
if zed.grab() <= sl.ERROR_CODE.SUCCESS:
166166
zed.retrieve_bodies(bodies)
167167

168168
if fusion.process() == sl.FUSION_ERROR_CODE.SUCCESS:

camera control/csharp/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static void Main(string[] args)
8787
{
8888
// Check that a new image is successfully acquired
8989
returnedState = zed.Grab(ref rtParams);
90-
if (returnedState == ERROR_CODE.SUCCESS)
90+
if (returnedState <= ERROR_CODE.SUCCESS)
9191
{
9292
//Retrieve left image
9393
zed.RetrieveImage(zedImage, VIEW.LEFT);

camera control/python/camera_control.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def main():
7272
key = ''
7373
while key != 113: # for 'q' key
7474
err = cam.grab(runtime)
75-
if err == sl.ERROR_CODE.SUCCESS: # Check that a new image is successfully acquired
75+
if err <= sl.ERROR_CODE.SUCCESS: # Check that a new image is successfully acquired
7676
cam.retrieve_image(mat, sl.VIEW.LEFT) # Retrieve left image
7777
cvImage = mat.get_data() # Convert sl.Mat to cv2.Mat
7878
if (not selection_rect.is_empty() and selection_rect.is_contained(sl.Rect(0,0,cvImage.shape[1],cvImage.shape[0]))): #Check if selection rectangle is valid and draw it on the image

camera streaming/multi_sender/python/streaming_senders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def acquisition(zed):
4747
infos = zed.get_camera_information()
4848

4949
while not exit_app:
50-
if zed.grab() == sl.ERROR_CODE.SUCCESS:
50+
if zed.grab() <= sl.ERROR_CODE.SUCCESS:
5151
# If you want to add more computation here and to keep maximum performance with multiple cameras:
5252
# 1. Minimize Python operations in the loop to avoid python to block the GIL
5353
# 2. Pre-allocate objects and arrays to reduce memory allocations

0 commit comments

Comments
 (0)