AM69A: ISP Tuning: Edge Enhancement and Noise Filter is not affected from the pipeline in SDK 9.2

Part Number: AM69A

Tool/software:

Hi,

I am using Live tuning tool to tune IMX334 sensor. I found out that edge enhancement and noise filtering is not affecting the feed.

For edge enhancement, I got a hack to make it work.

By doing following changes in ti-vision-apps/repo/imaging/kernels/hwa/host/vx_vpac_viss_host.c

<             prms->fcp[i].ee_mode     = TIVX_VPAC_VISS_EE_MODE_OFF;
---
>             prms->fcp[i].ee_mode     = TIVX_VPAC_VISS_EE_MODE_Y8;

Here is my pipeline:

gst-launch-1.0 v4l2src device=/dev/video4 io-mode=5 ! video/x-bayer,width=3840,height=2160,format=rggb12 ! queue leaky=2 ! tiovxisp sink_0::device=/dev/v4l-subdev2 dcc-isp-file= /home/root/imx334_binaries/dcc_viss_awbcc.bin sink_0::dcc-2a-file= /home/root/imx334_binaries/dcc_2a_default.bin sensor-name=SENSOR_SONY_IMX334 format-msb=11 ee-mode=2 ! queue ! tiovxmultiscaler ! video/x-raw,width=1920,height=1080 ! kmssink driver-name=tidss sync=false

Rest BLC, AWB, Color Corrections are working fine with live tuning

NOTE:
I am using SDK 9.2.0

  • Hi Sathiya,

    Yes, EE has to be turned on first.
    NSF4 shall be turned on as well (I am not sure if it is on by default).

    You may find some more details in this app note -- www.ti.com/.../sprad86

    Copying my friend for her comments.

  • Hi Gang Hua,

    This will work on SDK 9.1

    In SDK 9.2, there is no ee_mode mentioned in the file /edgeai-tiovx-modules/src/tiovx_viss_module.c
    But similar variable is mentioned in <$BUILD_DIR>/arago-tmp-default-glibc/work/aarch64-oe-linux/ti-vision-apps/1.0-r0_edgeai_4/repo/imaging/kernels/hwa/host/vx_vpac_viss_host.c

    void tivx_vpac_viss_params_init(tivx_vpac_viss_params_t *prms)
    {
        if (NULL != prms)
        {
    
            uint32_t i;
            memset(prms, 0x0, sizeof(tivx_vpac_viss_params_t));
    
            tivx_vpac_viss1_params_init(prms);
    
            for(i=0; i< TIVX_VPAC_VISS_FCP_NUM_INSTANCES; i++)
            {
                prms->fcp[i].mux_output0 = TIVX_VPAC_VISS_MUX0_NV12_P12;
                prms->fcp[i].mux_output2 = TIVX_VPAC_VISS_MUX2_NV12;
                prms->fcp[i].mux_output4 = TIVX_VPAC_VISS_MUX4_SAT;
    -           prms->fcp[i].ee_mode     = TIVX_VPAC_VISS_EE_MODE_OFF;
    +           prms->fcp[i].ee_mode     = TIVX_VPAC_VISS_EE_MODE_Y8;
                prms->fcp[i].chroma_mode = TIVX_VPAC_VISS_CHROMA_MODE_420;
            }
    
            prms->bypass_glbce = 1U;
            prms->bypass_nsf4 = 0U;
    
            prms->enable_ctx = 0u;
        }
    }

    Now the problem is, Live tuning of Edge Enhancement is not working.

    For nsf4, I will look and get back in this thread

  • Hi Gang Hua,

    This will work on SDK 9.1

    In SDK 9.2, there is no ee_mode mentioned in the file /edgeai-tiovx-modules/src/tiovx_viss_module.c
    But similar variable is mentioned in <$BUILD_DIR>/arago-tmp-default-glibc/work/aarch64-oe-linux/ti-vision-apps/1.0-r0_edgeai_4/repo/imaging/kernels/hwa/host/vx_vpac_viss_host.c

    void tivx_vpac_viss_params_init(tivx_vpac_viss_params_t *prms)
    {
        if (NULL != prms)
        {
    
            uint32_t i;
            memset(prms, 0x0, sizeof(tivx_vpac_viss_params_t));
    
            tivx_vpac_viss1_params_init(prms);
    
            for(i=0; i< TIVX_VPAC_VISS_FCP_NUM_INSTANCES; i++)
            {
                prms->fcp[i].mux_output0 = TIVX_VPAC_VISS_MUX0_NV12_P12;
                prms->fcp[i].mux_output2 = TIVX_VPAC_VISS_MUX2_NV12;
                prms->fcp[i].mux_output4 = TIVX_VPAC_VISS_MUX4_SAT;
    -           prms->fcp[i].ee_mode     = TIVX_VPAC_VISS_EE_MODE_OFF;
    +           prms->fcp[i].ee_mode     = TIVX_VPAC_VISS_EE_MODE_Y8;
                prms->fcp[i].chroma_mode = TIVX_VPAC_VISS_CHROMA_MODE_420;
            }
    
            prms->bypass_glbce = 1U;
            prms->bypass_nsf4 = 0U;
    
            prms->enable_ctx = 0u;
        }
    }

    Now the problem is, Live tuning of Edge Enhancement is not working.

    For nsf4, I will look and get back in this thread

    Note:
    I am using Yocto Build Environment. So I can compile and install ti-vision-apps

  • Hi Sathiya,

    In SDK 9.2, there is no ee_mode mentioned in the file /edgeai-tiovx-modules/src/tiovx_viss_module.c
    But similar variable is mentioned in <$BUILD_DIR>/arago-tmp-default-glibc/work/aarch64-oe-linux/ti-vision-apps/1.0-r0_edgeai_4/repo/imaging/kernels/hwa/host/vx_vpac_viss_host.c

    Thanks for sharing!

     may help to confirm.

  • Hi Sathiya,

    There are two ways in which EE can be enabled. 

    1. Through GStreamer - which I can see you have already done 

    2. The default ee_mode can be modified in /opt/edgeai-gst-plugins/ext/tiovx/gsttiovxisp.c

    static const guint default_ee_mode = TIVX_VPAC_VISS_EE_MODE_OFF;  // change to TIVX_VPAC_VISS_EE_MODE_Y12 or TIVX_VPAC_VISS_EE_MODE_Y8


    Best,

    Chau

  • Hi Chau,

    2. The default ee_mode can be modified in /opt/edgeai-gst-plugins/ext/tiovx/gsttiovxisp.c

    Will the live tuning of EE from DCC tuning tool will work after this change?

  • Hi Sathiya,

    Live tuning for EE is expected to work after it is enabled.

    Best,

    Chau

  • Hi Chau,

    It is not working

  • Hi Sathiya,

    Can you verify a few things for me:

    • Are you running the GStreamer pipeline while using the live tuning feature? Meaning the camera is streaming while sending the DCC binary to the EVM.
    • For EE live tuning, sometimes the tuning parameters are set too small so you won't be able to see the effect on the display. One thing you could try is to max out the gain and the effect should be very obvious in the displayed output.
    • Can you provide the before and after (EE) YUV images?

    Best, 

    Chau