SEGMENTATION ITERATIVE ALGORITHMS HOUGH TRANSFORM September 28, 1998 1 ITERATIVE ALGORITHMS ON IMAGES • Start with an initial image. • Apply a rule which transforms individual pixel grey values according to neighboring grey values. • At each step reapply this same rule. • After ‘alot’ of iterations the effect of this rule on the resulting image should be negligible and the iterations are said to converge. FOR k=0 to 999 IMAGE k+1 = F( IMAGE k) September 28, 1998 2 ITERATIVE ALGORITHMS ON IMAGES A general example of the form of an iterative rule at the (k+1)st iteration: I1 I2 I3 k+1 k k k k k k k k k I0 = F(I1 ,I2 ,I3 ,I4 ,I5 ,I6 ,I7 ,I8 ,I0 ) I4 I0 I6 I7 I5 I8 Local Image Neighborhood As a purely illustrative example, the convolution operation is an example of an iterative rule September 28, 1998 3 DISCRETE CONVOLUTION Template ‘Kernel’ T1 T2 T3 T4 T5 T6 3x3 Template T7 T8 T9 Image I = T1 x I1 + T2 x I2 + T3 x I3 + T4 x I4 + T5 x I5 + T6 x I6 + T7 x I7 + T8 x I8 + T9 x I9 September 28, 1998 I1 I2 I3 I4 I5 I6 I7 I8 I9 Local Image Neighborhood 4 ITERATIVE ALGORITHMS ON IMAGES Specific simple example of an iterative procedure on an image SUCCESSIVE CONVOLUTION AVERAGING (Caveat: This is an illustrative example and not necessarily useful) What Happens ?? ANSWER: Successive blurring at each iteration until eventually after a certain number of iterations the image becomes a constant grey value equal to the average of all pixels. September 28, 1998 5 ITERATIVE ALGORITHMS ON IMAGES SOMETHING MORE USEFUL 64 68 74 81 77 74 56 70 92 74 72 88 89 54 67 81 87 28 120 137 130 94 68 91 34 72 75 92 83 65 141 93 127 143 187 156 81 102 117 104 114 121 48 73 74 66 73 61 98 65 78 58 87 48 99 87 56 73 82 77 32 72 90 91 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 255 0 0 0 0 0 0 255 255 255 255 255 255 255 255 0 0 0 0 0 0 255 255 255 255 0 0 0 0 0 0 0 0 0 0 SIMULATED ANNEALING RELAXATION LABELING September 28, 1998 6 0 0 0 0 0 0 0 0 September 28, 1998 7 September 28, 1998 8 GRAYLEVEL HISTOGRAM # OF PIXELS PIXEL GRAYVALUE September 28, 1998 9 September 28, 1998 10 September 28, 1998 11 September 28, 1998 12 HOUGH ALGORITHM • Choose an analytic form f(x,y,a1,a2,…,an) and choose a range of values for parameters a1, a2, a3,….,an. • Create accumulator array A(a1,a2,…,an) which represents direct match of f(x,y,a1,a2,…,an) with binary image. • Local for local maximum which exceeds certain threshold. September 28, 1998 13 GENERALIZED HOUGH ALGORITHM R-TABLE f 1 f2 (Xc,Yc) f September 28, 1998 f n r1,r2,…,,rn r1,r2,…,,rn r1,r2,…,,rn 14