Title: Real-time Image Processing System
1Real-time Image Processing System
- Peter Chun
- Dr. Lev Kirischian
- Dr. Vadim Geurkov
2Overview
3Schematic
4Topics on the table
- Controllers on FPGA
- Digital Camera (OV5017 and M4088)
- SRAM (IDT71V416 256K X 16-bit)
- VGA (DAC board THS8134)
5Topics on the table (continue)
- Real-time Image Processing system
- Step1 VGA verification
- Step2 SRAM WRITE/READ verification using
verified VGA - Step3 Digital camera data acquisition on
verified VGA using verified SRAM - Static one-frame
- Continuous video capture
- Video capture with pixel update
Step by Step Guide How to construct one
6VGA
- Hardware Interface
- DB15
- Number of pins you need
- 6
- Pin Descriptions
- Hsync Horizontal Sync
- Vsync Vertical Sync
- R red
- G green
- B blue
- GND ground
7Hardware Interface DB15
8VGA (continue)
(0,0)
(0, 0)
Horizontal Synchronization
Vertical Synchronization
(640,480)
(640, 480)
9Timing Requirements
PARAMERTES A B C D E
TIME 31.77us 3.77us 1.89us 25.17us 0.94us
10Timing Requirements
R
Red, Green, Blue
Horizontal Sync (Hsync)
Q
S
P
O
PARAMERTES O P Q R S
TIME 16.67ms 64us 1.02ms 15.25ms 0.35ms
11VGA (continue)
12SRAM
- Signals
- Control signals
- we, oe, cs, address(length..0), bhe, ble
- Data signals
- Data(depth..0)
- NOTE
- depth is how many bits can you access at one
time. - length is how many of data can you store, which
is equivalent to 2length.
13SRAM (continue)
14SRAM (continue)
15SRAM (continue)
16Digital Camera
17Digital Camera (continue)
- Reference Signals
- Hsync
- indicates the duration of active horizontal pixel
insertion. It remains high during valid line and
reset while not valid. - Vsync
- represents the duration of active frame. When
valid, it remains low and asserts high briefly to
indicate the start of new frame. - Pclk
- establishes the availability of the pixels.
Either at the rising or falling edge of pclk, the
pixel data is ready to be outputted.
18Digital Camera (continue)
- SetUp
- Exposure control, AGC (auto gain control), Gamma
correction, Frame rate, resolution control - Method
- Memory Access
- I2C protocol
19Digital Camera (continue)
100ns
100ns
50ns
50ns
50ns
20ns
20SetUp Example
- case y is
- -- Initial state after resets
- when initial gt
- if(loop_num num_mul) then
- loop_num lt 0
- yltHWCTL_initial
- else
- loop_num lt loop_num 1
- end if
- -- Horizontal Window size control
- when HWCTL_initial gt
- yltHWCTL_ready
- when HWCTL_ready gt
- if(loop_num num_mul) then
- loop_num lt 0
- yltHWCTL_done
- else
- loop_num lt loop_num 1
- end if
- process(y)
- begin
- -- initial and reset values
- oeb lt '0'
- csb lt '1'
- web lt '1'
- a lt "0000"
- cam_data lt "00000000"
- if y initial then
- oeb lt '0'
- csb lt '1'
- web lt '1'
- elsif y HWCTL_initial then
- a lt "0110"
- cam_data lt "00000000"
- oeb lt '1'
- csb lt '0'
- web lt '0'
- elsif y HWCTL_ready then
21Digital Design Tips
- Multiple processes
- For reference signals (pclk, vsync, href)
- Filtering unstable states of the signals
22Digital Design Tips (continues)
- Address space division
- Address setup time exceeds synchronous clock
events - Long integer or std logic vector need attention
- Flip image
- Use decrement of address space
23Digital Camera (continue)
24Digital Camera (continue)
25Digital Camera (continue)
26Design evolution
- Frame based
- One memory
- Pixel based
- One memory
- Internal memory
27Examples
28Edge Detection
29Edge Detection (continue)
- An edge pixel is described using two important
features - Edge strength, which is equal to the magnitude of
the gradient - Edge direction, which is equal to the angle of
the gradient.
30Edge Detection (continue)
385 pixels
288 pixels
31Roberts Cross Operation
385 pixels
a1
b1
c1
d1
e1
f1
z1
y1
x1
a2
b2
c2
d2
e2
f2
z2
y2
x2
288 pixels
or
A
B
C
D
E
F
Z
Y
X
32Example
- Real-time image processing system with edge
detection