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.

TDA4VM: 10 Bit Monochrome Sensor OpenVX Graph

Part Number: TDA4VM

Hello,

We are currently in the process of integrating a custom 10 bit monochrome sensor to the TDA4VM platform. At the moment we are attempting to use an adapted version of the multi-camera usecase for this integration, however, this usecase does not run when the sensor is configured to be in 10 bit mode by

{TIVX_RAW_IMAGE_16_BIT, 9}

This causes the VISS node to be unable to initialize. I've discovered that the Capture node seems to be able to initialize and be receiving frames when the viss node is removed from the usecase, however this causes issues related to the mosaic node, which can also be removed. This should be leaving just the Capture and Display nodes of the graph, however, the Display node errors out during initialization reporting that it is being passed incorrect parameters, presumably because of the type of data that the camera is outputting, that being Raw 10 bit monochrome data.

I was wondering if you could provide any assistance on what the recommended OpenVX setup for processing a monochrome sensor like this such that it can be output to a display would be, such as any specific OpenVX nodes or parameters that may need to be set that are missing.

Thanks.

  • Hi Spencer,

    Which nodes are you ultimately wanting to incorporate into the graph of your use case?

    Also, regarding your statement about the nodes being unable to initialize, could you provide logs which indicate these errors?

    Regards,

    Lucas 

  • Hi Lucas,

    The error we get when initializing without VISS or Mosaic turned on is the following:

        57.666671 s:  VX_ZONE_ERROR:[vxSetParameterByIndex:257] Invalid type 0x00000817!
        57.666682 s:  VX_ZONE_ERROR:[vxSetParameterByIndex:305] Specified: parameter[1] type:00000817 => 0x6fb2d8
        57.666688 s:  VX_ZONE_ERROR:[vxSetParameterByIndex:307] Required: parameter[1] dir:0 type:0000080f
        57.666695 s:  VX_ZONE_ERROR:[vxGetStatus:713] Reference is NULL
    [DISPLAY-MODULE] Unable to create display node!
        57.666706 s:  VX_ZONE_ERROR:[ownReleaseReferenceInt:307] Invalid reference

    As far as specific nodes for incorporating into the usecase, we have a custom node which is performing some calculations on each frame to produce histogram data. We would also like to be able to use the mosaic and display nodes to view multiple cameras at once (most like 2 or 4 cameras).

    Here is the log from running the usecase with viss and mosaic both enabled:

    [MCU2_0]    102.287593 s:  VX_ZONE_WARNING:[tivxVpacVissCreate:369] VISS H3A output is not generated due to DCC not being enabled
       102.292391 s:  VX_ZONE_ERROR:[ownContextSendCmd:783] Command ack message returned failure cmd_status: -1
       102.292401 s:  VX_ZONE_ERROR:[ownContextSendCmd:819] tivxEventWait() failed.
       102.292408 s:  VX_ZONE_ERROR:[ownNodeKernelInit:538] Target kernel, TIVX_CMD_NODE_CREATE failed for node viss_node
       102.292414 s:  VX_ZONE_ERROR:[ownNodeKernelInit:539] Please be sure the target callbacks have been registered for this core
       102.292420 s:  VX_ZONE_ERROR:[ownNodeKernelInit:540] If the target callbacks have been registered, please ensure no errors are occurring within the create callback of this kernel
       102.292502 s:  VX_ZONE_ERROR:[ownGraphNodeKernelInit:583] kernel init for node 1, kernel com.ti.hwa.vpac_viss ... failed !!!
       102.292512 s:  VX_ZONE_ERROR:[vxVerifyGraph:2044] Node kernel init failed
       102.292518 s:  VX_ZONE_ERROR:[vxVerifyGraph:2098] Graph verify failed
    [MCU2_0]    102.292221 s:  VX_ZONE_ERROR:[tivxVpacVissCreate:615] Failed to set Params in driver

    And here is the error that floods the console when only mosaic is left on:

    [MCU2_0]    311.183746 s:  VX_ZONE_ERROR:[tivxKernelImgMosaicMscDrvSubmit:983] Failed to Submit Request
    [MCU2_0]    311.217767 s:  VX_ZONE_ERROR:[tivxKernelImgMosaicMscDrvSubmit:983] Failed to Submit Request
    [MCU2_0]    311.251814 s:  VX_ZONE_ERROR:[tivxKernelImgMosaicMscDrvSubmit:983] Failed to Submit Request
    [MCU2_0]    311.285859 s:  VX_ZONE_ERROR:[tivxKernelImgMosaicMscDrvSubmit:983] Failed to Submit Request

    Thanks,

    Spencer

  • Spencer,

    Are you using VISS node? VISS node does not currently work for RAW10 bit mode. It is a known bug.

    Can you try small change that i had shared on below link. 

    e2e.ti.com/.../tda4vm-q1-how-to-support-raw-10-bit-camera

    Regards,

    Brijesh

  • Brijesh,

    Thank you this patch was at least able to get us data through the OpenVX graph. Currently the patch does cause the data coming out of the camera to be completely saturated when it's processed (Causing a completely white image). The link you sent references something about using DCC to perform the proper bitmasking and correctly handling saturation. If you could point me to any documentation for how to set that up it would be very helpful.


    Thanks,

    Spencer

  • Hi Spencer,

    In the RAWFE decompand block, the mask and shift module is used first for the incoming pixel. Bit wise and operation is performed first on the incoming pixel and then then shift operations. You could set mask value to 0x3FF and shift to 0 to get back the 10 bit data. 

    For example mask is set 0xFFF and shift to 0 for IMX390 in the file ti-processor-sdk-rtos-j721e-evm-08_01_00_13\imaging\sensor_drv\src\imx390\dcc_xmls\linear\IMX390_rawfe_decompand.xml..

    Regards,

    Brijesh

  • Hi Brijesh,

    Do you have a reference you could point me to for how to set up this file for the new sensor? I understand which parameters in it to change for this specific usecase (mask being 0x3FF and shift being 0), but I'm unsure how to set up the rest of the DCC file and module to be used for this sensor. If you could point me in the right direction for where to look for how to do this that would be great.

    Thanks,

    Spencer

  • Hi Spencer,

    What VISS processing do you need for this 10-bit monochrome sensor?

    Best,
    Gang

  • Hi Gang,

    I'd like the minimum amount of processing required for VISS to be able to display a monochrome sensor output onto a display. We have an algorithm that will be running on the c7x cores as an OpenVX node which will be processing the incoming data as well, ideally in 10bit raw format still.

    Thanks,

    Spencer

  • Hi Spencer,

    For a monochrome sensor, there is no real VISS processing needed.
    You may bypass VISS completely.
    If DSS supports displaying 10-bit images (I am not familiar with DSS though), then you may display sensor image directly.
    If not, you could drop 2 LSBs or apply a 10-bit to 8-bit gamma curve in C7x before displaying.

    In case, you would like to use VISS, you will have to adjust VISS settings for the following

    1. program RAWFE for linear 10-bit input (i.e., shift 10-bit input up by 2 bits to 12-bit)

    2. bypass NSF4/GLBCE and disable AWB

    3. program FCFAI for monochrome input

    4. use default FCC settings in PSDK for YUV 8-bit output (UV will be 128 for monochrome)

    You may refer to the NDA version of TDA4 TRM for more details of VISS.

    Best,
    Gang

  • Hi Gang,

    Could you point me in the direction for documentation on how to get the RAWFE/DCC module set up?

    Thanks,
    Spencer

  • Hi Spencer,

    I suppose D3 have CDDS access for the NDA version of TDA4 TRM and ISP training materials.

    Best,
    Gang

  • Hi Gang,
    Yes D3 does have access to these documents, or at least specifically the TRM, I will have to check for the ISP materials. Does a specific spot in the TRM describe how to set up the DCC?


    Thanks,

    Spencer

  • Hi Spencer,

    DCC is covered by training materials and tuning tool.

    If you only need to enable the display and don't care too much about image quality, DCC settings don't matter much.
    Once you bypass NSF4/GLBCE and disable AWB in PSDK s/w, and use a CCM to output only the "Green" channel, you shall be able to get a proper display.
    In this case, you may contact me via email for further discussions since we cannot disclose NDA information on public forum.

    Best,
    Gang