Skip to content

image quality test - adding comparison to laser off if depth is detected - #12449

Merged
Nir-Az merged 2 commits into
realsenseai:developmentfrom
AviaAv:depth-test
Dec 3, 2023
Merged

image quality test - adding comparison to laser off if depth is detected#12449
Nir-Az merged 2 commits into
realsenseai:developmentfrom
AviaAv:depth-test

Conversation

@AviaAv

@AviaAv AviaAv commented Nov 27, 2023

Copy link
Copy Markdown
Contributor

Tracked on [LRS-902]

@AviaAv
AviaAv requested a review from Nir-Az November 27, 2023 13:42
Comment thread unit-tests/live/image-quality/test-image-quality.py

test.start("Testing depth frame - laser ON -", dev.get_info(rs.camera_info.name))
res, laser_black_pixels = is_depth_meaningful(cfg, laser_enabled=True, save_image=DEBUG_MODE, show_image=DEBUG_MODE)
res = False

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

res / result is confusing, please rename and add comments


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

if res is True:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why do we condition it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I figured that if we have no depth in the frame, there is no point in comparing it to the frame without the laser, because the frame might be mostly black pixels anyway

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

And the previous will fail?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The comparison? It might fail, yes, not guaranteed but it can happen, but I don't think it indicates anything.
I can remove the condition if needed.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I want to make sure we don't get test-pass when actually nothing worked as expected :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

if res is false we will get test failed, if it is true, we will do the second test and see if it passes

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please add a comment explaining it

res, laser_black_pixels = is_depth_meaningful(cfg, laser_enabled=True, save_image=DEBUG_MODE, show_image=DEBUG_MODE)
res = False
max_black_pixels = float('inf')
for i in range(5):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

please add a cooment why we do this loop and maybe use a const global variable for FRAMES_TO_CHECK = 5?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Did it really help? The 5 loop?
Do you think it is stable?
We can increase to 30
But we need it 100% stable

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It can help, mostly it helps if there's no depth found, but it's best to find the frame with the least black pixels anyway.
From what I've seen it is stable - if there is no depth the test will fail, if there is, they both should pass

@Nir-Az Nir-Az left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, lets monitor it and see if it's stable

@Nir-Az
Nir-Az merged commit bfe95cd into realsenseai:development Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants