Title: Developing the Demosaicing
1Developing the Demosaicing Algorithm
in GPGPU
Ping Xiang Electrical engineering and computer
science
2Outline
Background Algorithm Implementation Experiment
Results Future Work
3Background
- Color Filter Array.
-
- A mosaic of color filters in front of the
image sensor
4Background
- Demosaicing algorithm is to reconstruct a full
color image - from the data collected by the color filtering
array.
5Algorithm
- Bilinear interpolation
- The red value of a non-red pixel is computed by
the - average of the two or four adjacent red pixels,
and - similarly for blue and green.
6Algorithm
7Algorithm
8Algorithm
For Green Channels
9Algorithm
For Red or Blue Channels
10Implementation
Optimization 1. Vectorize the pixel data to be
processed 2. use shared
memory to reduce the data transfer
11Implementation
1. Vectorize the pixel data to be processed
12Implementation
2. Use shared memory to reduce the data transfer
13Experiment Results
Platform ATI Radeon HD 4870
Brook 1.4 Nvidia GeForce 8800
GTX CUDA 2.1 Dual Core AMD
Opteron(tm) 2212 Frequency 2.0GHz
14Experiment Results
For small data size, GPU is not always a good
choice a. Memory transfer time dominates
the kernel execution time b. Computation is
not that complex enough
15Experiment Results
When the data size is small, CUDA has better
performance. When the data size increases to
4K, the brook performance catches up with
CUDA
16Experiment Results
Explanation ?
Memory Speed Memory Speed Stream processing Units Stream processing Units Stream processing Units
HD 4870 800 85102
GTX 8800 GTX 8800 128 (168)
17Experiment Results
Shared Register Usage
Read data into shared register and try to reuse
the data
18Experiment Results
19Future Work
1. Shared memory usage for further optimization
2. Integrate the code with proper interface to
import image data and export pixel data
3. Report
20Reference
1. High-Quality linear interpolation for
Demosaicing of Bayer-patterned color images,
Henrique S. Malvar, Li-wei He, and Ross Cutler
2. An Improved Demosaicing Algorithm Alexey
Lukin, Denis Kubasov
Questions?