# US 12,112,509 B2 · Edge enhancement filter

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

- Number: US 12,112,509 B2
- Document ID: US12112509B2
- Status: Granted
- Kind: B2
- Application number: 18/153,408
- Filed: 2023-01-12
- Published: 2023-05-11
- Granted: 2024-10-08
- Earliest claimed: 2020-04-17
- Assignees: Tencent America LLC
- Applicants: Tencent America LLC
- Inventors: Yixin Du; Xin Zhao; Shan Liu
- Web page: https://patentgrep.com/patent/US12112509B2

## CPC

- G06T 9/00: Image coding (bandwidth or redundancy reduction for static pictures H04N1/41; coding or decoding of static colour picture signals H04N1/64; methods or arrangements for coding, decoding, compressing or decompressing digital video signals H04N19/00)
- H04N 19/85: using pre-processing or post-processing specially adapted for video compression
- G06T 7/13: Edge detection
- G06T 7/174: involving the use of two or more images
- 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/176: the region being a block, e.g. a macroblock
- H04N 19/182: the unit being a pixel
- H04N 19/186: the unit being a colour or a chrominance component
- H04N 19/44: Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
- H04N 19/82: involving filtering within a prediction loop
- G06T 2207/10016: Video; Image sequence
- G06T 2207/10024: Color image
- H04N 19/70: characterised by syntax aspects related to video coding, e.g. related to compression standards
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A method, computer program, and computer system is provided for coding video data. Video data is received, and an edge present within a sample of the received video data is detected. A gradient value corresponding to a direction associated with the detected edge is calculated. The video data is decoded based on the calculated gradient.

## Claims

### Claim 1

A method for video coding, executable by a processor, comprising:
receiving video data;
detecting an edge present within a sample of the received video data;
calculating a gradient value corresponding to a direction associated with the detected edge;
adjusting the sample based on the calculated gradient value and a location of the sample within the received video data, the adjusting comprising:
deriving one or more offset values based on the direction associated with the detected edge and the calculated gradient value,
adding the one or more derived offset values to the sample of the received video data based on the location of the sample in the received video data, and
clipping each of the one or more derived offset values that are greater than a maximum value and less than a minimum value; and
decoding the video data based on the calculated gradient value.

### Claim 2 (depends on 1)

The method of claim 1, wherein the edge is detected based on one or more from among a Sobel edge detector, a Canny edge detector, and a direction search based on comparing a block of the received video data to one or more predetermined edge directions.

### Claim 3 (depends on 1)

The method of claim 1, wherein the edge detection is performed at one from among a pixel-level and a block-level based on a size associated with the sample of the received video data.

### Claim 4 (depends on 1)

The method of claim 1, wherein the gradient value specifies an increase or decrease of sample values associated with the detected edge.

### Claim 5 (depends on 4)

The method of claim 4, wherein the gradient value is computed in a direction orthogonal to the direction associated with the detected edge.

### Claim 6 (depends on 4)

The method of claim 4, wherein the gradient value is computed by summing differences of pairs of sample values along the detected edge.

### Claim 7 (depends on 1)

The method of claim 1, wherein the one or more derived offset values are added to a color component different from a color component on which edge detection is applied.

### Claim 8 (depends on 1)

The method of claim 1, wherein the one or more derived offset values are added to a color component that is the same as a color component on which edge detection is applied.

### Claim 9 (depends on 1)

The method of claim 1, wherein the derived one or more offset values are added to the sample based on a determination the sample is located on the detected edge.

### Claim 10 (depends on 1)

The method of claim 1, wherein a look-up table containing the one or more offset values is pre-defined based on the detected edge and calculated gradient value.

### Claim 11 (depends on 1)

The method of claim 1, wherein the one or more offset values are derived based on the direction of the detected edge and a sign of the gradient value.

### Claim 12

A computer system for video coding, the computer system comprising:
one or more computer-readable non-transitory storage media configured to store computer program code; and
one or more computer processors configured to access said computer program code and operate as instructed by said computer program code, said computer program code including:
receiving code configured to cause the one or more computer processors to receive video data;
detecting code configured to cause the one or more computer processors to detect an edge present within a sample of the received video data;
calculating code configured to cause the one or more computer processors to calculate a gradient value corresponding to a direction associated with the detected edge;
adjusting code configured to cause the one or more computer processors to adjust the sample based on the calculated gradient value and a location of the sample within the received video data, the adjusting code further configured to cause the one or more computer processor to:
derive one or more offset values based on the direction associated with the detected edge and the calculated gradient value,
add the one or more derived offset values to the sample of the received video data based on the location of the sample in the received video data, and
clip each of the one or more derived offset values that are greater than a maximum value and less than a minimum value; and
decoding code configured to cause the one or more computer processors to decode the video data based on the calculated gradient value.

### Claim 13 (depends on 12)

The computer system of claim 12, wherein the edge is detected based on one or more from among a Sobel edge detector, a Canny edge detector, and a direction search based on comparing a block of the received video data to one or more predetermined edge directions.

### Claim 14 (depends on 12)

The computer system of claim 12, wherein the edge detection is performed at one from among a pixel-level and a block-level based on a size associated with the sample of the received video data.

### Claim 15 (depends on 12)

The computer system according to claim 12, wherein the derived one or more offset values are added to the sample based on a determination the sample is located on the detected edge.

### Claim 16

A non-transitory computer readable medium having stored thereon a computer program for video coding, the computer program configured to cause one or more computer processors to:
receive video data;
detect an edge present within a sample of the received video data;
calculate a gradient value corresponding to a direction associated with the detected edge;
adjust the sample based on the calculated gradient value and a location of the sample within the received video data, the adjustment of the samples further comprising:
deriving one or more offset values based on the direction associated with the detected edge and the calculated gradient value,
adding the one or more derived offset values to the sample of the received video data based on the location of the sample in the received video data, and
clipping each of the one or more derived offset values that are greater than a maximum value and less than a minimum value; and
decode the video data based on the calculated gradient value.

### Claim 17 (depends on 16)

The non-transitory computer readable medium according to claim 16, wherein the derived one or more offset values are added to the sample based on a determination the sample is located on the detected edge.
