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.

SK-AM62A-LP: ISP can't handled ROI image

Part Number: SK-AM62A-LP

Tool/software:

Hello Team,

We are using AM62A34 and sensor, In, that we are validating ROI of image. As, sensor driver has support to set ROI and based on ROI value sensor will provide image. That, data we are trying to processed in ISP.

We have ISP tunning file(dcc_viss.bin and dcc_2a.bin) only with resolutions(1080x1200). In that, as per our requirenment we need to handle any ROI resolutions of below 1080x1200 with same tunning file.

But ISP can't handle this.

so, does tunning file dependant with resolutions ?
We want to support any roi image with same tunning file. so, is there way to ISP handle it ? As, we have test some scenarios but ISP can't handle it with below resolutions than tunning file.

Set ROI value in driver
 using v4l2-ctrl 
Resolution in
gstreamer pipeline
Tunning file Status
1920x1200 1920x1200 1920x1200 Working 
1920x1200 1920x1200 960x600 Working
960x600 960x600 960x600 Working 
960x600 960x600 1920x1200 Not Working


Thanks,
Jaimin

  • Hello Jaimin,

    You can use the multiscaler to downscale or crop the output of viss to the desired resolution and ROI.

    root@am62axx-evm:~# gst-inspect-1.0 tiovxmultiscaler
    
        Pad Properties:
          pool-size           : Size of the buffer pool
                                flags: readable, writable
                                Unsigned Integer. Range: 2 - 16 Default: 2
          roi-height          : Height of the cropped region of interest
                                flags: readable, writable
                                Unsigned Integer. Range: 0 - 4294967295 Default: 0
          roi-startx          : Starting X coordinate of the cropped region of interest
                                flags: readable, writable
                                Unsigned Integer. Range: 0 - 4294967295 Default: 0
          roi-starty          : Starting Y coordinate of the cropped region of interest
                                flags: readable, writable
                                Unsigned Integer. Range: 0 - 4294967295 Default: 0
          roi-width           : Width of the cropped region of interest
                                flags: readable, writable
                                Unsigned Integer. Range: 0 - 4294967295 Default: 0
    

    Please refer to an example here: software-dl.ti.com/.../edgeai_dataflows.html

    Regards,

    Jianzhong

  • Thanks Jianzhong,

    I am successfully able to run below pipeline with tiovxmultiscaler.

    gst-launch-1.0 -v v4l2src device=/dev/video-rpi-cam0 io-mode=dmabuf-import ! video/x-bayer, width=1920, height=1200, framerate=60/1, format=rggb10 ! tiovxisp sink_0::device=/dev/v4l-rpi-subdev0 sensor-name="SENSOR_SONY_IMX219_RPI" dcc-isp-file=/opt/imaging/ar0235/dcc_viss.bin sink_0::dcc-2a-file=/opt/imaging/ar0235/dcc_2a.bin format-msb=9 ! video/x-raw, format=NV12, width=1920, height=1200, framerate=60/1 ! tiovxmultiscaler name=multi src_0::roi-startx=480 src_0::roi-starty=300
    src_0::roi-width=960 src_0::roi-height=600 multi. ! video/x-raw,format=NV12,width=960,height=600 ! v4l2jpegenc ! tcpserversink host=172.25.4.208 port=5000


    But, if I am trying with random ROI value in that case v4l2jpegenc failed. so, is there any limitation of resolution with v4l2jpegenc.

    I am trying with this 920x800 in that getting below error:

    ERROR: from element /GstPipeline:pipeline0/v4l2jpegenc:v4l2jpegenc0: Device '/dev/video2' cannot capture at 920x800
    Additional debug info:
    ../gst-plugins-good-1.20.7/sys/v4l2/gstv4l2object.c(4206): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline0/v4l2jpegenc:v4l2jpegenc0:
    Tried to capture at 920x800, but device returned size 896x800

    Pipeline:

    gst-launch-1.0 -v v4l2src device=/dev/video-rpi-cam0 io-mode=dmabuf-import ! video/x-bayer, width=1920, h
    eight=1200, framerate=60/1, format=rggb10 ! tiovxisp sink_0::device=/dev/v4l-rpi-subdev0 sensor-name="SENSOR_SONY_IMX219_RPI" dcc-isp
    -file=/opt/imaging/ar0235/dcc_viss.bin sink_0::dcc-2a-file=/opt/imaging/ar0235/dcc_2a.bin format-msb=9 ! video/x-raw, format=NV12, wi
    dth=1920, height=1200, framerate=60/1 ! tiovxmultiscaler name=multi src_0::roi-startx=0 src_0::roi-starty=0 src_0::roi-width=920 src_
    0::roi-height=800 multi. ! video/x-raw,format=NV12,width=920,height=800 ! v4l2jpegenc ! tcpserversink host=172.25.4.208 port=5000


    Error:


    , interlace-mode=(string)progressive, colorimetry=(string)1:4:7:1
    /GstPipeline:pipeline0/GstTCPServerSink:tcpserversink0.GstPad:sink: caps = image/jpeg, width=(int)920, height=(int)800, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)1:4:7:1
    Redistribute latency...
    ERROR: from element /GstPipeline:pipeline0/v4l2jpegenc:v4l2jpegenc0: Device '/dev/video2' cannot capture at 920x800
    Additional debug info:
    ../gst-plugins-good-1.20.7/sys/v4l2/gstv4l2object.c(4206): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline0/v4l2jpegenc:v4l2jpegenc0:
    Tried to capture at 920x800, but device returned size 896x800
    Execution ended after 0:00:00.352520341
    Setting pipeline to NULL ...
    ERROR: from element /GstPipeline:pipeline0/v4l2jpegenc:v4l2jpegenc0: Could not get/set settings from/on resource.
    Additional debug info:
    ../gst-plugins-good-1.20.7/sys/v4l2/gstv4l2object.c(3664): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline0/v4l2jpegenc:v4l2jpegenc0:
    Device is in streaming mode
    Freeing pipeline ...
    18614.370704 s: VX_ZONE_INIT:[tivxHostDeInitLocal:115] De-Initialization Done for HOST !!!
    18614.375291 s: VX_ZONE



    Thanks,
    Jaimin

  • Hello Jaimin,

    Can you please close this thread and open a new one about limitation of resolution with v4l2jpegenc.

    Regards,

    Jianzhong

  • Sure. Thanks Jianzhong.