Camera of 960x480i do not work

gst-launch-1.0 nvv4l2camerasrc device=/dev/video0 num-buffers=100 ! ‘video/x-raw(memory:NVMM), format=(string)UYVY, width=(int)960, height=(int)480, interlace-mode=interlaced’ ! nvvidconv ! xvimagesink -e

Not used NVDIA ISP,so I use to nvv4l2camerasrc,and Is there any other way?Thanks

I try TX2-NX,But the image is only half. Is there a way to come out the other part?
Full picture is haikang platform,no NVIDIA platform.
Onlu half picture is TX2-NX.


This picture is noise,Is there a way to remove,Thanks

Hi,
If your source is interalaced, you would need to use software plugin v4l2src, deinterlace to construct pipeline like:

v4l2src ! deinterlace ! videoconvert ! xvimagesink

The nvv4l2camerasrc does not support full de-interlacing path.

For better performance, we suggest use progressive source.

gst-launch-1.0 v4l2src device=/dev/video0 ! “video/x-raw,format=UYVY,width=960,height=288,framerate=25/1” ! deinterlace ! nvvidconv ! “video/x-raw(memory:NVMM),format=NV12,width=720,height=288” ! nvoverlaysink sync=false

Use to this gst-launch-1.0 v4l2src,but the image is only half.

$ v4l2-ctl --all
Driver Info (not using libv4l2):
Driver name : tegra-video
Card type : vi-output, nvp6188 2-0030
Bus info : platform:15700000.vi:4
Driver version: 4.9.201
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (Camera 4: no power)
Format Video Capture:
Width/Height : 960/288
Pixel Format : ‘UYVY’
Field : None
Bytes per Line : 2048
Size Image : 1179648
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Limited Range)
Flags :

Camera Controls

                 hdr_enable 0x009a2004 (intmenu): min=0 max=1 default=0 value=0
                bypass_mode 0x009a2064 (intmenu): min=0 max=1 default=0 value=0
            override_enable 0x009a2065 (intmenu): min=0 max=1 default=0 value=0
               height_align 0x009a2066 (int)    : min=1 max=16 step=1 default=1 value=1
                 size_align 0x009a2067 (intmenu): min=0 max=2 default=0 value=0
           write_isp_format 0x009a2068 (int)    : min=1 max=1 step=1 default=1 value=1
   sensor_signal_properties 0x009a2069 (u32)    : min=0 max=0 step=0 default=0 flags=read-only, has-payload
    sensor_image_properties 0x009a206a (u32)    : min=0 max=0 step=0 default=0 flags=read-only, has-payload
  sensor_control_properties 0x009a206b (u32)    : min=0 max=0 step=0 default=0 flags=read-only, has-payload
          sensor_dv_timings 0x009a206c (u32)    : min=0 max=0 step=0 default=0 flags=read-only, has-payload
           low_latency_mode 0x009a206d (bool)   : default=0 value=0
           preferred_stride 0x009a206e (int)    : min=0 max=65535 step=1 default=0 value=0
               sensor_modes 0x009a2082 (int)    : min=0 max=30 step=1 default=30 value=1 flags=read-only

Width/Height: 960/288 ,
Height is 288, but drvier code of sizeimage2, I feel that sizeimage2 Invalid.

