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

third test on image quality removed. now using max laser power #12386

Merged
merged 2 commits into from
Nov 12, 2023
Merged
Changes from 1 commit
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
9 changes: 2 additions & 7 deletions unit-tests/live/image-quality/test-image-quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ def get_frames(config, laser_enabled):
pipeline_profile = pipeline.start(config)

sensor = pipeline_profile.get_device().first_depth_sensor()
if sensor.supports(rs.option.laser_power) and laser_enabled:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Do you think setting it to max will help D400 devices to always pass?
  2. Please consider switching conditions to save performance entering the function when not needed.
if laser_enabled && sensor.supports(rs.option.laser_power) :

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 - I don't think so. I tried running max laser power vs default laser power, and sometimes the default had less black pixels than the max (we'd expect it to have more)
2 - will do

sensor.set_option(rs.option.laser_power, sensor.get_option_range(rs.option.laser_power).max)
sensor.set_option(rs.option.emitter_enabled, 1 if laser_enabled else 0)

# to get a proper image, we sometimes need to wait a few frames, like when the camera is facing a light source
Expand Down Expand Up @@ -183,11 +185,4 @@ def is_depth_meaningful(config, laser_enabled=True, save_image=False, show_image

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

# Test temporarily removed,
# test.start("Testing less black pixels with the laser on")
# test.check(no_laser_black_pixels > laser_black_pixels)
# test.finish()

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

test.print_results_and_exit()
Loading