: Definition Importance
Detection of Discontinuities: 9 R = wi z i= 1 i
Point Detection: 1. A Mask 2. Thresholding R T
Line Detection: A Suitable Mask in desired direction Thresholding Line i : R R, j i j
Example: -45º Mask Thresholding
Edge Detection: Two Mathematical model
f x 2 f 2 x
Noise Problem: f f x 2 f 2 x N ( 0,0) N ( 0,0.1) N ( 0,1) N ( 0,10)
Gradient Operators: f Gx x f = G = f y y 2 2 f f f f f = + + x y x y α ( x y), tan G 1 y = Gx 1 2
Gradient Operators: Roberts Cross Gradients: x ( ) ( ) G = z z G = z z 9 5 y 8 6 ( ) ( ) 2 2 f z9 z5 + z8 z 6 f z z + z z Roberts Cross Gradient 9 5 8 6 : Prewitt Operators: y ( ) ( ) ( ) ( ) 1 2 ( 2 ) ( 2 ) ( 2 ) ( 2 ) Gx = z + z + z z + z + z G = z + z + z z + z + z G = z + z + z z + z + z G = z + z + z z + z + z 7 8 9 1 2 3 variation x 7 8 9 1 2 3 3 6 9 1 4 7 y 3 6 9 1 4 7
Gradients Operators Y-Direction X-Direction
Diagonal Edge 45-Direction -45-Direction
Original G x G Gx + Gy y
Pre- Smoothing 5 5 Original G x G x y y G + G
0 1 2 1 0 1 2 1 0 2 1 0 1 0 1 0 1 2 45º and -45º lines
Laplacian as an isotropic Detector: f x f y 2 2 2 f = + 2 2 Discrete Implementation: 2 4N's: f = 4z5 ( z2 + z4 + z6 + z8 ) 2 8N's: f = 4z ( z + z + z + z + z + z + z + z ) 5 1 2 3 4 6 7 8 9
Laplacian of Gaussian (LoG): 2 r h( r) = exp 2 2σ 2 2 2 2 r σ r h( r) = exp 4 2 σ 2σ
Original Sobel GLPF Laplacian LoG LoG>T ZC Zero Crossing: Thinner Edge Easy to compute Noise Reduction capability Spaghetti Effect (isolated circles)
Edge Linking (Local Processing) (, ) ( 0, 0 ) (, ) α (, ) f x y f x y E α x y x y A 0 0 Input G y G x Results
Global Edge Linking by the Hough Transform: ( ) x, y & y = ax + b y = ax + b i i i i b = x a + y i i ( x y ) ( ) All, 's on a line intersect each other at a,b i i
Hough Transform in Cartesian ( a,b ) ( x,y ) 1 1 ( x,y ) 2 2 ( x,y ) 4 4 ( x,y ) 3 3
Hough Transform in Polar Problem with Vertical line (a= ) ( xi, yi ) & x cos + y sin = xi cos + yi sin = ( ρi, θi ) All ( x, y )'s on a sin intersect each other at ( ρ, θ ) θ θ ρ θ θ ρ i i i i
Hough Transform
Hough Transform for circle: 2 2 2 2 2 2 ( xi, yi ) & ( x p1 ) + ( y p2 ) = p3 ( xi p1 ) + ( yi p2 ) = p3 All ( x, y )'s on a spherical surface intersect each other at ( p, p, p ) i i Extract each circle (independent of radius): 1 2 3 xi = p1 + r cosθ p1 = xi r cosθ p2 = p1 tanθ xi tanθ + y yi = p2 + r sinθ p2 = yi r sinθ i
Hough Transform for circle:
Hough Transform for circle:
Hough Transform Implementation: Discrete Accumulator Smoothing Find Local Maxima 1 2 2 1 5 2 1 1 1 1 2 1 1 1
Original Thr-Grad. H-T Linked
Thresholding: F(x,y)>T then (x,y) is belong to object, else (x,y) is belong to background. Bi-level (T) Multi-level (T 1,T 2,, T n ) Threshold image: 1 f x, y > T g ( x, y) = 0 f ( x, y) T Threshold Estimation : Histogram ( )
Thresholds
Role of illumination (, ) = (, ) (, ) f x y i x y r x y Histogram Distortion (, ) = (, ) (, ) (, ) = ln (, ) (, ) = (, ) + (, ) f x y i x y r x y z x y f x y z x y i x y r x y r ( x, y) r ( ) P r i ( x, y) Broadness Homomorphic Process i ( x, y) r ( x, y) Pf ( f )
Basic Global Thresholding: T = MAX + 2 min
How to select T: A Heuristic approach: 1. Initial guess on T 2. Segment image to G 1 (>T) and G 2 ( T) 3. Compute average value of G 1 (Ψ 1 ) and G 2 (Ψ 2 ) 4. Set T be average of Ψ 1 and Ψ 2 5. Repeat 2-4 until small changed in successive T values.
Convergence T0 = 0 T f = 125.4
Adaptive Thresholding: Local Thresholding: Subdivide the images into smaller block. Optimal Global Thresholding: Determine best value when no evidence valley.
Global Thr. Mosaic Local Thr.
Sub-image selection effect Good Subimage Bad Subimage Further block-ing
Optimal Global-Adaptive Thresholding: Gaussian Histogram ( ) ( z µ ) ( z µ ) 2 2 1 2 2 2 1 σ 2 2σ 2 1 exp 2 exp P z = P + P 2 AT + BT + C = A = σ σ for σ 2 2 1 2 B = 2 Pσ C = σ µ σ µ + 2σ σ ln 0 2 2 ( µ 1σ 2 µ 2σ 1 ) 2 2 2 2 2 2 1 2 1 2 2 1 1 2 P2 σ1 µ + µ σ P = = + 2 2 2 1 2 2 1 σ 2 T ln 2 µ 1 µ 2 P2
Optimal Global-Adaptive Thresholding: Histogram Modeling ( ) = ( ) + ( ) p z P p z P p z P + P = 1 1 2 min T 1 1 2 2 T ( ) + ( ) P p z dz P p z dz 2 1 1 2 T ( ) ( ) P p T = P p T 1 1 2 2 +
Example: Preprocessing Log function( radiological absorption) Digital Subtraction (Pre and Post images) Image summation in order to reduce noise. Before After
Example: Optimal Thresholding: Subdivide images to 7 7 sub-block (50% overlap) Histogram Estimation Test of bimodality and Gaussian fitting and Bimodal Unimodal
Example: Thresholding Segmentation Boundary Detection Superimposing
How to improve the former methods: Consider pixels near boundary for histogram. Use of gradient/laplacian to estimate boundary: 0 f < T 2 S ( x, y) = + 1 f T and f 0 < 0: Not on Edge +1:Dark side of edge -1: Bright side of edge 2 1 f T and f 0
Example:
S(x,y) with T=midpoint Histogram of Gradient (Those with G>5)
Segmentation with Multiple Variables: RGB/Multi-Channel data Cluster of point in 3D Original (Color) Facial tones RED channel
Region Based Segmentation: n R i= 1 i R are connected regions. i R R =, i j i ( ) P R = i ( ) i Rj j TRUE P R = FALSE
Region Growing: Select a start (seed) point Grow the point based on a certain property Connectivity should be considered. Seed point selection: Handy Highlighted point (Due to specific property)
Region Growing:
Region Growing (Example): Determine seed points to maximum gray level. Growing criteria: Gray level value difference (with respect to S.P.) less than a threshold. Each candidate pixel should be N 8 of region.
Region Growing: Seed Point High Value (255) Points
Multimodal Histogram Threshold
Splitting and Merging: Define a criteria for each region to be a valid segment. Split each region which is not satisfy the criteria. Merge two neighbor region based on criteria.
Splitting and Merging
Splitting-Merging Algorithm Criteria: 80% of all pixels satisfy: z m 2σ j i i
The Use of Motion in Segmentation: Spatial Domain Frequency Domain Spatial Domain: Main idea: Compare pixel by pixel (difference) d ij ( x, y) ( ) ( ) Dynamic Objec 1 f x, y, ti f x, y, t j > T = 0 O.W. Static Object t
Accumulative Difference Image (ADI): n (,, ) f ( x, y, t1 ) { } 1 Consider f x y t i and as reference i= frame. ADI compare reference frame with incoming frame. Increment counter of each pixel when a difference detected. ADI alternative: Absolute Positive Negative
Accumulative Difference Image (ADI): A P k k N k ( x, y) ( x, y) ( x, y) (, ) 1 (,, ) (,, k ) ( x, y) O.W. Ak 1 x y + f x y t1 f x y t > T = Ak 1 (, ) 1 (,, ) (,, k ) ( x, y) O.W. Pk 1 x y + f x y t1 f x y t > T = Pk 1 (, ) 1 (,, ) (,, k ) ( x, y) O.W. Nk 1 x y + f x y t1 f x y t < T = Nk 1
ADI Example Absolute Positive Negative
Establishing a Reference Images: Difference will erase static object: When a dynamic object move out completely from its position, the back ground in replaced.
Frequency Domain Methods: A Static/black background A Dynamic single pixel x y M 1 N 1 ( ) ( ) g t a f x y t e t K j2π a1x t, =,,, = 0,1,2,, 1 1 x= 0 y= 0 N 1 M 1 ( ) ( ) g t a f x y t e t K j2π a2 y t, =,,, = 0,1, 2,, 1 2 y= 0 x= 0 K 1 1 G u a g t a e u K x ( ) ( ) j2 πu1t / K, =,, = 0,1, 2,, 1 1 1 x 1 1 K t= 0 1 G u a g t a e u K 1 ( ) ( ) j2 πu2t / K, =,, = 0,1 y 2 1 y y 2 K t= 0 u = a v, u = a v 1 1 1 2 2 2, 2,, K 1
An Example:
Intensity Plot