We are working on the AGX Xavier platform.
When we light up the camera sensor, we find that the original data has a reverse color difference.
The raw data of our camera is yuyv422.Our code modify as below:
I use the command of “v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=YUYV --stream-mmap --stream-count=1 -d /dev/video4 --stream-to=ov5693.raw” to get the image data.
1 ) Does it get the raw data ?
2) Does this command( v4l2-ctl ) do data format conversion or not ?
OK, Let make the problem clear.
Do you set the YUYV by the v4l2-ctl command line but didn’t modify the sensor REG to output YUYV data format? If yes that could be the problem. You need to configure the sensor REG to output pixel format match the dt setting instead of use the command to configure it.
First, Our image sensor supplier said that the default output of the original data format is yuyv. Secondly, I modified the data image format to yuyv in dtsi file to match the image sensor consistency.Then,I use the above command to get a frame of image data. So I use yuv tool to preview the photo.:
When I set the data format of yuyv to preview the image data, it does not display properly
When I set the data format of uyvy to preview the image data, it displays normally
But the original image data is yuyv, and I have set it to yuyv. I don’t know why it doesn’t work ?
I asked the supplier to change the sensor register to uyvy. No matter whether my device tree is changed to uyvy or yuyv, it will display normally.,I have a little confused.