OV5647 raw camera : lower half image is black (blanking ?)

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

OV5647 raw camera : lower half image is black (blanking ?)

3,821 Views
hiectai
Contributor III

Hello community
I am trying ov5647_mipi.c default drivers for raw8 camera sensor using for board imx8m mini EVK.
I received the image with the gst command but the lower half of the image is black (blanking ?) as shown. After checking I noticed hardware no problem. I think the problem is driver or gst command.
my gst command:   " gst-launch-1.0 -v v4l2src device=/dev/video0 num-buffers=1 ! "video/x-bayer, format=bggr, width=1920, height=1080" ! multifilesink location=test_1920x1080.bayer "
How do i resolve this?
Thank yougc2053_FULLHD.png

Tags (2)
7 Replies

3,096 Views
hiectai
Contributor III

Update :
I found the gst command in use with a buffer overflow.
gstv4l2bufferpool.c:794:gst_v4l2_buffer_pool_start:<v4l2src0:pool:src> Uncertain or not enough buffers, enabling copy threshold
Anyone know the commands use get raw picture for imx8mm?

0 Kudos

3,096 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi

1.I have to emphasize again that I.MX8M MINI does not support ISP. You can capture RAW DATA in GENERAL mode, but capture driver does not process RAW data.
2.The data format of ov5647 output is RAW data.
3.If you have to use OV5647, then you need to use software to implement ISP functions.
4.Based on the above, it is difficult to judge why your image is only half displayed.

[Comment] See the link, please!
https://community.nxp.com/thread/441556

Have a nice day!

BR,

Weidong

3,096 Views
hiectai
Contributor III

HiWigros Sun

Sorry for the wrong question. This is my first time working with a raw camera.
In my project, I want to receive raw data in the GENERAL mode as you said, just capture raw data, not process.
In the link you attach, talked about using IPU_PIX_FMT_GENERIC. I think what I need to do is change the pixelformat to IPU_PIX_FMT_GENERIC to use GENERAL mode, but I can't find information about how to capture raw data. Could you tell me how to capture it?
Thank you

0 Kudos

3,098 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi,タイ チャン

I checked in ov5647_mipi.c, it's data format is RAW8. see below, please!

------------

    ov5647_data.pix.pixelformat = V4L2_PIX_FMT_SBGGR8;

------------

 

In capture driver mx6s_capture.c, RAW8 data can be captured. see below, please! But the data with RAW8 is not handled. so your image was not normally displayed.

static int mx6s_configure_csi(struct mx6s_csi_dev *csi_dev)

{

....

    if (csi_dev->csi_mipi_mode == true) {
        cr1 = csi_read(csi_dev, CSI_CSICR1);
        cr1 &= ~BIT_GCLK_MODE;
        csi_write(csi_dev, cr1, CSI_CSICR1);

        cr18 = csi_read(csi_dev, CSI_CSICR18);
        cr18 &= ~BIT_MIPI_DATA_FORMAT_MASK;
        cr18 |= BIT_DATA_FROM_MIPI;

        switch (csi_dev->fmt->pixelformat) {
        case V4L2_PIX_FMT_UYVY:
        case V4L2_PIX_FMT_YUYV:
            cr18 |= BIT_MIPI_DATA_FORMAT_YUV422_8B;
            break;
        case V4L2_PIX_FMT_SBGGR8:
            cr18 |= BIT_MIPI_DATA_FORMAT_RAW8;

            break;
        default:
            pr_debug("   fmt not supported\n");
            return -EINVAL;
        }

      csi_write(csi_dev, cr18, CSI_CSICR18);

....

}

Hope above information can help you!

Have a nice day!

BR,

Weidong

3,098 Views
devendradevadig
Contributor III

Dear Wigros Sun,

Did you got the proper "gst-launch" command to process RAW data captured ?

Or did you used the any software?

Is the issue solved? Currently I am working on ov4689 camera IC and its also only supports output format 10-bit RAW RGB (MIPI). And as Weidong told this RAW data from camera can't be handled directly by i.MX8

https://community.nxp.com/thread/534571 

Please can you suggest me what method you followed to solve this issue?

Thanks and Regards,

Devendra

0 Kudos

3,098 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi,

    There is no ISP module in i.MX8M Mini, Which means RAW data from camera can't be handled directly by i.MX8. We provide a software ISP for customer's application here:

SoftISP Application | NXP 

Try it, please!

Have a nice day!

BR,

Weidong

3,098 Views
hiectai
Contributor III

Hi Wigros Sun
Thank you for respond
I think softISP is application to convert bayer.data file to .JPG file. While my problem is how to get the full image from the sensor without losing the lower part?
Has anyone succeeded in get raw camera images for imx8m Mini?

0 Kudos