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: Using GLBCE in 12-bit linear mode on TDA3x.

Part Number: TDA3XEVM

Tool/software: TI-RTOS

Hi,

Anybody know how to enable GLBCE in 12-bit linear mode ? Image sensor used is OV10640.

  • Please refer to the function "IssM2mIspLink_drvCreateDrv" in file "issM2mIspLink_drv_create_delete.c".
    By default, this function initializes

    pPassCfg->openPrms.isModuleReq[VPS_ISS_ISP_MODULE_GLBCE] = (UInt32)FALSE;

    After that, this flag is enabled only when operating mode is WDR. To enable for linear mode, please set it to TRUE for all cases.
  • Hi Mayank,


    Thanks for your reply !!!.


    We were trying to improve low light performance by enabling GLBCE in 12-bit linear mode. Is this GLBCE is capable of improving low light performance ? What kind of result we can expect by enabling it ?

    We tried enabling GLBCE as you suggested. We configured GLBCE parametrs values as recommended values mentioned in TRM and GLBCE tuning guide.

    static vpsissGlbceConfig_t glbceCfg_ov10640 =
    {
    TRUE, /* ENABLE */
    128u,//240u, /* IR Strength */
    0, /* blackLevel */
    65535, /* White Level */
    12, /* Intensity variance */
    7, /* Spacial variance */
    0,//6, /* Bright Amplification Limit */
    0,//6, /* Dark Amplification Limit */
    VPS_ISS_GLBCE_NO_DITHER, //VPS_ISS_GLBCE_DITHER_FOUR_BIT,
    72, //64, /* MAX Slope Limit */
    64, //72, /* MIN Slope Limit */
    {
    0,5377,10218,14600,18585,22224,25561,28631,31466,34092,36530,
    38801,40921,42904,44764,46511,48156,49706,51171,52557,53870,
    55116,56299,57425,58498,59520,60497,61429,62322,63176,63995,
    64781,65535
    }
    };

    We tried reading GLBCE parameters while streaming (black level, White Level, Intensity variance, Spacial variance etc). These are same as updated values as in vpsissGlbceConfig_t structure.

    As per our knowledge it is recommended that all parameters be set statically to their recommended values other than the iridix strength parameter, which should be controlled dynamically with scene content. But the iridix strength we are getting as a constant value of 128 while streaming. It is not varying as per scene changes.

    Could you please update on our few queries.

    1. Is this GLBCE is capable of improving low light performance ? What kind of result we can expect by enabling it ?
    2. What all things we need to take care while enabling GLBCE in linear mode ?
    3. Where is thing iridix strenth calculation and and updation as scene changes happening in software code ?

    Please check below images captured in our lab. These are captured with GLBCE ON and OFF for same scene.

    GLBCE OFF

    GLBCE ON

  • GLBCE purpose is not lowlight tuning. It is used to improve dynamic range.

  • Yes. We need to improve the dynamic range too. Then only we can handle a scene with highlights and shadows right ? We need to handle headlights falling on camera and dark areas in a scene (for low light and night). This is also a dynamic range scene right ?

  • Yes, but there is very little GLBCE can do in linear mode. Please enable 2-pass WDR mode.
  • Hi Mayank,

    We could not play video in TWO Pass ode with vision sdk 3.1. One pass WDR mode only we are able to stream. Don't know the exact issue.
    We checked Vision sdk 3.3 and found two pass WDR is working. But exposure is not much good, having more spreading. We will check this once more.
    Anything we need to do more for linear mode ? In some e2e discussions we found like some 4 bit shifting is needed before and after GLBCE block.
  • 4-bit shift should get taken care of by the SDK when GLBCE is enabled. Please let us know if you face issues.
  • Ok Mayank. For  12 bit linear mode also ?

  • It should work for 12-b linear mode also, but I am not sure if it has been tested. Please try it and let us know if you face issues.

  • Hi Mayank,

    We enabled GLBCE by making pPassCfg->openPrms.isModuleReq[VPS_ISS_ISP_MODULE_GLBCE] = (UInt32)TRUE; in IssM2mIspLink_drvCreateDrv() function. GLBCE control 0 register (0x52051008) is 0x00000009 while streaming; which means GLBCE enabled. Is this changes alone is sufficient for GLBCE ?

    1. For WDR mode (which having GLBCE enabled) we could see pPassCfg->ispPrms.glbcePath = VPS_ISS_GLBCE_PATH_ISP; instead of pPassCfg->ispPrms.glbcePath = VPS_ISS_GLBCE_PATH_DISABLED;
    Is this needed for GLBCE in 12-bit also ? After changing this GLBCE_PATH_ISP; GLBCE control 0 register (0x52051008) is 0x00000009 when streaming starts later it changes to control 0 register (0x52051008) is 0x00000008 ; which means GLBCE disabled. A pink color observed around light sources. But the headlight in dark environments looks better.

    2. Shifting up input before GLBCE and shifting down by 4-bits after GLBCE is handled for WDR mode and monochroma mode only. Is this needed for linear mode as linear mode has 12-bit data ?

    /* For monochroma path and 16bit WDR mode, it is required to shift up the input before GLBCE and shift down by 4 bits after GLBCE. */
    if ((ISSM2MISP_LINK_OPMODE_12BIT_MONOCHROME == operatingMode) ||
    (ISSM2MISP_LINK_OPMODE_1PASS_WDR == operatingMode))
    {


    }

    Pink color disappeared after adding ISSM2MISP_LINK_OPMODE_12BIT_LINEAR mode here for shifting i/p and o/p . But light sources in dark environments (dynamic range scene) become worse as more spreading observed.

    3. This picture is captured after enabling following.

    pPassCfg->openPrms.isModuleReq[VPS_ISS_ISP_MODULE_GLBCE] = (UInt32)FALSE;
    pPassCfg->ispPrms.glbcePath = VPS_ISS_GLBCE_PATH_ISP;

    Having a pink tint. 

     

    4. Please give your suggestions regarding our queries.

  • Athira,

    In order to increase GLBCE in the linear mode,

    You need to enable it in the create args
    You need to select path of the GLBCE
    GLBCE works typically in 16bit, so it is better to shift up first and the shift down at the output.

    Regards,
    Brijesh
  • Hi Brijesh,

    Thanks for your reply!!!.
    Could you please check an on going discussion in e2e ? I have updated with our findings. I am not sure if this discussions independent.
    Please check this : e2e.ti.com/.../2532595

  • Please check this discussion to know our findings/issues and please let us know your suggestions on this.

    e2e.ti.com/.../2532595
  • Hi Athira,

    unfortunately, i will not be able to help for quality. Can help from SW.

    Regards,
    Brijesh
  • OK Brijesh.

    We have few doubts in code. Please reply if you know about this.
    1. When we need to shift the i/p and o/p ? Sensor output is 12-bit L channel Raw for linear mode and 12-bit PWL combined RAW for WDR mode.
    How to shift up and down from code ? Where we need to change in code for this ?
    Is it here handling shifting up as well as shift down ?
    if ((ISSM2MISP_LINK_OPMODE_12BIT_MONOCHROME == operatingMode) ||
            (ISSM2MISP_LINK_OPMODE_1PASS_WDR == operatingMode))
    {

    }
    2. Is this pink color is due to skipping 4-bit shifting ? Because pink removed after shifting. But some spreading happens. We need to know if we can solve pink color without affecting performance/spreading.

    This can not happens as the purpose of GLBCE is to improves dynamic range of a scene right ?  

    PS: Question could not be posted by Athira. Error found while posting query: An error occured. Please try again or contact your administartor.

  • Good to know that you are able to fix the color tint. Please attach a full resolution YUV image for us to see the open IQ issues. It will help if you can share the images

    1. with GLBCE + 4-bit shift disabled 

    2. with GLBCE + 4-bit shift enabled

  • 7028.YUV.zipPlease check attached images. These are captured in lab setup with headlight falling on camera.  Image is in black and white ; ie made for night vision.

    Image resolution : 1280*720  

    Image format : NV12

  • I can help you only in one case,

    Yes, this is correct place to shift up and down input pixel and GPBCE output respectively.


    Rgds,
    Brijesh
  • OK Brijesh. Thanks for the information.
    Hope Mayank can help regarding IQ. We sent YUV images with shifting enabled and disabled.

  • This is a duplicate thread since there is another thread discussing the same issue e2e.ti.com/.../2533691

    Please close one of these threads.
  • We typically place 12-bit linear raw into the 12MSBs of the 16-bit GLBCE input by shifting up 4 bits.
    Then, GLBCE parameters may be adjusted accordingly if necessary (GLBCE parameters in VSDK may be for 20-bit WDR mode).
    For 12-bit linear sensor input, GLBCE can improve contrast to some degree if the input image has some contrast issues.
    For your simple black and white image of a headlamp, I suspect GLBCE won't be able to help a lot (GLBCE may help for more realistic scenes with more things and details).
    Please share your 12-bit raw input image and describe your desired or expected output YUV image if you can.
  • Mayank,
    Can you close this duplicated thread ?
  • There is a confusion regarding duplicated thread. Can you just close it ?
  • Mayank; Can you check this images ?
  • Hi ATHIRA V NAIR,

    I don't see any new raw images from you.

    Best,
    Gang

  • Hi ATHIRA ,

    We haven't heard back from you, I'm assuming you were able to resolve your issue.
    If not, just post a reply below (or create a new thread if the thread has locked due to time-out).

    Regards,
    Yordan