drivers/media/platform/tegra/camera/vi/channel.c:
239 static void tegra_channel_update_format(struct tegra_channel chan,
… …
273 /
Double the size of allocated buffer for interlaced sensor modes */
274 if (chan->is_interlaced)
275 chan->format.sizeimage *= 2;

Hi,
Please check v4l2src

Probably you need to set caps to

video/x-raw(format:Interlaced):
         format: { RGB16, BGR, RGB, ABGR, xBGR, RGBA, RGBx, GRAY8, GRAY16_LE, GRAY16_BE, YVU9, YV12, YUY2, YVYU, UYVY, Y42B, Y41B, YUV9, NV12_64Z32, NV24, NV61, NV16, NV21, NV12, I420, ARGB, xRGB, BGRA, BGRx, BGR15, RGB15 }
          width: [ 1, 32768 ]
         height: [ 1, 32768 ]
      framerate: [ 0/1, 2147483647/1 ]
 interlace-mode: alternate

Hi DaneLLL,

I gst-inspect-1.0 v4l2src do not Interlaced on TX2-NX platform(JETSON OS 4.5.1) .

$ gst-inspect-1.0 v4l2src
Factory Details:
Rank primary (256)
Long-name Video (video4linux2) Source
Klass Source/Video
Description Reads frames from a Video4Linux2 device
Author Edgard Lima edgard.lima@gmail.com, Stefan Kost ensonic@users.sf.net

Plugin Details:
Name video4linux2
Description elements for Video 4 Linux
Filename /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstvideo4linux2.so
Version 1.14.5
License LGPL
Source module gst-plugins-good
Source release date 2019-05-29
Binary package GStreamer Good Plugins (Ubuntu)
Origin URL https://launchpad.net/distros/ubuntu/+source/gst-plugins-good1.0

video/x-raw
format: { (string)RGB16, (string)BGR, (string)RGB, (string)GRAY8, (string)GRAY16_LE, (string)GRAY16_BE, (string)YVU9, (string)YV12, (string)YUY2, (string)YVYU, (string)UYVY, (string)Y42B, (string)Y41B, (string)YUV9, (string)NV12_64Z32, (string)NV24, (string)NV61, (string)NV16, (string)NV21, (string)NV12, (string)I420, (string)BGRA, (string)BGRx, (string)ARGB, (string)xRGB, (string)BGR15, (string)RGB15 }
width: [ 1, 32768 ]
height: [ 1, 32768 ]
framerate: [ 0/1, 2147483647/1 ]
video/x-sonix
width: [ 1, 32768 ]
height: [ 1, 32768 ]
framerate: [ 0/1, 2147483647/1 ]
video/x-vp8
video/x-vp9
video/x-wmv
wmvversion: 3
format: WVC1

Hi,
The webpage seems out of date. Should be this one:
v4l2src: GStreamer Good Plugins 1.0 Plugins Reference Manual

And please try the pipeline in
Linux/AM5728: gstreamer video deinterlacing - Processors forum - Processors - TI E2E support forums

gst-launch-1.0 -v v4l2src device=/dev/video1 ! video/x-raw,format=UYVY,width=720,height=576,framerate=25/1 ! filesink location=new.yuv
gst-launch-1.0 filesrc location=new.yuv ! videoparse width=720 height=576 format=uyvy ! videoconvert ! autovideosink

Please modify width,height,framerate,format to fit your source. And see if you can see frame data like:
https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/354/Screenshot-from-2017_2D00_06_2D00_21-18_2D00_05_2D00_16.png

Another possible solution is to use jetson_multimedia_api. You can capture frame data into CUDA buffer and implement de-interlacing function through CUDA, to use GPU.

Thanks for your reply

this link is both pipelines。
https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/354/Screenshot-from-2017_2D00_06_2D00_21-18_2D00_05_2D00_16.png

But the image is only half on TX2-NX platform.only_half picture lost the tree

Project time is urgent, thank you!

Hi,
Your driver looks not ready. You would need to capture 960x240 top-field and 960x240 bottom-field data first. Please check if you can run a v4l2-ctl command to capture complete frames first.

And we rarely see interlaced camera input, please consider progressive mode.

1 Like

I donot capture bottom-field data now,I feel lost bottom-field data.

What’s the interlae_type configure in you dts?

The picture is normal now.The camera is rear-outside of Progressive data,but I modify to configure of interlaced.Thanks

This picture is noise,Is there a way to remove,Thanks

Maybe you can try software noise reduction.

Software noise reduction,but consume resources.Is there a way to noise reduction ? Thnaks

There’s no NR feature for VI capture. The noise should be original in the output source. VI capture would do any process like ISP do only capture the MIPI data to memory.

1 Like

Ok,Thanks