# US 8,280,181 B2 · Efficient filtering of image data

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 8,280,181 B2
- Document ID: US8280181B2
- Status: Granted
- Kind: B2
- Application number: 11/955,609
- Filed: 2007-12-13
- Published: 2009-06-18
- Granted: 2012-10-02
- Earliest claimed: 2007-12-13
- Assignees: Seiko Epson Corporation
- Inventors: Barinder Singh Rai
- Web page: https://patentgrep.com/patent/US8280181B2

## CPC

- G06T 5/20: using local operators
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

Systems and methods for efficiently applying a filter to image data are disclosed. For efficiently applying the filter, a filter type including coefficient values for each pixel in the image data is identified. A sub-matrix corresponding to the size of the filter is selected in the image data. The sub-matrix includes the plurality of pixels that can be represented in a 2N form. Each coefficient value is a number that is in a 2M form. The system calculates an average value of multiplications of pixel values with the corresponding coefficient values of each of the plurality of pixels. The 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. The average value is then applied to the center pixel. The process is repeated by selecting a new sub-matrix until the end of the image data is reached.

## Claims

### Claim 1

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 2N form;
(c) receive a coefficient value for each of the plurality of pixels, the coefficient value represented in 2M 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.

### Claim 2 (depends on 1)

The method as recited in claim 1, wherein if the number of the plurality of pixels is not in the 2N form, selectively removing one or more pixels from the plurality of pixels to enable a remaining number of a plurality of pixels to be capable of being represented in the 2N form.

### Claim 3 (depends on 2)

The method as recited in claim 2, further comprising selecting a new sub-matrix in the image data and repeating (c) to (e), and when an end of a row of the image data is reached, the new sub-matrix is selected from a beginning of the image data and one or more pixels below the previous sub-matrix.

### Claim 4 (depends on 3)

The method as recited in claim 3, wherein the center pixel is any pixel in the sub-matrix, and a relative position of the center pixel is consistent in successive selection of the sub-matrix.

### Claim 5 (depends on 1)

The method as recited in claim 1, wherein the center pixel is a group of adjacent pixels in the sub-matrix.

### Claim 6 (depends on 1)

The method as recited in claim 1, further comprises identifying an edge region within the sub-matrix.

### Claim 7 (depends on 6)

The method as recited in claim 6, further comprises selecting unfiltered data to avoid losing sharpness of the edge region.

### Claim 8 (depends on 1)

The method as recited in claim 1, further comprising:
swapping row numbers of rows above a center row in the sub-matrix with row numbers of rows below the center row, wherein the swapping enables processing pixel values of pixels in a peripheral region of the image data.

### Claim 9 (depends on 1)

The method as recited in claim 1, further comprising:
swapping column numbers of columns on a left side of a center column in the sub-matrix with column numbers of columns on a right side of the center column, wherein the swapping of the column numbers results in a first pixel in top left hand corner of the sub-matrix being the center pixel.

### Claim 10

A filter circuit for filtering image data, comprising:
a memory for storing a portion of the image data;
coefficient logic configured to determine a filter coefficient to be applied to a reference pixel in a sub-matrix of the image data, the coefficient logic includes a register array to store a plurality of filter coefficients, the register array further includes data representing a filter type associated with each register in the register array, wherein the filter coefficients are numbers that can be represented in a 2M form;
First In First Out (FIFO) logic to retrieve portions of the image data from the memory; and
filter logic configured to calculate an average of multiplications of pixel values and corresponding coefficients, the filter logic including sum logic to calculate a sum of numbers, multiplication logic to multiply a pixel value by a corresponding coefficient value through a bit shift operation, and division logic to divide the sum of numbers by a number of pixels in the sub-matrix, wherein the number of pixels in the sub-matrix being capable of being represented in a 2N form.

### Claim 11 (depends on 10)

The filter circuit of claim 10, wherein the filter logic further including logic to selectively remove one or more pixels from the sub-matrix, if the number of pixels in the sub-matrix without the center pixel is not represented in the 2N form, so that the number of pixels in the sub-matrix without the center pixel is in the 2N form.

### Claim 12 (depends on 11)

The filter circuit of claim 11, wherein the selective removal includes removing pixels from bordering regions of the sub-matrix.

### Claim 13 (depends on 11)

The filter circuit of claim 11, wherein the selective removal includes a combination of removing pixels from bordering regions and increasing a size of the center pixel.

### Claim 14 (depends on 10)

The filter circuit of claim 10, wherein the filter logic is incorporated in a graphics processor.

### Claim 15

A method of efficiently applying a filter to image data, comprising using a processor to:
identify a filter having a filter size to filter the image data;
reduce a number of pixel positions within the filter, the number of pixel positions selected from different concentric rings of the filter; and
apply the filter with the reduced number of pixel positions to the image data, wherein the number of pixel positions is selected to reduce the filter size to a number that can be represented in a 2N form to enable use of bit shift operations for multiplication and division.

### Claim 16 (depends on 15)

The method as recited in claim 15, wherein the applying the filter includes,
selecting a sub-matrix in the image data, the sub-matrix having a plurality of pixels;
receiving a coefficient value for each of the plurality of pixels;
calculating an average value of multiplication of pixel values of each of the plurality of pixels with the corresponding coefficient value of each of the plurality of pixels; and
applying the average value of a center pixel in the sub-matrix.

### Claim 17 (depends on 16)

The method as recited in claim 16, wherein the coefficient values are defined individually for a combination of each of the plurality of pixels and a filter type.

### Claim 18 (depends on 16)

The method as recited in claim 16, wherein a same coefficient value is defined for all pixels in the plurality of pixels, for a filter type.

### Claim 19 (depends on 15)

The method as recited in claim 15, further comprising:
swapping row numbers of rows above a center row in the sub-matrix with row numbers of rows below the center row, wherein the swapping enables processing pixel values of pixels in a peripheral region of the image data.

### Claim 20 (depends on 16)

The method as recited in claim 16, wherein selecting the sub-matrix further comprises identifying an edge region within the sub-matrix.
