How to Obtain CCM and White Balance Coefficients from the EEPROM of the Intel RealSense D455 Camera?
Hello Intel RealSense community,
I'm currently working with an Intel RealSense D455 camera and would like to obtain the color correction matrix (CCM) and white balance coefficients stored in the camera's EEPROM. Having accurate color correction and white balance is crucial for my application, and I'm looking for a way to access these values directly from the camera's firmware.
Can anyone provide guidance on how to read the CCM and white balance coefficients from the EEPROM of the D455 camera? Is there a specific API or function call available in the Intel RealSense SDK that would allow me to access these values? If so, it would be great if you could provide a code example or point me to the relevant documentation.
Additionally, if there is any recommended procedure to update these coefficients in the camera's EEPROM based on calibration results obtained using a color calibration target, I would appreciate any advice or resources on that topic as well.
Thank you in advance for your help and support.
Hi Surban The Color Correction Matrix can be accessed through the Advanced Mode API of a RealSense 400 Series camera. An example of C++ code for doing so is below.
/* Sets new values for STColorCorrection, returns 0 if success */
void rs2_set_color_correction(rs2_device* dev, const STColorCorrection* group, rs2_error** error);
Further information about Advanced Mode can be found here:
Color Correction can also be controlled in the RealSense Viewer tool by going to the Stereo Module > Advanced Controls > Color Correction section of the Viewer's options side-panel.
In regard to white balance, the link below has an example of Python code for getting and setting white balance with the instruction RS_OPTION_WHITE_BALANCE - the C++ equivalent is RS2_OPTION_WHITE_BALANCE
RealSense's Dynamic Calibration tool can calibrate the RGB sensor and write the result of the calibration to the camera hardware. The tool can be downloaded for Windows from the link below or built on Linux using instructions on page 14 onwards of the tool's user guide.
thanks for the response.
I've checked the relevant documentation and tested the color correction settings in the RealSense viewer. Unfortunately, they only seem to apply to the left hand camera of the stereo pair of the D415, which uses color sensors for depth while the D435 and D455 are using monochrome sensors.
I am looking for the color calibration matrix of the separate color (RGB) camera of D435 and D455. Is there a possibility to read it?
There is not an equivalent option in the RealSense SDK to access a camera calibration matrix for RGB.
As the SDK is fully compatible with OpenCV, it may be possible to calculate an RGB calibration matrix with OpenCV. For research leads I recommend googling for the term below, including the quotation marks to ensure relevancy of search results.
"color calibration matrix" "opencv"
An example of a relevant search result is here:
Please sign in to leave a comment.