Capture 1280x720 using OV5642 module

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

Capture 1280x720 using OV5642 module

2,740 Views
dhavalvadhar
Contributor IV

Hi,

I am using i.MX6 based hardware with which OV5642 module is connected. I am trying to write a application which captures various resolutions of raw video.

Using this application I am able to capture 640x480 and 720x480 raw video. But when I try to capture 1280x720 video it gives me following errors:

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

imx-ipuv3 2400000.ipu: IC output size(1080) cannot exceed 1024

imx-ipuv3 2400000.ipu: failed to calculate prpenc height scaling coefficients

imx-ipuv3 2400000.ipu: IPU Warning - IPU_INT_STAT_5 = 0x00100000

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

Still it continues to capture the frames and dumps it to the file. But when I am playing back that file there was nothing.

Can someone please help me on this?

It would be great if someone can share some sample application for the same.

Thanks,

Dhaval

Labels (1)
0 Kudos
5 Replies

1,104 Views
igorpadykov
NXP Employee
NXP Employee

HI Dhaval

for 720P one needs to set  capture-mode=4 (one can check with

gst-inspect mfw_v4lsrc), examples can be found on

ov5642 1080p 30 fps and sabre light

Linux Software User Manual (i.MX6) - BlueWiki

error: "IC output size(1080) cannot exceed 1024" means that IPU IC submodule

(used for rotation or resizing) output size is restricted to 1024 max.

So one needs to split image on smaller areas and process (for example rotate)

them, after that combine to whole image.

Best regards

igor

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

Note: If this post answers your question, please click the Correct Answer button. Thank you!

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

0 Kudos

1,104 Views
dhavalvadhar
Contributor IV

Hi Igor,

Thanks for your quick reply!

As you suggested, I configured the Capture Mode = 4 following way :

  // Set capture stream parameters

  struct v4l2_streamparm streamParams;

  streamParams.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;

  streamParams.parm.capture.capturemode = 4;

  streamParams.parm.capture.timeperframe.denominator = 30;

  streamParams.parm.capture.timeperframe.numerator = 1;

  if (0 > ioctl(deviceFd, VIDIOC_S_PARM, &streamParams)) {

  printf("ERROR: Failed to set video stream parameters\n");

  return -1;

  }

But still the captured raw data is not correct. I have attached the snapshot of the same. Also, I didn't find any sample code of video capture on the links you have mentioned.

How the IPU IC Submodule activated, automatically? I haven't done that.

Thanks,

Dhaval

Incorrect-video-capture-1280x720.png

0 Kudos

1,104 Views
aravinthkumarja
Senior Contributor II

Have you solved this issue.?

Regards,

Aravinth

0 Kudos

1,104 Views
chrisroed
Contributor IV

Hi Dhaval,

Did you ever solve this issue?

0 Kudos

1,104 Views
igorpadykov
NXP Employee
NXP Employee

HI Dhaval

one can look at below links where similar problem was discussed

https://community.freescale.com/message/361253#361253

https://community.freescale.com/message/373795#373795

Best regards

igor

0 Kudos