基礎影像處理!
Basic Image Processing
2014應⽤用輔具系統暑期課程!
鄭煒翰
OUTLINE
1. Image Basic Concepts!
2. Image Processing!
3. Lab
• Image Basic Concepts!
Image!
Color!
• Image processing!
• Lab
• Bitmap!
• Vector
• Single Sensor (point)!
• Sensor Stripes (line)!
• Sensor Array (Array)
• dpi (dots per inch) for printer!
• ppi (pixel per inch) for display
• color depth (bit depth)!
monochrome (black & white)!
gray-scale!
16 colors (4 bits)!
256 colors (8 bits)!
high color (15/16 bits)!
true color (24 bits) !
• color model
• 1 bit!
• black & white (B&W)!
0 & 1
• 8 bits!
• 256 different intensities of gray!
• the result of measuring the intensity of light
• 4 bits !
• Red, Green, Blue, Intensity
Microsoft Apple
1. Indexed Color (palette)!
2. RRRGGGBB (8 bits)
3-3-2 bit RGB
• 4, 16, 256(at most)!
• to manage colors of images!
• to save memory & storage!
• speed up display refresh !
!
• the most representative colors, or the fixed
hardware colors, are grouped into a limited size
palette: an array of color elements
File size =!
6x3 bytes (palette) !
+ 7x5x1 bytes (indices) !
! ! ! ! = 53 bytes
File size =!
! ! 7x5x3 bytes!
! ! ! ! = 105 bytes
• 15-bit high color!
• 16-bit high color!
65,536 colors
15 bits
16 bits
• 24 bits!
256 × 256 × 265 = 16,777,216 colors!
!
!
• 32 bits
24 bits
• color depth!
• color model!
RGB!
CMYK!
YIQ!
YUV!
HSV & HSL
• RGB!
RGB 565!
RGB 888!
• CMYK!
for print!
!
• NOT intuition
• YIQ!
Y provide the brightness of TV signals
(Luminance)!
I (In-phase),Q (Quadrature-phase)!
RGB to YIQ!
• Y = 0.299R + 0.587G + 0.114B!
• I = 0.596R - 0.274G - 0.322B!
• Q = 0.211R - 0.523G + 0.312B
• YUV - Y(Luminance), U(Chrominance), V(Chroma)!
focus on the sensitivity of the lightness of vision!
YUV 444 (3 bytes per pixel)!
YUV 422 (4 bytes per 2 pixels)!
YUV 420 (6 bytes per 4 pixels)!
RGB to YUV!
• Y = 0.299R + 0.587G + 0.114B!
• U = -0.147R - 0.289G + 0.436B!
• V = 0.615R - 0.515G - 0.100B
• YUV!
YUV 444 !
Y3 Y2 Y1 Y0 U3 U2 U1 U0 V3 V2 V1 V0!
(Y3 U3 V3) (Y2 U2 V2) (Y1 U1 V1) (Y0 U0 V0)!
Per subsample (1+1+1) = 3 bytes
• YUV!
YUV 422 !
Y3 Y2 Y1 Y0 U1 U0 V1 V0!
(Y3  1/2U1  1/2V1 ) (Y2  1/2U1  1/2V1 ) (Y1 
1/2U0  1/2V0 ) (Y0  1/2U0  1/2V0)!
Per subsample (1 + 0.5 + 0.5) = 2 bytes
• YUV!
YUV 420 !
Y3 Y2 Y1 Y0 U0 V0!
(Y3  1/4U0  1/4V0 ) (Y2  1/4U0  1/4V0 ) (Y1 
1/4U0  1/4V0 ) (Y0  1/4U0  1/4V0)!
Per subsample (1 + 0.25 + 0.25) = 1.5 bytes
• HSV(Hue, Saturation, Value) or HSB(B, Brightness)!
• HSL(Hue, Saturation, Lightness) or HLS
• Image Basic Concepts!
• Image Processing!
Edge Detection!
Histogram!
Noise Removal!
Threshold!
• Lab
Image Processing
Processing Recognition
Computer Vision
• Edge!
• Laplacian!
• Sobel!
• Prewitt!
• Canny
• Edge!
• derivative
• derive from 2nd derivative
• 1st derivative
• 1st derivative
• Double threshold!
• computation : sobel > canny!
• result : canny > sobel
• probability density function (pdf)!
• cumulative distribution function (CDF)!
• equalization
• histogram equalization
• Smoothing Method!
!
!
!
• Median Method
1,1,2,2,2,2,3,3,200
• Before Recognition!
After edge detection!
• grayscale image!
• image size is still large!
Image Segmentation!
• binary image (black & white)!
threshold
Histogram!
!
histogram
equalization
Edge!
Detection!
laplacian
sobel
prewitt
Threshold!
set
threshold
Noise!
Removal!
smoothing
median
Gray level!
RGB
to
Gray
• Image Basic Concepts!
• Image Processing!
• Lab
38
基礎影像處理

基礎影像處理