没有合适的资源?快使用搜索试试~ 我知道了~
OV2640摄像模组软件应用说明
需积分: 5 1 下载量 176 浏览量
2022-05-15
09:18:56
上传
评论
收藏 767KB PDF 举报
温馨提示
试读
42页
OV2640摄像模组软件应用说明
资源推荐
资源详情
资源评论
OV2640 Camera Module Software Application Notes
OV2640 Camera Module
Software Application Notes
Last Modified: Dec 12
th
, 2007
Document Revision: 1.03
OmniVision Technologies, Inc. reserves the right to make changes without further notice to
any product herein to improve reliability, function or design. OmniVision does not assume
any liability arising out of the application or use of any project, circuit described herein;
neither does it convey any license under its patent nor the right of others.
This document contains information of a proprietary nature. None of this information shall be
divulged to persons other than OmniVision Technologies, Inc. employee authorized by the nature of
their duties to receive such information, or individuals or organizations authorized by OmniVision
Technologies, Inc.
1 Company Confidential
OVT Confidential
OV2640 Camera Module Software Application Notes
Table of Contents
OV2640 Camera Module..................................................................................................................... 1
Software Application Notes................................................................................................................. 1
1. How to Select Output format?..................................................................................................... 4
1.1 Back-end with full ISP.......................................................................................................... 4
1.2 Back-end with YCbCr ISP.................................................................................................... 5
1.3 Back-end without ISP........................................................................................................... 5
1.4 Equations to Convert from One Format to Another............................................................. 5
2. How to Select Output Resolution?...............................................................................................6
2.1 back-end with ISP................................................................................................................. 6
2.2 back-end without ISP............................................................................................................ 6
3. How to Adjust frame rate.............................................................................................................6
3.1 SVGA Preview, 30fps, 24Mhz input clock...........................................................................6
3.2 SVGA Preview, 15fps, 24 Mhz input clock..........................................................................7
3.3 SVGA Preview, 25fps, 24 Mhz input clock..........................................................................7
3.4 SVGA Preview, 14.3fps, 24 Mhz input clock.......................................................................7
3.5 UXGA Capture, 7.5fps, 24 Mhz input clock........................................................................ 7
3.6 UXGA Capture, 7.14fps, 24 Mhz input clock...................................................................... 8
4. How to set Night Mode Preview..................................................................................................8
4.1 Night Mode with Fixed Frame Rate..................................................................................... 8
4.2 Night Mode with Auto Frame Rate.......................................................................................8
5. How to Remove Light Band in Preview Mode............................................................................9
5.1 Light Band.............................................................................................................................9
5.2 Remove Light band............................................................................................................. 10
5.3 Select Banding Filter by Region Information..................................................................... 10
5.4 Select Banding Filter by Automatic Light Frequency Detection........................................11
5.5 Remove Light Band in Capture.......................................................................................... 11
5.6 When Light Band can not be Removed.............................................................................. 12
6. White Balance............................................................................................................................12
6.1 Simple White Balance.........................................................................................................12
6.2 Advanced White Balance....................................................................................................12
6.3 How to select?..................................................................................................................... 13
7. Defect Pixel Correction............................................................................................................. 13
8. BLC............................................................................................................................................13
9. Video Mode............................................................................................................................... 13
10. Digital zoom............................................................................................................................ 14
11. OV2640 Functions...................................................................................................................14
11.1 Light Mode........................................................................................................................14
11.2 Color Saturation................................................................................................................ 15
11.3 Brightness..........................................................................................................................16
11.4 Contrast............................................................................................................................. 17
11.5 Special effects................................................................................................................... 18
11.6 YUV Sequence..................................................................................................................20
12. Deal with Lens......................................................................................................................... 21
12.1 Light fall off...................................................................................................................... 21
12.2 Dark corner....................................................................................................................... 21
12.3 Resolution......................................................................................................................... 21
2 Company Confidential
OVT Confidential
OV2640 Camera Module Software Application Notes
12.4 Optical contrast................................................................................................................. 21
12.5 Lens Cover........................................................................................................................ 21
13. Reference Settings................................................................................................................... 22
13.1 YCbCr Reference Setting..................................................................................................22
13.1.1 VGA Preview............................................................................................................ 22
13.1.2 UXGA Capture..........................................................................................................26
13.2 RGB 565 Reference Setting.............................................................................................. 30
13.3 RGB raw Reference Setting.............................................................................................. 34
14. Capture Sequence.................................................................................................................... 34
14.1 Shutter............................................................................................................................... 35
14. 2 Dummy Lines...................................................................................................................35
14.2.1 Extra Line.................................................................................................................. 35
14.2.2 Dummy Line..............................................................................................................35
14. 3 Dummy Pixels..................................................................................................................36
14.4 Gain...................................................................................................................................36
14.5 Banding Filter................................................................................................................... 37
14.5.1 Preview......................................................................................................................37
14.5.2 Capture...................................................................................................................... 37
14.6 Auto frame rate................................................................................................................. 37
14.7 Capture Sequence..............................................................................................................37
14.7.1 Preview......................................................................................................................37
14.7.2 Stop Preview..............................................................................................................38
14.7.3 Calculate Capture Exposure...................................................................................... 38
14.7.4 Switch to UXGA....................................................................................................... 40
14.7.5 Write Registers.......................................................................................................... 40
14.7.6 Capture...................................................................................................................... 41
14.7.7 Back to preview.........................................................................................................41
3 Company Confidential
OVT Confidential
OV2640 Camera Module Software Application Notes
1. How to Select Output format?
OV2640 support 4 output format: YcbCr422,YCbCr420, RGB565, Bayer raw RGB and GRB,
YUV422 Compression. How to choose the right output format for camera phone design or other
applications? Let's look at the back-end chip first.
The general diagram of back-end chip is as below:
The data format at LCD driver are always RGB. For example, RGB444, RGB565, RGB555,
RGB888 etc. The data format and memory interface are always Compression. The Compression
data is compressed from YCbCr data. So Both RGB and YCbCr data are needed inside the back-
end chip. The “X” block is different for different back-end chips.
1.1 Back-end with full ISP
This kind of back-end has full ISP. It takes raw RGB input, doing interpolation to generate
RGB24 and doing translation to generate YCbCr. This kind of back-end could take Bayer raw RGB
or processed raw RGB.
The advantage of processed raw RGB over Bayer raw RGB is the output data are processed.
Sensor functions such as defect pixel correction, lens correction, gamma, color matrix, de-noise,
sharpness, BLC etc. could be applied. Since the life time of back-end chip is longer than image
sensor, sometimes back-end chips could not fix defects of new sensors if taken Bayer raw RGB.
But the defects of new sensors could be fixed in processed raw RGB output.
If back-end take Bayer raw RGB format from sensor, all the image process operations such as
defect pixel correction, lens correction, gamma, color matrix, de-noise, sharpness, BCL etc should
be done by back-end. If back-end take processed raw RGB format from sensor, the image process
operations such as defect pixel correction, lens correction, gamma, color matrix, de-noise,
4 Company Confidential
Camera Interface
LCD Driver
Memory Interface
YCbCr
RGB
Bayer raw RGB
Processed raw RGB
Compression Mode
JPEG
RGB
X
OVT Confidential
OV2640 Camera Module Software Application Notes
sharpness, BCL etc could be done either inside sensor or by back-end chips. In other words, user
could select the image process operation be done by which side.
1.2 Back-end with YCbCr ISP
This kind of back-end has ISP, but could take only YCbCr format. The ISP could convert YCbCr
to RGB format for LCD display and compress YCbCr for storage.
1.3 Back-end without ISP
This kind of back-end doesn't have ISP built-in. It can not convert from one format to another by
hardware. Actually the format conversion is done by software. There are 3 possible solution for this
kind of back-end chips.
a. Sensor output YCbCr. back-end chip convert YCbCr to RGB for display by software.
b. Sensor output RGB565. Back-end chip convert RGB565 to YCbCR for compression.
c. Sensor output RGB565 for preview, output YCbCr for capture ( compression).
Solution a. provide the best picture quality. Since the input data is 24-bit RGB equivalent. It
could converted to RGB888 for LCD display. Solution b. provide the worst picture quality. Since
the input data is only 16-bit RGB565, even it is converted to YCbCr, the color depth is still 16-bit.
The solution c. provide similar picture quality as solution a. But since preview is RGB565, capture
is YCbCr, preview picture may looks a little different than captured picture.
1.4 Equations to Convert from One Format to Another
YCbCr to RGB24
Y = 0.299R + 0.587G + 0.114B
Cb = 0.568(B-Y) + 128 = –0.172R – 0.339G + 0.511B + 128
Cr = 0.713(R-Y) + 128 = 0.511R – 0.428G – 0.083B + 128
Y = ((77 * R + 150 * G + 29 * B) >> 8);
Cb = ((-43 * R - 85 * G + 128 * B) >> 8) + 128;
Cr = ((128 * R - 107 * G - 21 * B) >> 8) + 128;
RGB24 to YcbCr
R = Y + 1.371(Cr – 128)
G = Y – 0.698(Cr – 128) – 0.336(Cb – 128)
5 Company Confidential
OVT Confidential
剩余41页未读,继续阅读
资源评论
gushu114122
- 粉丝: 0
- 资源: 73
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功