Hi,
Now ,I use a camera with 3840x2160, YUYV 8bit output format.
I wanted to change xavier’s format to YUYV 8bit, my steps:
modify dts :
csi_pixel_bit_depth = "8";
mode_type = "yuv";
pixel_phase = "yuyv";
When calling the “extract_pixel_format()” function, make sure “*format” is assigned a value of “V4L2_PIX_FMT_YUYV”, i.e “*format = V4L2_PIX_FMT_YUYV;”
To ensure V4L2_PIX_FMT_YUYV format, force assignment to “MEDIA_BUS_FMT_YUYV8_2X8” in the v4l2sd_set_fmt() function, as shown in the figure below:
Result:
The image display is abnormal, as shown below:
some log:
The problem:
How do I modify the YUV format correctly so that the camera displays the normal image?
Thanks!
BR.
Change the pixel_phase to UYVY or any others to check.
nvidias:
pixel_phase = "yuyv"
Hi , ShaneCCC
Thanks for your reply!
Let me try some other formats.
I confirm that the format of the camera is YUYV422, and YUV tools is also used to check the format of the raw data after saving.
Thanks!
BR.
Hi ShaneCCC,
I tried UYVY, but the result was the same as YUYV.
I confirm that the output format of this camera is YUYV 422.
When I use 7yuv tool to open the raw data,as following pictures :
normal with YUYV422:
abnormal with
BR.
If RAW image without problem by 7yuv I think it could be the APP problem to show the frame.
Hi ShaneCCC,
Thanks for your reply!
I use command“gst-launch-1.0 v4l2src device=/dev/video4 ! videoconvert ! xvimagesink&” to show the frame, are you meaning there’s something wrong with this command?
Thanks!
BR.
Have a try below commands.
gst-launch-1.0 -v v4l2src device=/dev/video4 ! 'video/x-raw, width=3840, height=2160, format=YUYV' ! xvimagesink sync=false
gst-launch-1.0 nvv4l2camerasrc device= /dev/video4 ! 'video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=YUYV' ! nvvidconv ! xvimagesink sync=false
Hi , ShaneCCC
Thanks for your reply!
I failed when I tried the above command,as following picture:
Thanks!
BR.
How about below command.
gst-launch-1.0 -v v4l2src device=/dev/video4 ! 'video/x-raw, width=3840, height=2160, format=YUYV' ! nvvidconv ! xvimagesink sync=false
Hi ShaneCCC
Thanks very much for your reply!
The command above does not work either, as shown in the figure below:
Thanks!
BR.
Have reference to below topic to adjust the command line to try.
Hi NV_Team,
I have an V4L2 camera (YUV 4:2:2) → YUYV.
If I use this command to open this camera to preview (display green screen not correct color)
nvidia@xavier:~$ gst-launch-1.0 -ev v4l2src device=/dev/video0 ! 'video/x-raw,format=YUY2,width=1280,height=720' ! videoconvert ! fpsdisplaysink video-sink=xvimagesink sync=false
if change to this command is display color correct.
nvidia@xavier:~$ gst-launch-1.0 -ev v4l2src device=/dev/video0 ! rawvideoparse format=5 width=1280 height=720 ! vide…
Hi,
Mai I ask which camera do you use for this?
I am using a camera with 1920x1080, YUV422 8bit output but I am struggling now.
Need some help…
Thanks,
system
Closed
June 2, 2022, 1:54am
15
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.