mxc_v4l2_overlay shows green pixels and light becomes pink

cancel
Showing results for 
Search instead for 
Did you mean: 

mxc_v4l2_overlay shows green pixels and light becomes pink

1,049 Views
motting
Contributor I

I have a working MIPI camera which capture 4208x3120 / 2104x1560 image.

I want to make a live-time preview on screen through HDMI.

The kernel I am using is 3.0.53, and the board is sabrelite from Boundary Device.

I can show a live-time preview on top of qt using mxc_v4l2_overlay.out -m 2 -iw 2104 -ih 1560 -ow 160 -oh 160 -ot 20 -ol 20 -r 0 -t 10 -d 0 -fg -fr 30.

It changes when I move objects in front of the camera so the preview is at least coming from the camera.

However, the content of preview it shows is not quite correct.

First, the video is split into four.

Each quadrant is very similiar to each other but the light intensity seems different.

Second, all the pixels are green for every object, and the lights become pink.

Third, the whole image is sliding down slowly.

I thought this was caused by mismatch of width so I tried the output size to be 1/4 of input size.

Unfortunately the result image is just the same in a smaller window.

I am thinking if this is because the data format obtained from sensor is different from the data format of framebuffer.

The data format obtained from sensor should be RGGB 10Bit and no image conversion (IC) is done. i.e. CSI -> IPU

Can anyone tell me whether I am on the right track?

Or is it even possible to show a preview of MIPI camera on screen?

Labels (3)
0 Kudos
4 Replies

162 Views
arindamroy
Contributor II

Hi Motti,

Could you resolve the green and pink color issue ?

Could you share the reason ?

0 Kudos

162 Views
jimmychan
NXP TechSupport
NXP TechSupport

please refer to this : Sample code for iMX6 SabreSD to use MIPI CSI camera with virtual channel 3

The patch should fix the "the video is split into four" issue.

For the green and pink issue, it should be the problem of camera registers setting in the driver.

Which camera are you using?

0 Kudos

162 Views
motting
Contributor I

I have originally applied the patch mentioned in Sample code for iMX6 SabreSD to use MIPI CSI camera with virtual channel 3

I am using a custom MIPI camera made by Sony.

For the green and pink issue, I can use the same mode (same register settings) to capture photo.

The photo I captured has clear view which is much different from this preview.

I guess this is not register setting issue.

0 Kudos

162 Views
jimmychan
NXP TechSupport
NXP TechSupport

For the issue 1, I met the same issue before when I porting OV5640 MIPI camera. I manually apply the patch to fix the ID to 0 (MIPI ID and SMFC setting in ipu_capture.c), then the issue resolved. So, please double check the vchannel number and csi number are correct and properly pass to the camera driver.

For the color issue, please check which pixel format you used in the mxc_v4l2_capture.c. As you said the capture output from mxc_v4l2_capture.out is good, please try to use the same pixel format in the mxc_v4l2_overlay.c.

0 Kudos