This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/TDA3XEVM: Enabling black and white mode for night video

Part Number: TDA3XEVM

Tool/software: TI-RTOS

Hi,

We are working on TDA3x with visionSDK 3.1. And our usecase is Rear view panorama. Now the video is in colored mode for both Day and Night. We need to make night video as black and white. Is there any provision in SDK to make video in black and white mode ?

  • Hi Athira,

    The easiest way to have blank & white images is to fill up chroma buffer with the 0x80. In this usecase, whole chain is working in YUV420 frame format. So in the display link, you could have a chroma buffer filled with 0x80 and use this buffer instead of incoming chroma buffer.

    Rgds,
    Brijesh
  • Hi Brijesh,

    Can you please update on this ?

    • Can you please give more details about your suggestion ? Which is the buffer exactly we need to fill with 0x80 for getting black and white ? In "vision_sdk/links_fw/src/rtos/links_ipu/display/displayLink_drv.c" file (function : DisplayLink_drvProcessData()) we saw a buffer pFrame. 

    pFrame->addr[1U][1U] = (UInt8 *) pFrame->addr[0U][1U] + pObj->dssPrms.inFmt.pitch[1U];

    • Is it possible to change color to black and white mode from image pipe , ISP or from somewhere like Color conversion or color correction takes place ?

  • ATHIRA V NAIR said:

    Hi Brijesh,

    Can you please update on this ?

    • Can you please give more details about your suggestion ? Which is the buffer exactly we need to fill with 0x80 for getting black and white ? In "vision_sdk/links_fw/src/rtos/links_ipu/display/displayLink_drv.c" file (function : DisplayLink_drvProcessData()) we saw a buffer pFrame. 

    pFrame->addr[1U][1U] = (UInt8 *) pFrame->addr[0U][1U] + pObj->dssPrms.inFmt.pitch[1U];

    • Is it possible to change color to black and white mode from image pipe , ISP or from somewhere like Color conversion or color correction takes place ?

    Here we suspect like this pFrame->addr[][] arrays will hold the address of pixel data values of each lines. Thats why adding "pObj->dssPrms.inFmt.pitch[1U]" with (UInt8 *) pFrame->addr[0U][1U]. Because the pObj->dssPrms.inFmt.pitch[1U] value is 1920 always. How can we fill chroma buffer with 0x80 here ?

    Can you please confirm about another options to make video black and white from ISP or color conversion matrices ? If so please give some details regarding this. 

  • Athira,

    The other simplest way is to update RGB2YUV matrix to get U and V data as 0x80. You could change multiplication coefficients for Cb and Cr to 0 and offset to 0x80, to get the blank and white image from ISP itself.
    But i am not sure if this is ok for the rest of your image pipe. You need to check this out.

    Rgds,
    Brijesh
  • Brijesh,

    Thanks for the updates.
    We are trying to make black and white video from display by changing color phase rotation matrix coefficients. We will check the option you suggested from ISP ie, RGB2YUV matrix. Can you just mention which file exactly I need to check for RGB2YUV matrix ?
  • Hi Athira,

    What is the output color format that you are using from DSS? You could CPR module in DSS also depending on your output format.
    RGB2YUV matrix is part of the DCC profile binary. I would suggest not changing it. Instead, after DCC is applied, change the RGB2YUV matrix using driver and link provided ioctl.

    Regards,
    Brijesh
  • Hi Brijesh,

    Thanks for your reply.

    We are now able to make video black and white from both display side and also from ISP (by configuring RGB to YUV Conversion Register).