projseminar1
TRANSCRIPT
-
8/6/2019 PROJseminar1
1/23
A Seminar onA Seminar on
Digital Image ProcessingDigital Image Processing UUsing cmos Image Sensorsing cmos Image Sensor
ByBy
Md.Akheel Ahmed 05621A0484Md.Akheel Ahmed 05621A0484
N.Narender Reddy 05621A0485N.Narender Reddy 05621A0485
-
8/6/2019 PROJseminar1
2/23
AIM OF THE PROJECT:
The aim of the project is the design and construction of an interface
between the CMOS camera and a computer, using the AVR
microcontroller.
The proposed tasks for the project:
Make the AVR Atmega128 and its environment work
Communicate the AVR Atmega128 with the computer
Interfacing CMOS image sensor to AVR Atmega128
Make the camera work and see images in the TV
Read and write the registers of the camera using the I2C protocol
Read a line from the camera and send it to the computer
Read a whole image from the camera and send it to the computerImage processing on the system is done using MATLAB software
Make a little process of the image inside the AVR and send the
result to the computer or color graphical lcd
-
8/6/2019 PROJseminar1
3/23
BLOCK DIAGRAM:
-
8/6/2019 PROJseminar1
4/23
The information flows in two ways: on the one hand there are
commands from the computer to the camera to change
different characteristics of it, on the other images from the
camera should be sent to the computer.
The communication between the computer and the AVR
Microcontroller is through the serial port.
The communication between the camera and the
microcontroller is: using the I2Cprotocol to access to the
different registers of the camera and using an 8-bit port to read
the images. In addition the camera will be connected to a TVwith its analog output for debugging purpose.
-
8/6/2019 PROJseminar1
5/23
AVR MICROCONTROLLER:
The AVR is a Modified Harvard architecture machine with
program and data stored in separate physical memory systems
that appear in different address spaces but having the ability to
read data items from program memory using special
instructions.
AT MEGA 128:
The ATmega128 is a low-power CMOS 8-bit microcontroller
based on the AVR enhanced RISC architecture. By executing
powerful instructions in a single clock cycle, the ATmega128
achieves throughputs approaching 1MIPS perMHz allowing
the systemdesigner to optimize power consumption versus processing
speed.
-
8/6/2019 PROJseminar1
6/23
FEATURESOFAVR:
RISC / Harvard
Powerful microcontroller designed for small applications
Very low power operation 118 instructions
1 instruction per clock cycle (pipelined)
Register-to-register operation
RISC core with ~100 instructions
Modest clock speeds (4-16 MHz)
8-bit bus, 32 GP 8-bit registers
Intended as single chip solutions
In-circuit programmable Flash(~1000 cycles)
Small amount ofEEPROM and SRAM Single-cycle execution of most instructions
Several on-chip peripherals
(UART, SPI,TWI, ADC, PWM, WDT..)
-
8/6/2019 PROJseminar1
7/23
-
8/6/2019 PROJseminar1
8/23
PIN DESCRIPTION:
VCC - Digital supply voltage.
GND - Ground.
Port A (PA7..PA0) - Port A is an 8-bit bi-directional I/O port
with internal pull-up resistors (selected for each
bit). The Port A output buffers have symmetrical drive
characteristics with both high sink and source capability. As
inputs, Port A pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port A pins are
tri-stated when a reset condition becomes active, even if theclock is not running.
-
8/6/2019 PROJseminar1
9/23
Port B (PB7..PB0) - Port B is an 8-bit bi-directional I/O port
with internal pull-up resistors (selected for each
bit). The Port B output buffers have symmetrical drive
characteristics with both high sink and source capability. As
inputs, Port B pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port B pins
are tri-stated when a reset condition becomes active, even if
the clock is not running.Port C (PC7..PC0) - Port C is an 8-bit bi-directional I/O port
with internal pull-up resistors (selected for each
bit). The Port C output buffers have symmetrical drive
characteristics with both high sink and source capability. As
inputs, Port C pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port C pins
are tri-stated when a reset condition becomes active, even if
the clock is not running.
-
8/6/2019 PROJseminar1
10/23
Port D (PD7..PD0) - Port D is an 8-bit bi-directional I/O port
with internal pull-up resistors (selected for each
bit). The Port D output buffers have symmetrical drive
characteristics with both high sink and source capability. As
inputs, Port D pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port D pins are
tri-stated when a reset condition becomes active, even if the
clock is not running.Port E (PE7..PE0) - Port E is an 8-bit bi-directional I/O port
with internal pull-up resistors (selected for each
bit). The Port E output buffers have symmetrical drive
characteristics with both high sink and source capability. As
inputs, Port E pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port E pins are
tri-stated when a reset condition becomes active, even if the
clock is not running.
-
8/6/2019 PROJseminar1
11/23
Port F (PF7..PF0) - Port F serves as the analog inputs to the
A/D Converter.
Port F also serves as an 8-bit bi-directional I/O port, if the A/D
Converter is not used. Port pins can provide internal pull-up
resistors (selected for each bit). The Port F output buffers have
symmetrical drive characteristics with both high sink and source
capability. As inputs, Port F pins that are externally pulled low
will source current if the pull-up resistors are activated. ThePort F pins are tri-stated when a reset condition becomes active,
even if the clock is not running. If the JTAG interface is
enabled, the pull-up resistors on pins PF7(TDI), PF5(TMS), and
PF4(TCK) will be activated even if a Reset occurs.
The TDO pin is tri-stated unless TAP states that shift out data
are entered.
Port F also serves the functions of the JTAG interface.
-
8/6/2019 PROJseminar1
12/23
Port G (PG4..PG0) - Port G is a 5-bit bi-directional I/O port
with internal pull-up resistors (selected for each
bit). The Port G output buffers have symmetrical drive
characteristics with both high sink and source capability. Asinputs, Port G pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port G pins are
tri-stated when a reset condition becomes active, even if the
clock is not running.
The port G pins are tri-stated when a reset condition becomes
active, even if the clock is not running.
RESET - A low level on this pin for longer than the minimum
pulse length will generate a reset, even if the clock is not
running. Shorter pulses are not guaranteed to generate a reset.
-
8/6/2019 PROJseminar1
13/23
XTAL1 - Input to the inverting Oscillator amplifier and input to
the internal clock operating circuit.
XTAL2 - Output from the inverting Oscillator amplifier.
AVCC - AVCC is the supply voltage pin for Port F and the A/D
Converter. It should be externally connected to VCC, even if the
ADC is not used. If the ADC is used, it should be connected to
VCC through a low-pass filter.
AREF - AREF is the analog reference pin for the A/DConverter.
PEN - PEN is a programming enable pin for the SPI Serial
Programming mode, and is internally pulled high . By holding
this pin low during a Power-on Reset, the device will enter theSPI Serial Programming mode. PEN has no function during
normal operation.
-
8/6/2019 PROJseminar1
14/23
CMOS IMAGESENSOR:
An image sensor is a device that converts an optical image to
an electric signal. It is used mostly in digital cameras and other
imaging devices.
A CMOS chip is a type of active pixel sensor made using the
CMOS semiconductor process. Extra circuitry next to each
photo sensor converts the light energy to a voltage. Additional
circuitry on the chip converts the voltage to digital data.
-
8/6/2019 PROJseminar1
15/23
The OV6620 is the image sensor used in the project and is the
main part of it. It is a color camera module with digital output.
It uses a CMOS image sensorOV6620 from Omni vision.
It has a digital video port that supplies a continuous 8/16 bit-
wide image data stream. All the camera functions, such as
exposure, gamma, and gain, white balance, windowing, can be
changed through I2C interface by writing in some registers.
-
8/6/2019 PROJseminar1
16/23
USART:
Universal Synchronous and Asynchronous serial Receiverand Transmitter
standard I/O device that provides conversions betweenserial and parallel data
provides a basic protocol for serial communication
Speed, framing, error control
-
8/6/2019 PROJseminar1
17/23
AVR USART:
UART or USART is a standard I/O device
The ATMega32 has a USART integrated on-chip, producinglogic signals for RS232 communication
The microcontroller will only produce +/- Vcc, which is
typically 5V; RS232 specifies +/-12V.The STK-500 includes a level converter between the serial
connector and the microcontroller pins.
-
8/6/2019 PROJseminar1
18/23
USART COMPONENTS:
Transmitter
Manages stream of bits for each byte
Receiver
Manages receipt of bits and assembly into byte
ClockGenerator
Allows the USART to operate in synchronous or
asynchronous modes
-
8/6/2019 PROJseminar1
19/23
IMAGE PROCESSING:
A method for adjusting the color reproduction of a color
image composed of pixels provided in a plurality of color
channels is based on generating a reference image from acombination of the color channels, whereby each spatial
coordinate of the reference image is characterized by a
reference image level.
Channel averages of the color channel values of the pixelsthat correspond to each of at least two different valued
reference image levels are generated.
Specific channel averages are obtained corresponding to a
near white point and a near black point from the channel
averages. The specific channel averages are utilized on a pixel-
by-pixel basis for the respective channels of the digital color
image to produce a processed digital color image having
improved color reproduction.
-
8/6/2019 PROJseminar1
20/23
A method for processing Bayer images method comprising:
Receiving a raw image from a sensor with Bayer color arrays.
Determining a corresponding dot in the raw image that
corresponds to each pixel in a final image.
Locating color reference pixels in the raw image according to
the corresponding dot.
Selecting interpolation pixels in the raw image according to
the color reference pixels and interpolating color values of theeach pixel in the final image according to color values of the
interpolation pixels.
-
8/6/2019 PROJseminar1
21/23
BAYERFORMAT:
Color filters used in most single-chip digital image sensors
used in digital cameras, camcorders, and scanners to create a
color image. The filter pattern is 50% green, 25% red and 25%blue, hence is also called RGBG orGRGB.
This Bayer format is processed in MATLAB to obtain true
RGB picture.
To create a full color image, the camera's image processor
calculates, or interpolates, the actual color of each pixel by
looking at the brightness of the colors recorded by it and others
around it.
-
8/6/2019 PROJseminar1
22/23
-
8/6/2019 PROJseminar1
23/23
All of these calculations are performed in the camera by an
image processor that's similar to the one in desktop computer,
but dedicated to this single task. How well the processor
performs its functions is critical to the quality of images thathave been captured.
ADVANTAGES:
Digital image processing has many advantages over analog
image processing; it allows a much wider range of algorithmsto be applied to the input data, and can avoid problems such as
the build-up of noise and signal distortion during processing.
DISADVANTAGES:
This system has some delay(in seconds) while producing theoutput.