Patent ID: 8280181

Claim:
A method for efficiently applying a filter to image data, comprising using a processor to: (a) identify a filter having a filter size and defining coefficient values for each pixel in the image data; (b) select a sub-matrix in the image data, the sub-matrix having a plurality of pixels and the sub-matrix corresponds to the filter size, the plurality of pixels in the sub-matrix without a center pixel is a number that can be represented in a 2 N form; (c) receive a coefficient value for each of the plurality of pixels, the coefficient value represented in 2 M form is defined based on a filter type; (d) calculate an average value of multiplications of pixel values with corresponding coefficient values of each of the plurality of pixels, wherein a multiplication of a pixel value and corresponding coefficient value is calculated by shifting a binary representation of the pixel value M bits, and a division to calculate the average value is performed by shifting a binary representation of a sum of the multiplications N bits; and (e) apply the average value to a center pixel in the sub-matrix.