Skip to content

tiovxldc

Marco Herrera edited this page Feb 3, 2022 · 5 revisions

TIOVX LDC

tiovxldc Lens Distortion Correction using the TIOVX Modules API

Hierarchy

 +----GInitiallyUnowned
       +----GstObject
             +----GstElement
                   +----GstTIOVXSimo
                         +----GstTIOVXLDC

Pad templates

src_%u

Capabilities:

      video/x-raw
                 format: { (string)GRAY8, (string)GRAY16_LE, (string)NV12, (string)UYVY }
                  width: [ 1, 8192 ]
                 height: [ 1, 8192 ]
      video/x-raw(memory:batched)
                 format: { (string)GRAY8, (string)GRAY16_LE, (string)NV12, (string)UYVY }
                  width: [ 1, 8192 ]
                 height: [ 1, 8192 ]
           num-channels: [ 1, 16 ]

Availability – On request

Direction – src

Object type – GstTIOVXPad

Pad Properties

pool-size : Size of the buffer pool
            flags: readable, writable
            Unsigned Integer. Range: 2 - 16 Default: 2 

sink

Capabilities:

      video/x-raw
                 format: { (string)GRAY8, (string)GRAY16_LE, (string)NV12, (string)UYVY }
                  width: [ 1, 8192 ]
                 height: [ 1, 8192 ]
      video/x-raw(memory:batched)
                 format: { (string)GRAY8, (string)GRAY16_LE, (string)NV12, (string)UYVY }
                  width: [ 1, 8192 ]
                 height: [ 1, 8192 ]
           num-channels: [ 1, 16 ]

Availability – Always

Direction – sink

Object type – GstTIOVXPad

Pad Properties

pool-size : Size of the buffer pool
            flags: readable, writable
            Unsigned Integer. Range: 2 - 16 Default: 2 

Properties

dcc-file

TIOVX DCC configuration binary file to be used by this element

Flags : Read / Write / Changeable only in NULL or READY state

String. Default value : NULL

name

The name of the object.

Flags : Read / Write

String. Default value : "tiovxldc0"

parent

The parent of the object

Flags : Read / Write

GstObject. Default value : N/A

sensor-name

TIOVX camera sensor name.

Flags : Read / Write / Changeable only in NULL or READY state

String. Default value : NULL

target

TIOVX target to use by this element.

Flags : Read / Write / Controllable

Enum "GstTIOVXLDCTarget". Default value : 0 ("VPAC_LDC1")

(0): VPAC_LDC1 - VPAC_LDC1

Pipeline examples

Single output

DCC_FILE="/opt/imaging/imx390/dcc_ldc_wdr.bin"
INPUT_FILE="/opt/edgeai-tiovx-modules/data/input/imx390_fisheye_1936x1096_nv12.yuv"
WIDTH=1936
HEIGHT=1096
OUTPUT_WIDTH=1980
OUTPUT_HEIGHT=1080
FORMAT="NV12"
FORMAT_LOWERCASE="nv12"
OUTPUT_FILE="output.raw"
SENSOR="SENSOR_SONY_IMX390_UB953_D3"
IN_POOL_SIZE=4
OUT_POOL_SIZE=4

gst-launch-1.0 -e filesrc location=${INPUT_FILE} !                                                                \
videoparse format=${FORMAT_LOWERCASE} width=${WIDTH} height=${HEIGHT} !                                           \
tiovxldc dcc-file=${DCC_FILE} sensor-name=${SENSOR} in-pool-size=${IN_POOL_SIZE} out-pool-size=${OUT_POOL_SIZE} ! \
video/x-raw,width=${OUTPUT_WIDTH},height=${OUTPUT_HEIGHT} !                                                       \
filesink location=${OUTPUT_FILE}

Batched processing

gst-launch-1.0                                                                                                      \
videotestsrc is-live=true num-buffers=10 pattern=0 ! "video/x-raw, width=1920, height=1080, format=NV12"  ! mux.    \
videotestsrc is-live=true num-buffers=10 pattern=ball ! "video/x-raw, width=1920, height=1080, format=NV12"  ! mux. \
tiovxmux name=mux ! "video/x-raw(memory:batched), width=1920, height=1080, format=NV12" !                           \
tiovxldc dcc-file=/opt/imaging/imx390/dcc_ldc_wdr.bin sensor-name=SENSOR_SONY_IMX390_UB953_D3 !                     \
tiovxdemux name=demux                                                                                               \
demux. ! queue ! multifilesink location=/tmp/image_a_%02d.nv12                                                      \
demux. ! queue ! multifilesink location=/tmp/image_b_%02d.nv12
Clone this wiki locally