10-Bit Bayer Capture

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

10-Bit Bayer Capture

4,223 Views
erezsteinberg
Contributor IV

Hello experts,

I have an iMX6 running Linux 3.14.28, connected to a MIPI camera.

After modifying the kernel, I am able to capture RAW 8-bit Bayer from the MIPI input.

However, I am not able to capture 10-bit successfully.

I am using IPU_PIX_FMT_GENERIC_16, but suspect additional changes are needed.

Can someone provide guideline what else needs to be modified?

Sincerely,

Erez

Labels (2)
0 Kudos
7 Replies

3,129 Views
chrisroed
Contributor IV

I have a similar problem... I have an OV5648 MIPI CSI camera.  I've read on some other forums that no one has gotten the 10 bit bayer to work properly.

How is your image quality?  All I can seem to get out of mine is something like this.  I'm outputting data from the cam at 1280x720 and this frame is 1280x720 but you can obviously see I have some issues.

capture1.jpeg

What sort of kernel modifications have you made?

I suspect, but cannot confirm that you need to make some changes to how the IPU sets up the channel buffer in the CPMEM (the offset and width parameters, specifically)  See chapter 38.4.2.3 and 38.4.2.10 in the RM.  I would definitely appreciate any input you have to solve my camera issue.

Another note:  Depending on your camera, the extra 2 bits of those 10 bits might just be noise, and won't offer you a better image.

3,124 Views
wanbenzhou
Contributor II

I have the similar problem with mipi-csi。  sensor output iv 10 RAW RGB。

Could you tell me the way to fix it?

0 Kudos

3,116 Views
chrisroed
Contributor IV

The IPU can't do color conversion on bayer images.  The best you'll get with the IPU is grayscale.  I was able to hack the gstreamer and kernel code enough to use the gstreamer bayer software converter, but I got maybe 3 FPS.  One of my colleagues was exploring using the vivante GPU and the results were looking promising but we switched to an OV5645, which can ouput YUV422.  The IPU documentation was super confusing, but YUV422 is the color format that it really seems to like for camera inputs.

Good luck

 

0 Kudos

3,129 Views
erezsteinberg
Contributor IV

Hi Chris -

For RAW8, the modifications were pretty straightforward, and are outlined in other post you can easily find on the community.

Your sensor is 5MP, so make sure your downscaling correctly and using raw-8 mode.

Good luck..

0 Kudos

3,129 Views
chrisroed
Contributor IV

Erez,

What capture client did you use to capture the video?

0 Kudos

3,129 Views
erezsteinberg
Contributor IV

Hi Chris,

Sorry for slow reply.  Yes, I get a proper Bayer Image.

The capture client is something I wrote. It's based on the v4l2 example:

http://linuxtv.org/downloads/v4l-dvb-apis/capture-example.html

0 Kudos

3,129 Views
chrisroed
Contributor IV

Erez,

With your sensor in the RAW8 mode were you at least able to get a "real" picture.. aka no color and grid issues like mine?

0 Kudos