# US 2019/0320170 A1 · Image encoding and decoding method and apparatus therefor

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

- Number: US 2019/0320170 A1
- Document ID: US20190320170A1
- Status: Published application
- Kind: A1
- Application number: 16/341,002
- Filed: 2017-09-29
- Published: 2019-10-17
- Earliest claimed: 2016-10-11
- Assignees: LG Electronics Inc.
- Applicants: LG Electronics Inc.
- Inventors: Hyeongmoon JANG; Junghak NAM
- Web page: https://patentgrep.com/patent/US20190320170A1

## CPC

- H04N 19/117: Filters, e.g. for pre-processing or post-processing (sub-band filter banks H04N19/635)
- H04N 19/14: Coding unit complexity, e.g. amount of activity or edge presence estimation (H04N19/146 takes precedence)
- H04N 19/182: the unit being a pixel
- H04N 19/70: characterised by syntax aspects related to video coding, e.g. related to compression standards
- H04N 19/80: Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation (H04N19/635, H04N19/86 take precedence)
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

Disclosed in the present invention are an image processing method and an apparatus therefor. Specifically, the image processing method can comprise the steps of: extracting encoded image data from a bitstream received from an encoder; decoding the encoded image data so as to generate a reconstructed image; determining a category of a current pixel by comparing a pixel value of the current pixel in the reconstructed image with pixel values of neighboring pixels of the current pixel; generating an offset applied to the current pixel on the basis of a difference value between pixel values of pixels, determined according to the category, among the neighboring pixels and the pixel value of the current pixel; and compensating for the current pixel by adding the offset to the pixel value of the current pixel.

## Claims

### Claim 1

A method for processing an image, the method comprising:
extracting encoded image data from a bit stream received from an encoder;
decoding the encoded image data to generate a reconstructed image;
determining a category of the current pixel by comparing a pixel value of a current pixel in the reconstructed image with magnitudes of pixel values of neighboring pixels of the current pixel;
determining an offset to be applied to the current pixel on the basis of difference values between pixel values of pixels determined according to the category, among the neighboring pixels, and the pixel value of the current pixel; and
compensating for the current pixel by adding the offset to the pixel value of the current pixel to compensate for the current pixel.

### Claim 2 (depends on 1)

The method of claim 1, wherein
in the step of determining of the category, the category of the current pixel is determined using the number of neighboring pixels having a pixel value greater than the current pixel or the number of neighboring pixels having a pixel value smaller than the current pixel.

### Claim 3 (depends on 1)

The method of claim 1, wherein
the neighboring pixels of the current pixel include at least one of pixels adjacent to the left side, upper side, right side, or lower side of the current pixel.

### Claim 4 (depends on 1)

The method of claim 1, wherein
the neighboring pixels of the current pixel include at least one of the left side, upper side, right side, lower side, upper left side, lower left side, lower right side, or upper right side of the current pixel.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
parsing a corresponding offset for each class of the category from the bit stream, wherein the category includes a plurality of classes.

### Claim 6 (depends on 5)

The method of claim 5, wherein
The step of determining of the offset comprising:
calculating a class index indicating a specific class in the category of the current pixel using the sum of difference values between pixel values of pixels determined according to the category and the pixel value of the current pixel; and
determining an offset corresponding to a class identified by the class index, as an offset to be applied to the current pixel.

### Claim 7 (depends on 6)

The method of claim 6, wherein
the determining of an offset further comprising:
performing normalization on the class index on the basis of a normalization parameter received from the encoder.

### Claim 8 (depends on 7)

The method of claim 7, wherein
the normalization parameter is transmitted in a slice header, a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS).

### Claim 9 (depends on 1)

The method of claim 1, wherein
the determining of an offset further comprising:
determining an offset to be applied to the current pixel using an average of the difference values between the pixel values of the pixels determined according to the category and the pixel value of the current pixel.

### Claim 10 (depends on 1)

The method of claim 1, further comprising:
performing sample adaptive offset (SAO) on the current pixel when the category of the current pixel is included in a group to which the SAO is applied.

### Claim 11

A device for processing an image, the device comprising:
an image data extracting unit extracting encoded image data from a bit stream received from an encoder;
a reconstructed image generating unit decoding the encoded image data to generate a reconstructed image;
a category determining unit determining a category of the current pixel by comparing a pixel value of a current pixel in the reconstructed image with magnitudes of pixel values of neighboring pixels of the current pixel;
an offset determining unit determining an offset to be applied to the current pixel on the basis of difference values between pixel values of pixels determined according to the category, among the neighboring pixels, and the pixel value of the current pixel; and
a pixel compensating unit compensating for the current pixel by adding the offset to the pixel value of the current pixel.
