CMOS Camera
Purpose:
Display the data collected by the camera on the LCD in real time
I. 2440 Environment Construction
1. patch:
Tar xjvf linux-3.4.2.tar.bz2
Cd linux-3.4.2
Patch-p1 <../linux-3.4.2_100ask.patch
Cp config_ OK./. config
Make menuconfig
2. Start the kernel:
Set ipaddr 192.168.1.122 & set serverip 192.168.1.101 & tftp 0x30000000 uImage
Set bootargs root =/dev/nfs nfsroot = 192.168.1.200:/work/nfs_root/fs_mini_mdev_new ip = 192.168.1.17 console = ttySAC0, 115200 & bootm 0x30000000
3. DRIVER:
Cp *. ko/work/nfs_root/fs_mini_mdev_new/work
Cp test_camera/work/nfs_root/fs_mini_mdev_new/work
Ii. Hardware principles
Natural landscape-> camera module-> interface-> S3C2440 camera controller-> LCD
Ov7740 (CAMERA module)
Input signal: analog signals such as natural landscape
Output Signal: digital signals in RGB and YUV formats
1). Common Parameters
Input signal: analog signals such as natural landscape
Output signal:
Output Format: raw rgb, YUV
Output resolution: VGA (640*480), QVGA (240*320), CIF (352*288), smaller arbitrary size
Effective photosensitive array size: 656*488 = 320128 (30 W)
Lens size: 1/5
Pixel size: 4.2um * 4.2um
Summary:
The above three parameters are used to describe the photosensitive array, even if it is a 30 W pixel camera, if its
The smaller the lens size, the smaller the size of the corresponding pixel particles, the poorer the light sensitivity.
The worse the shooting effect is.
Input clock frequency: 6 ~ 27 MHz
That is, the operating frequency range of the 0V7740 camera module.
Scan Mode: continuous scan (P)
2). Internal data processing process
A. isc section:
Flip, gain size adjustment, black level calibration, Saturation Control, OTP memory
B. isp part:
Provides test functions, lens compensation, automatic white balance, raw rgb-> RGB, RGB-> YUV,
Window Function and zoom-out function
C. ioi:
Raw rgb/YUV, VGA/QVGA, BT601/BT656
Q: Can these processes be automatically completed without any manual setup?
A: Only a few of the above processes are automatically completed, while the rest of the process requires us to set
After configuration.
Q: How can I set them?
A: It is set through the IIC Bus to operate the OV7740 register.
Q: What is the difference between raw rgb and RGB?
A: raw rgb is data of only three colors: Red, green, and blue. The RGB data not only indicates red, green, and blue
Three colors, and can also represent any color composed of red, green, and blue.
Q: What are RGB and YUV respectively?
A: RGB and YUV are two completely different color spaces. They can be converted to each other.
Schematic diagram (Interface)
Control class:
IICSDA-IIC bus data line
IICSCL -- clock line of the IIC Bus
Data transmission:
CAMRST -- reset the CMOS Camera Module
CAMCLK-the system clock used by the camera module (24 MHz)
CAM_HREF -- synchronous line signal
CAM_VSYNC -- frame synchronization signal
CAM_PCLK -- pixel clock
CAMDATA0 ~ 7 -- Data Cable
Summary:
1. the interfaces of the CMOS Camera module are divided into two types:
(1). Control
-- Initialization: Initialize the camera module.
Allows the camera module to normally output camera data
-- Control: Set brightness, rotation, scaling, and other operations
(2). Data Transmission class: The same as the LCD interface.
2. The CMOS Camera module is an IIC device and needs to be written to it in line with the architecture of the IIC device.
To implement initialization and flexible control.
640*480, 30fps, YUV, BT601
S3c2440 camera controller (CAMIF)
Q: What is the difference between BT601 and BT656?
Answer: BT601 has an independent line synchronous signal line and frame synchronous signal line, while BT656 uses these two signals.
Embedded in data.