cancel
Showing results for 
Search instead for 
Did you mean: 

VD66GY incorrect coloring

sebotics
Associate

Hi, I am using the VD66GY image sensor on the STEVAL-56G3MAI board. It is connected to an Allwinner S3 with an ISP. 


This is my v4l2 pipeline:

media-ctl --set-v4l2 '"vd56g3 0-0010":0[fmt:SGRBG10_1X10/1120x1360]'
media-ctl --set-v4l2 '"sun6i-mipi-csi2":0[fmt:SGRBG10_1X10/1120x1360]'
media-ctl --set-v4l2 '"sun6i-csi-bridge":0[fmt:SGRBG10_1X10/1120x1360]'
media-ctl --set-v4l2 '"sun6i-isp-proc":0[fmt:SGRBG10_1X10/1120x1360]'

v4l2-ctl -d /dev/video1 --set-fmt-video=width=1120,height=1360,pixelformat=NV12
v4l2-ctl -d /dev/v4l-subdev3 -c vertical_blanking=2977 # set 30 Hz update rate

 
The image I receive is too green. When I use the colorbar test pattern (v4l2-ctl -d /dev/v4l-subdev3 -c test_pattern=2) I see all colors correctly indicating that the issue is not originating from the ISP. 

When I set horizontal or vertical flip, the image changes to pink, if both are active it is too green again. 

When I change the format to 480x640, which uses binning, the image is pink. When I use test_pattern=2, I do not see the colorbar correctly anymore. It has green and pink colors. 

 I cannot change SGRBG10_1x10 as I only have this format available:

# v4l2-ctl -d /dev/v4l-subdev3 --list-subdev-mbus-codes
ioctl: VIDIOC_SUBDEV_ENUM_MBUS_CODE (pad=0)
        0x3002: MEDIA_BUS_FMT_SGRBG8_1X8
        0x300a: MEDIA_BUS_FMT_SGRBG10_1X10

I see that the driver vd56g3 itself has other options, which are not available.

I also saw that you have set the orientation = <2>; and rotation = <0>; and raspberry device tree. With a more modern kernel version, the rotation is not used in the driver and the orientation has no effect. I am using linux kernel 6.4.7 and included the most recent driver vd56g3. 

Could you assist me with my problem? 
I have attached a green image. 

Thank you already! 
Sebastian 

 

2 REPLIES 2
sebotics
Associate

One small correction, I also see the colorbar from test_patter=2 correctly with the smaller pixelformat. 

CyrilTechPro
ST Employee

Hello sebotics, 

i see you have set pixel format who not correspond to the media bus of the sensor , 

could you try with the pixel format SRGGB10P. 

Regarding orientation and rotation is use internally in the driver to change the first pixel and sent to the framework to be use . 

something is strange is about the color bar pattern seems normal on your side could you share a picture? 

 

Bye 

 

Cyril Liotard