-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
The range of pixel value when using Y8 and Y16 format. #8557
Comments
Hi @fwf-lernen I have researched your question carefully. Before moving forward though, could you provide further information about your meaning when you talk about the 'pixel value' to confirm that we are both thinking about the same thing? Also, can you explain what you are trying to achieve that requires the setting that you are aiming for please? Thanks very much. |
Hi @MartyG-RealSense, thank you for your reply. // include OpenCV header file using namespace std; int main()
} ` |
Thanks very much for the information. I thought that you may have been talking about a cv::mat when you mentioned a range of 0 to 255 but wanted to make sure. I appreciate the confirmation. The link below describes how OpenCV has a mechanism that can change the pixel value to a custom-defined value if it is less or greater than a certain amount. So for example, if the 'less than' threshold is set at 17 then that code could set that pixel to a lower value such as 1 or 0 when the pixel value is 16 and triggers the mechanism. Would that be a practical solution for you? |
Thanks very much for your suggestion. But what I actually want to do is to calibrate the camera's inverse response function. So if I just set the value below 17 to 1 or 0, that means I can't calibrate the pixel value between 0 and 16. Honestly, if I can't get pixel value below 16, that means I needn't calibrate these values. I am here to find out why I can't get values below 16 directly. Is the camera set to be like this? |
I ran the testing again in the Viewer in infrared mode with exposure at '1' and observed that even with gain minimized at the lowest allowed value of 16, detail could be faintly seen in the darkened image as the camera is moved around. This suggests to me that as long as gain cannot be reduced below '16' then the '16' pixel-values in your results may represent the faintly visible detail on the IR image. A RealSense user in the case linked to below was also seeking to reduce gain below 16. The possibility of applying a physical optical filter over the camera lenses on the outside of the camera was suggested to them. |
OK, I think I have got what I want. Thanks again! |
You are very welcome. :) I can close the case for you. |
Issue Description
When I use infrared camera to capture images in Y8 format, no matter how I reduce exposure time(neither using realsense-viewer nor call API: sensor.set_option(RS2_OPTION_EXPOSURE, exposure_time) ), I can't get pixel value below 15 even though I set the exposure time to 1usec.

The same thing happens when using RGB camera to capture images in Y16 format (min pixel value is 16*256 ). Besides, no matter how I increase exposure time, I can't get pixel value above 235*256.
Is the pixel value range set to 16 ~ 255 in Y8 and 16*256 ~ 235*256 in Y16? If not, how can I get pixel value that exceed the limit?
The text was updated successfully, but these errors were encountered: