View my account

How to Obtain CCM and White Balance Coefficients from the EEPROM of the Intel RealSense D455 Camera?



  • MartyG

    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.

    Comment actions Permalink
  • Surban

    Hi Marty,


    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?




    Comment actions Permalink
  • MartyG

    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:

    Comment actions Permalink

Please sign in to leave a comment.