1999. 7. 15.
1.. 3. 4. 5. 6. Image Representation 7. Frame Grabber 8. Image Format 9. Look up Table Color 10. Image Class 11. Perspective Transform 1. Stereo Camera Model 13. Fourier Transform 14. Convolution 15. Histogram
Image Processing? 1 : : 1 - Computer Vision - Machine Vision - Image UnderstandingRecognition - Pattern Recognition
1950. 1960 block world 3. 1970 1970.. Structured Light Stereo Image 3. Image Understanding Pattern Recognition. 1980. VLSI... 1990 PC
- - - - PC -
- Image Restoration / Image Enhancement / Image Compression - Object Tracking - Face Detection and Recognition - Medical Image Analysis - Digital and Video LibrariesDatabase - Real-Time and Active Vision System - Physics-Based Vision - Motion and Gesture Analys - D and Low-Level Vision - Object Recognition - Character Recognition - Stereo and 3D Vision
Input Device Sampling and Quantize Digital Storage Computer Display Record acquisition digitize store process output Segmentation Representation and description Problem domain Preprocessing Image acquisition Knowledge base Recognition and interpretation Result
Image Representation
Frame Grabber RGB/HIS Converter DMA in Amp R/G/B R G B A/D Converter Memory Video Mier D/A Converter Et Signal Timing I/O Control CPU System Bus
Image format 00 MN Header Image Data Color Palette Type def struct{ BYTE id; BYTE version; BYTE encoding; BYTE bit_per_piel; WORD 1y1y; BYTE plane; WORD hres vres; - - - - - - } a image coordinate b image file format - image file format GIFGraphic Interchange Format BMPMicrosoft Windows Device Independent Bitmap TIFFTag Image File Format PCX RAS EPS SGI PCIT JPEG MPEG AVI
Look up up Table Color Piel logical colour or grey level 1byte 0 1 1 1 0 0 1 1 0 1 0 1 Look up table Actual colour from table Memory Piels Scene image
Image Class R G B RGB Image Time Sequence Image Pyramid Range Data Stereo Pair Mosaic
Perspective Transform Perspective Transform Image plane yy X z Z y X Y Z Lens center λ N Z y Y Z Y y Z Y Z Y y Z Z X Z X Z X λ λ λ λ λ λ λ λ λ λ λ λ λ λ
Stereo Camera 3 Image1 Image y y 1 y 1 Lens center y B Optical ais w World point
Stereo Camera Model X Image 1 1 y1 Origin of world coordinate system l B w Image l y X X 1 λ 1 λ λ λ 1 Z Z X X + 1 B Z Z 1 Z Plane of constant Z 1 X1 λ Z λ X + B λ λ λb Z λ 1 1 Z
Fourier Transform Fourier Transform : Spatial Frequency : : 1 -D Discrete Fourier Transform du e u F f d e f u F iu iu π π dudv e v u F y f ddy e y f v u F yv u i yv u i + + π π / / 1 0 1 0 / / 1 0 1 0 1 M yv N u i N u M v M yv N u i N M y e v u F y I e y I NM v u F + + π π
1-D Signal Convolution f g f α g α d α 1 0.5 0.5 1 0.5 f 1 g 1-1 1-1 Image Convolution y I i j y M y Mask Image Buffer Mask center Result of summation
Fourier Transform Convolution theorem Fourier Transform Convolution theorem f g Fu Gu F.T f * g Fu Gu f g Fu * Gu Inverse filter [ ] 1 1 1 1 v u H v u D F v u I F y I v u H v u D v u H v u D v u I v u I v u H v u D
Histogram Piel Piel
Image Segmentation 1. Thresholding. Edge 3. Edge Operator 4. Laplacian Operator 5. Laplacian of Gaussian 6. Canny Edge Detector 7. Local Edge Linking 8. Hough Transform 9. Region Splitting 10. Split and Merge 11. Region Growing
Thresholding Background separation B[ i j] F [ i j ] where F T [ i j ] Object Segmentation 1 if F[ i j ] > T 0 otherwise Known Object intensity F T [ i j] 1 if T 1 < F[ i j ] < T 0 otherwise
Automatic thresholding Piel Counts T Gray level
Otsu Algorithm tg g i 0 f i : Gray level g Picel mg g i 0 gf i t g : Picel gray level T t g ma{ [ m g m G P t g 1 } 1 Where Pm * m G : gray level
Edge 1 1 Edge : - - - Line y m + c a r cos q + y sin q b n d p d + tn c y p c ym+c a o r q b c m l n d c
Gradient G Gy Gy G y f G y f f G G y f G y tan 1 ] [ ] [ + ] 1 [ ] [ ] [ 1] [ j i f j i f G j i f j i f G y + + -1 1-1 1 Filtering noise reduction Enhancement gradient calculation Detection thresholding Localization subpiel estimation f f f + lim 0 Edge Edge
Edge Operators Roberts Operators G [ f [ i j]] f [ i j] f [ i + 1 j + 1] + f [ i + 1 j] f [ i j + 1] G + G y G 1 0 0-1 Gy 0-1 1 0 Sobel Operators M S + S Prewitt Operator y -1 0 1-0 -1 0 1 S S y 1 1 0 0 0-1 - -1 M S + S y -1 0 1-1 0 1-1 0 1 S S y 1 1 1 0 0 0-1 -1-1
Laplacian Operator Laplacian Operator ] 1 [ ] [ ] 1 [ 1] [ ] [ 1] [ j i f j i f j i f y f j i f j i f j i f f y f f f + + + + + a b threshold y f y f y f 0 1 0 1-4 1 0 1 0 1 4 1 4-0 4 1 4 1 ramp edge
Laplacian of of GaussianLoG Gaussian filtering + Laplacian edge detection Zero Crossing h y [ g y* f y] [ g y]* f y where g y + y σ 4 σ e σ + y 1 : Gaussian Smoothing Laplacian edge detection : direct convolution with LoG filter 0 0-1 0 0 0-1 - -1 0-1 -16- -1 0-1 - -1 0 0 0-1 0 0
Canny Edge Detector 1 Smoothing : p[ i Q[ i j] S[ i S[ i j] G[ i j; σ ]* I[ i j] operator j + 1] + S[ i + 1 j j] S[ i j] + S[ i j + 1] S[ i j] + 1] S[ i + 1 S[ i + 1 j] S[ i + 1 j] / j + 1] / M [ i j ] P[ i θ [ i j ] arctan j ] + Q [ i j ] Q [ i j ] P[ i j ] 3 Nonmaima Suppression Gradient line M M 0 -> thining. 4 double thresholding T 1 T
Local Edge Linking edge point edge direction neighbourhood 1 edge piel edge point f y f y T 3 edge point α y α y < A 4 edge set Link edge point 1 5 edge point 1
Hough Transforms y m + c : c m + y : Accumulation array :[m] c 4 3 1 Original data Line to be found Three lines coincide here -14 m 1 3 4 5 y Gives Transposed 3 1 3m.1 + c c-1m+3 m. + c c-1m+ 3 4 3m.4 + c c-4m+3 0 4 0m.4 + c c-4m 4 1 3
Polar Form Hough Transform ya 3 +b 3 Pointy r cosθ + y sinθ accumulation array :[ N + M 360] ya 1 +b 1 ya ya +b 5 +b 5 ya 4 +b 4 Family of linescartesian coordinates through the pointy y y r θ Shortest distance from origin to line defines the line in terms of r and θ One of many possible lines through y e.g. ya+b cosθ So r q y tan + y tanθ cosθ sin θ + y sinθ cosθ cosθ 1 sin θ + y sinθ cosθ y- tanq y- tanq sinq cosθ + y sinθ
Region Splitting 1 block block piel 3 block 4 block 5 block
Split and Merge 1 block block 3 block piel region size block 4 block region merge I I 1 I I 3 I 4 I I 1 I I 1 I 1 I 1 I I 3 I 3 I 41 I 4 I 43 I 44 I 1 I 41 I 4 I 43 I 41 I 4 I 43
Region Growing 1 piel seed piel seed piel piel S if S T region otherwise 1 3 piel seed piel 4 piel region
Image Analysis 1.. 3. Vision System 4. 5. 6. 7. Labeling 8. Morphological Process 9. Geometric Parameter 10. Boundary Tracking 11. Compactness and Distance 1. Filtering 13. Moment 14. Pattern Recognition 15.
Roberts Huckel Montanari Rosenfeld 3 Barrow Binford Shirai Agin Kelly Falk Shirai Relaation Vision Theory Marr 3D model Marr Brooks Osima Motion Ullman Shape-from -Theory Shape-from-shading Horn Guzman Huffman Clowes Walts Macworth Brice Tomita Ohlander Yakimovsky Knowledge-based Segmentation 65 66 67 68 69 70 71 7 73 74 75 76 77 78 79 80 81 8
FA OA CTX TV
Vision System Computer Input / Output Motion Actuator Feeding /Servo PLC Robot Network
Sample S/W
Segmentation / Real World
Neighbors Connectivity [ i j] [ i j] 4-neighbors 8-neighbors Boundary Interior
Labeling region 1 Scale from } left to right top to bottom 3 4 1 1 1 1 1 1 1 1 1 1 1 1
Labeling 4-neighbors Algorithm 1. Scan. Scan 1 Piel 1~4 1 Label Copy Piel Label Copy 3 Piel Label Label Copy Label equivalent label 4 Label 3. Piel Step 4. Equivalence table Label 5. Scan equivalent label 4
Morphological Process fi Mathematical Morphology A 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 B 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 AU B A union B 1 0 1 1 1 0 1 0 1 1 1 0 1 1 1 AI B A intersection B 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1
Dilation Erosion piel Original image A Erosion A B { p B p A} Intersection mask 1 0 1 1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 0 Dilation A B Union U b B i Ab i
Gray-level Dilation Gray-level Dilation 1 0 1 0 } maimum { + + + n j m i j i B j y i A y R Gray-level Erosion Gray-level Erosion 1 0 1 0 } minimum{ + + n j m i j i B j y i A y R Opening Opening OPEN A E D B A Closing Closing CLOSE I D E B A
Opening Closing
Geometric Parameter Size : Area A n n i 1 j 1 B[ i j] Position : y n m i 1 j 1 n m i 1 j 1 B[ i B[ i j] j] n m i 1 j 1 n m i 1 j 1 jb[ i ib[ i j] j] n m jb[ i j] i j 1 1 A y n m ib[ i j] i j 1 1 A
Boundary Tracking 1. Object Piel s S scan. boundary piel c s b s s 4 3. C 8 b n 1 ~n 8 S n i 4. Cn i bn i - 1 5. CS 3 4
Compactness 4 π Distance 8 5 5 8 5 1 5 1 0 1 5 1 5 8 5 5 8 4 3 3 4 3 1 3 1 0 1 3 1 3 4 3 3 4 1 1 1 1 0 1 1 1 1 <Euclidean> <City-block> <chessboard>
Filtering --Space Domain window } Iy Arithmetic Mean Filter 1 1 1 1 1/9 1 1 1 1 1 1 I y N y w Alpha-trimmed Mean Filter Median Filter Ordered set : I 1 I I 3 I N Median value I k k N N 1 T N T I i i T + 1
f 0 frequency Filtering --Frequency Domain low-pass Filter high-pass Filter band-pass Filter gain Pass band Stop band Pass band Pass band Stop band Stop Stop Stop band v Pass band u Stop band v Pass band u Stop Pass Stop
Moments ij th discrete central moment m ij 1 n i y y 1 n y j y Elongation : Euler Number : region - hole
Pattern Recognition Particles on an air filter
Areas of Pollen Granules Areas of Particles Perimeters of Particles Area
3 : 30
5 43 3 3.. 1... 1 3
THE END
Fourier Transform Original image Result image
Image Convolution Result image Original image mask1 1 1 1 1 5 1 1 1 1 mask 1 1 1 1 1 1 5 5 5 1 1 1 1 5 5 1 44 5 1 5 5 1 1 1 1
Fourier Transform Convolution theorem Original image Inverse filtering Result image
Thresholding Original image Result image
Result image Roberts Operators Original image Sobel Operators Prewitt Operator
Laplacian Operator 0 1 0 1-4 1 0 1 0 1 4 1 4-0 4 1 4 1
Laplacian of of GaussianLoG Original image Result image
Canny Edge Detector Original image
Hough Transforms
Dilation Erosion 1 1 Original image Dilation Erosion
Dilation Erosion Original image Gray-level Dilation Gray-level Erosion
Filtering --Space Domain Arithmetic Mean Filter Original image Median Filter
Filtering --Frequency Domain Original image low-pass Filter high-pass Filter band-pass Filter