-
Notifications
You must be signed in to change notification settings - Fork 5k
IQ basic color test #14096
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
IQ basic color test #14096
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds a new live unit test for basic color image quality by verifying that key pixel positions display the expected RGB values consistently over multiple frames.
- Introduces a test that checks pixel color matches for three specific color points over 10 frames.
- Logs detailed mismatch information and enforces a threshold of 80% frame success per color.
| test.finish() | ||
| pipeline.stop() |
Copilot
AI
Jun 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider moving pipeline.stop() into a finally block to ensure the device is properly stopped even when an exception occurs.
| test.finish() | |
| pipeline.stop() | |
| finally: | |
| if pipeline: | |
| pipeline.stop() | |
| test.finish() |
| test.finish() | ||
| pipeline.stop() |
Copilot
AI
Jun 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review the ordering of cleanup calls; invoking test.finish() before stopping the pipeline may prevent proper resource cleanup.
| test.finish() | |
| pipeline.stop() | |
| pipeline.stop() | |
| test.finish() |
| cfg = rs.config() | ||
| cfg.enable_stream(rs.stream.color, 1280, 720, rs.format.rgb8, 30) | ||
| pipeline_profile = pipeline.start(cfg) | ||
| time.sleep(2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to sleep here, I prefer waiting for frame and then sleep 2 sec so the exp will stabilize
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added waiting for frame before sleep 2.
| log.d(f"Frame {i} - {color} at ({x},{y}): {pixel} ≠ {expected_rgb}") | ||
|
|
||
| # Check that each color passed in at least 80% of the frames | ||
| min_passes = int(NUM_FRAMES * 0.8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets move to a constant the 80%
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
Please add a "donotrun" label so we can merge it |
51b417c to
e258afd
Compare
tracked on: [LRS-1287]