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 menuconfig12345
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 0x3000000012
drive:Cp *.ko /work/nfs_root/fs_mini_mdev_new/work
Cp test_camera /work/nfs_root/fs_mini_mdev_new/work12
Second, the flow of hardware principle data:Natural landscape - "camera module -" interface (wire) - "S3C2440 camera controller - "LCD
1.ov7740 (camera module)
A camera module with a yellow cable on it.
The components of the module: lens, voice coil motor, infrared filter, sensor (sensor is ov7740 chip, its front is the effective photosensitive array), cable PCB boardInput signal: analog signal such as natural landscape
Output signal: Digital signal in RGB, YUV format
1) Common parametersInput signal: analog signal such as natural landscape
output signal:
The output format is: RAW RGB, YUV
The output resolution is: VGA (640 * 480), QVGA (240 * 320), CIF (352 * 288), smaller any size
The size of the effective photosensitive array: 656*488 = 320128 (30W pixels) (the photosensitive array is composed of pixel particles) (this size indicates the number of photosensitive particles)
The size of the lens: 1/5 inch (photosensitive array composed of photosensitive particles, the physical composition is 1/5 inch)
The size of the pixel particles: 4.2um * 4.2um (it means the size of a photosensitive particle, the pixel can only feel three colors)
to sum up:
The above three parameters are used to describe the photosensitive array. Even if the camera is 30W pixels, if the size of the lens is smaller, the smaller the size of the corresponding pixel, the worse the sensitivity. The worse the shooting effect.
Input clock frequency: 6~27MHz (ie the operating frequency range of the 0V7740 camera module.)
Scan mode: continuous scan (P): for example, the movie is 720P
Interlaced (I): The movie is 1080I
A.isc part: (image sensor core part)
Flip, gain size adjustment, black level calibration, saturation control, OTP memory (storage vendor ID device ID)
The first part generates RAMRGB data.
B.isp part: (image processing DSP)
Provide test function, lens compensation function, auto white balance, RAW RGB-"RGB, RGB-"YUV,
Window function, zoom out
There is a DSP data processing unit inside, and then the obtained data is passed to the next part.
C.ioi part: image output unit
RAW RGB/YUV, VGA/QVGA (resolution), BT601/BT656 (data transmission method)
Q: These processes do not require us to make any settings, can they be done automatically?
A: Only a small part of these processes are automatically completed, and the rest is required to be set up before we can complete.
Q: How do you set them up?
A: It is through the IIC bus, the register of the OV7740 is operated to set the module.
Q: What is the difference between RAW RGB and RGB?
A: The so-called RAW RGB is only three colors of red, green and blue. And RGB data, it not only represents three colors of red, green and blue, but also can represent any color composed of red, green and blue.
Q: What are the differences between RGB and YUV?
A: RGB and YUV are two completely different color spaces, which can be converted to each other.
2. Schematic (interface)Control class:
IICSDA – IIC bus data line
IICSCL – Clock line for the IIC bus
Data transfer class:
CAMRST – Reset CMOS camera module
CAMCLK – system clock for camera module operation (24MHz)
CAM_HREF – line sync signal
CAM_VSYNC – frame sync signal
CAM_PCLK – pixel clock
CAMDATA0~7– data line
3. Camera interface controller: (refer to the chip manual) any function has a corresponding registerSource: The maximum resolution allowed for input is 4096*4096, the accepted mode is BT601/656, and the acceptable data is 8-bit YUV format.
Camera : Output resolution: 640 * 480 Mode of transport: BT601
So how does our controller know what format data is generated by the camera? This requires us to set some registers to tell the camera controller what we are using.
The function of the window function is to crop the data source, how much we need to crop, and how much to cut is set by the register.
There are two options for cropping data:
Pass to the preview channel: Produce a smaller resolution image (PIP: PIP: up to 640*480) For this channel you can do the following data: zoom + color space conversion (yuv / rgb) + rotation. Has its own unique DMA channel: only RGB16/24 pictures can be output. Store the data directly in the specified place, we call him cache
Pass to the encoding channel: Generate data for encoding (maximum: 4096*4096) For this channel, the resulting data can be: zoom + encoding (that is, compressing the acquired data) + rotation. Only images of YCbCr420/YCbCr422. can be output. Also stored in the cache
When one frame of data has been obtained, and then the next frame of data is read, an interrupt is generated on the falling edge of the previous frame to read the data of the previous frame. An interrupt is generated before each frame of data begins to be acquired.
Summary: 1. The interface of the CMOS camera module is divided into two categories:(1) Control class
– Initialization: The camera module is initialized accordingly, allowing the camera module to output camera data normally.
– Control: Set the operation of brightness, rotation, zoom, etc.
(2) Data transmission class: The interface with the LCD is exactly the same.
2. The CMOS camera module is an IIC device that needs to be written to the driver of the IIC device architecture to achieve initialization and flexible control. 3.s3c2440 camera controller (CAMIF)The maximum resolution allowed for input is 4096*4096, the accepted mode is BT601/656, and the acceptable data is 8-bit YUV format.
Q: What is the difference between the transmission methods of BT601 and BT656?
A: BT601 has independent line sync signal lines and frame sync signal lines, and BT656 embeds these two signals into the data.
4Lan Software Router,4Lan Mini Pc,4Lan Firewall Router,4 Ethernet Mini Pc
Shenzhen Innovative Cloud Computer Co., Ltd. , https://www.xcypc.com