IQ basic color test - #14096
Conversation
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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.
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.
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.
Lets move to a constant the 80%
|
Please add a "donotrun" label so we can merge it |
51b417c to
e258afd
Compare
tracked on: [LRS-1287]