Extra Notes on Vision from Ginsberg, "Essentials of AI", Chapter 16 Ballard and Brown, "Computer Vision" - edge detection - consider simple templates [FigG16.4, p329] - corresponds to [FigBB3.10, p77] - see others there also - edge(i,j) = sqrt([I(i+1,j+1) - I(i,j)]^2 + [I(i+1,j) - I(i,j+1)]^2) - general - given gradients - DX: measures intensity difference in x direction - DY: measures intensity difference in y direction - mag(x,y) = sqrt(DX^2 + DY^2) - orient(x,y) = arctan(DY,DX) - edge completion - extend high-confidence edge pieces - extend zero regions - region boundaries are edges - Hough (pron. huff) transform - given model of curve - find location (if any) of such a curve in image - general alg - convert from image intensity space to model parameter space - H(model parms) = Sum({(i,j) satisfying model parms}) mag(i,j) - limit resolution of parameter space based on image resolution and size - look for maxima in parameter space - e.g., lines [AlgBB4.1, p123] - point (i,j) is on line with slope m and y-intercept if - j = mi + c - transform to parameter space h(m,c) - h(m,c) = Sum({(i,j)|j=mi+c}) mag(i,j) - maxima in h(m,c) indicate lines - h(m,c) ~= number of image points on line - could remember which points for each (m,c) - extract end points of line - e.g., circles - point (i,j) is on circle at (x,y) with radius r if - (i - x)^2 + (j - y)^2 = r^2 - transform to parameter space h(x,y,r) - h(x,y,r) = Sum({(i,j)|(i-x)^2+(j-y)^2=r^2}) mag(i,j) - maxima in h(x,y,r) indicate circles - above some threshold - given edge orientation as well (i,j,theta) - apply further constraint (j-y)/r = sin(theta - 90) = -cos(theta) - see [FigG16.8, p333]