How to change resolution of camera(ov5640)?

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

How to change resolution of camera(ov5640)?

4,497 Views
hanseunglee
Contributor III


Hello .

My configure below.

kernel 3.0.35

os ubuntu 12.04

board i.mx6dl sabresd

I use ov5640 camera.

This camera set resolution are

ov5640_mode_VGA_640_480 = 0,
ov5640_mode_QVGA_320_240 = 1,
ov5640_mode_NTSC_720_480 = 2,
ov5640_mode_PAL_720_576 = 3,
ov5640_mode_720P_1280_720 = 4,
ov5640_mode_1080P_1920_1080 = 5,
ov5640_mode_QSXGA_2592_1944 = 6,
ov5640_mode_QCIF_176_144 = 7,
ov5640_mode_XGA_1024_768 = 8,

.

If when i want to using ov5640 device driver, how to change resolution ?

Do you have a manual or solution?

I think , i need to change sensor clock and device driver code...

what files modify for change clock and resolution?

Labels (5)
0 Kudos
4 Replies

2,593 Views
ramyaravichandr
Contributor I

Hi Hanseung,

V4L2 drivers do provide API for the same.

Also, if you have access to the driver,you can do it.

Thanks,

Ramya

www.blackpeppertech.com

0 Kudos

2,593 Views
jimmychan
NXP TechSupport
NXP TechSupport

You can use gstreamer to test your camera, here is the example:

gst-launch mfw_v4lsrc capture-mode=8 device=/dev/video1 fps-n=30 !mfw_v4lsink

-- you can change the capture-mode to test different resolution and change the fps-n for different frame rate.

0 Kudos

2,593 Views
hanseunglee
Contributor III

Hi! jummychan.

IMX6SDLRM document is explain below.

For parallel interface, the maximum speed of the interface is 240Mhz. The required

operating frequency of the interface is calculated in the following way:

F = FH * FW * FPS * BI * DF

Where

• FH = frame height (in pixels)

• FW = Frame width (in pixels)

• fps = frame rate (frames per second)

• BI = typically 35% overhead, should be assumed as 1.35. The actual blanking

intervals are a parameter of the attached device.

• DF = data format, defines the number of cycles needed to send a single pixel.

The number of cycles needed to send a single pixel depends on the interface and the data

format.

Data format examples:

• YUV422 over 16 bit = 1 cycles/pixel

• RGB888 over 8 bit = 3 cycles/pixel

• RGB565 over 16 bit = 1 cycles/pixel

• Bayer/Generic data = 1 cycle/pixel

• YUV422 over 8 bit = 2 cycles/pixel

• BT.656, YUV422 format = 2 cycles/pixel

• BT.1120, YUV422 format = 1 cycle/pixel

Examples of supported interfaces:

• 3.2MP camera, 15fps, yuv422 format, 8 bit interface

• 1080P30, yuv422, 8 bit interface

So, Can i change clock for resolution. How to change clock in linux ov5640 source(ov5640.c or mxc_v4l2_capture.c..etc..)?

0 Kudos

2,593 Views
jimmychan
NXP TechSupport
NXP TechSupport

The answer is no.

0 Kudos