Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed third test comparing laser on/off #12334

Merged
merged 1 commit into from
Oct 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions unit-tests/live/image-quality/test-image-quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()

################################################################################################

Expand Down