From f8050e57d187c3545fa889dfb4d9a2cdfd5c92a1 Mon Sep 17 00:00:00 2001 From: Avia Avraham <145359432+AviaAv@users.noreply.github.com> Date: Sun, 29 Oct 2023 15:55:15 +0200 Subject: [PATCH] removed third test comparing between laser on/off, minor change when saving image --- unit-tests/live/image-quality/test-image-quality.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/unit-tests/live/image-quality/test-image-quality.py b/unit-tests/live/image-quality/test-image-quality.py index 42a091faf2..1a1b6273aa 100644 --- a/unit-tests/live/image-quality/test-image-quality.py +++ b/unit-tests/live/image-quality/test-image-quality.py @@ -45,7 +45,7 @@ def display_image(img): pass -def frames_to_image(depth, color, save, display): +def frames_to_image(depth, color, save, display, laser_enabled): """ This function gets depth and color frames, transforms them to an image (numpy array) and then save and/or display @@ -72,7 +72,7 @@ def frames_to_image(depth, color, save, display): img = np.concatenate((depth_image, color_image), axis=1) if save: - file_name = "output_stream.png" + file_name = f"output_stream{'_laser_on' if laser_enabled else '_laser_off'}.png" log.i("Saved image in", os.getcwd() + "\\" + file_name) cv2.imwrite(file_name, img) if display: @@ -155,7 +155,7 @@ def is_depth_meaningful(config, laser_enabled=True, save_image=False, show_image # save or display image (only possible through manual debugging) if save_image or show_image: - frames_to_image(depth, color, save_image, show_image) + frames_to_image(depth, color, save_image, show_image, laser_enabled) # Goes over the distances found, and checks if any distance is the same on more than 90% of the pixels meaningful_depth = True @@ -183,9 +183,10 @@ def is_depth_meaningful(config, laser_enabled=True, save_image=False, show_image ################################################################################################ -test.start("Testing less black pixels with the laser on") -test.check(no_laser_black_pixels > laser_black_pixels) -test.finish() +# Test temporarily removed, +# test.start("Testing less black pixels with the laser on") +# test.check(no_laser_black_pixels > laser_black_pixels) +# test.finish() ################################################################################################