Patent ID: 8031978

Claim:
A method, for execution by a processor, for applying an edge detection filter to an image comprising the steps of: a. providing an image comprised of rows and columns of pixels, each pixel associated with a respective pixel value; b. providing an edge detection filter comprising: 2N+1 rows and 2M+1 columns, wherein N and M are integers, said 2N+1 rows and 2M+1 columns comprising at least three rows and at least five columns or at least five rows and at least three columns; a first set of zero coefficients extending along a direction traversing said filter through a center position to form a first side and a second side; a second set of coefficients equal to 1 extending away from said direction on said first side; and a third set of coefficients equal to −1 extending away from said direction on said second side; c. positioning said edge detection filter at an initial position, the initial position comprising an origin of a first direction and an origin of a second direction within said image; d. summing the pixel values of image pixels corresponding to each of columns 2M+1 to M+2 in row 1 of the edge detection filter and adding the negative of pixel values of image pixels corresponding to each of columns M to 1 in row 1 of the edge detection filter to calculate a row value for row 1 of the edge detection filter; e. repeating step d to calculate row values for rows 2 to 2N+1 of the edge detection filter and storing the row value for each of rows 2N+1 to 1 in a respective one of contiguous memory locations 2N+1 through 1 ; f. summing the row values in each of memory locations 2N+1 through 1 to produce a filter output and storing said filter output in a memory storage device; g. incrementing said position of said edge detection filter in the first direction, wherein the incremented position is associated with pixels of a next row of said image; h. shifting the row value stored in memory location X to memory location X−1, wherein X comprises a series of values from 2N+1 through 1 ; i. summing the pixel values of image pixels corresponding to each of columns 2M+1 to M+2 in said next row and adding the negative of pixel values of image pixels corresponding to each of columns M to 1 in said next row to produce a next row value; j. storing the next row value in memory location 2N+1; k. calculating a new filter output by adding the row value stored in memory location 2N+1 to and subtracting the value stored in memory location 0 from the filter output stored in the memory storage device; l. storing said new filter output in said memory storage device; m. repeating steps g through l until a boundary of said image is reached; n. incrementing said position of said edge detection filter in the second direction and resetting said position to said first direction origin of said image; and o. repeating steps d through n until a boundary of said image is reached.