# US 2009/0274372 A1 · Method and apparatus for measuring blockiness in video images

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

- Number: US 2009/0274372 A1
- Document ID: US20090274372A1
- Status: Published application
- Kind: A1
- Application number: 12/427,179
- Filed: 2009-04-21
- Published: 2009-11-05
- Earliest claimed: 2008-04-24
- Assignees: Psytechnics Limited
- Inventors: Quan Huynh-Thu; Benjamin Pernot
- Web page: https://patentgrep.com/patent/US20090274372A1

## CPC

- H04N 17/00: Diagnosis, testing or measuring for television systems or their details
- G06T 7/0002: {Inspection of images, e.g. flaw detection}
- H04N 19/86: involving reduction of coding artifacts, e.g. of blockiness
- G06T 2207/10016: Video; Image sequence
- G06T 2207/30168: Image quality inspection
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

The present invention relates to an apparatus and method for processing images, in particular for determining the degree of blockiness in coded images. The invention comprises apparatus and methods for determining a degree of blockiness by performing the steps of: for each of a plurality of pixels determining a vertical gradient measure in dependence upon the values of said pixel and neighbouring pixels; comparing said vertical gradient measure with a vertical gradient threshold and defining said pixel as a potential horizontal boundary in dependence thereon determining a horizontal gradient measure in dependence upon the values of said pixel and neighbouring pixels; comparing said horizontal gradient measure with a horizontal gradient threshold and defining said pixel as a potential vertical boundary in dependence thereon; and determining said blocking artefact measure in dependence upon the vertical gradient measure of pixels defined as a potential horizontal boundary and upon the horizontal gradient measure of pixels defined as a potential vertical boundary. Method and apparatus for generating a quality measure in dependence upon the measure of blockiness are also provided.

## Claims

### Claim 1

A method of determining a blocking artefact measure relating to blocking artefacts in a digital image comprising a plurality of pixels each pixel having a value, the method comprising the steps of:
for each of a plurality of pixels
determining a vertical gradient measure in dependence upon the values of said pixel and neighbouring pixels;
comparing said vertical gradient measure with a vertical gradient threshold and defining said pixel as a potential horizontal boundary in dependence thereon determining a horizontal gradient measure in dependence upon the values of said pixel and neighbouring pixels;
comparing said horizontal gradient measure with a horizontal gradient threshold and defining said pixel as a potential vertical boundary in dependence thereon; and
determining said blocking artefact measure in dependence upon the vertical gradient measure of pixels defined as a potential horizontal boundary and upon the horizontal gradient measure of pixels defined as a potential vertical boundary.

### Claim 2 (depends on 1)

A method according to claim 1, in which said vertical gradient measure is determined in dependence upon the difference between an average of the values of said pixel and of horizontally neighbouring pixels and an average of corresponding vertically neighbouring pixels.

### Claim 3 (depends on 2)

A method according to claim 2, in which the vertical gradient measure is equal to the greater of
the difference between an average of the values of said pixel and three immediately neighbouring left pixels and an average of the values of four corresponding vertically neighbouring pixels; and
the difference between an average of the values of said pixel and three immediately neighbouring right pixels and an average of the values of four corresponding vertically neighbouring pixels.

### Claim 4 (depends on 2)

A method according to claim 2, in which the vertical gradient threshold is set in dependence upon the lower of the average of the values of said pixel and of horizontally neighbouring pixels and the average of corresponding vertically neighbouring pixels.

### Claim 5 (depends on 1)

A method according to claim 1 in which prior to determining said blocking artefact measure the method further comprises the steps of:
dividing the pixels into vertical sets comprising immediately neighbouring vertical pixels; and for each set
identifying a peak pixel having a peak value of the vertical gradient measures of said set;
determining an average gradient value for said set; defining all the pixels in the set as not being a potential horizontal boundary
excepting the peak pixel in the event that the peak gradient value is greater than a predetermined proportion of said average and
including the peak pixel in the event that the peak gradient value is not greater than a predetermined proportion of said average

### Claim 6 (depends on 5)

A method according to claim 5, in which prior to determining said blocking artefact measure the method further comprises the steps of:
identifying a plurality of immediately neighbouring horizontal pixels being defined as a potential horizontal boundary and being bordered by horizontal pixels not defined as a potential horizontal boundary; and
in the event that said plurality is fewer than a predetermined number of pixels, defining all said plurality of pixels as not being a potential horizontal boundary.

### Claim 7 (depends on 1)

A method according to claim 1, in which said horizontal gradient measure is determined in dependence upon the difference between an average of the values of said pixel and of vertically neighbouring pixels and an average of corresponding horizontally neighbouring pixels.

### Claim 8 (depends on 7)

A method according to claim 7, in which the horizontal gradient measure is equal to the greater of
the difference between an average of the values of said pixel and three immediately neighbouring higher pixels and an average of the values of four corresponding horizontally neighbouring pixels; and
the difference between an average of the values of said pixel and three immediately neighbouring lower pixels and an average of the values of four corresponding horizontally neighbouring pixels.

### Claim 9 (depends on 8)

A method according to claim 8, in which the horizontal gradient threshold is set in dependence upon the lower of the average of the values of said pixel and of vertically neighbouring pixels and the average of corresponding horizontally neighbouring pixels.

### Claim 10 (depends on 7)

A method according to claim 7 in which prior to determining said blocking artefact measure the method further comprises the steps of:
dividing the pixels into horizontal sets comprising immediately neighbouring horizontal pixels; and for each set
identifying a peak pixel having a peak value of the horizontal gradient measures of said set;
determining an average value for said set; defining all the pixels in the set as not being a potential vertical boundary
excepting the peak pixel in the event that the peak value is greater than a predetermined proportion of said average and
including the peak pixel in the event that the peak value is not greater than a predetermined proportion of said average

### Claim 11 (depends on 10)

A method according to claim 10, in which prior to determining said blocking artefact measure the method further comprises the steps of:
identifying a plurality of immediately neighbouring vertical pixels being defined as a potential vertical boundary and being bordered by vertical pixels not defined as a potential vertical boundary; and
in the event that said plurality is fewer than a predetermined number of pixels, defining all said plurality of pixels as not being a potential vertical boundary.

### Claim 12 (depends on 1)

A method according to claim 1, in which the blocking artefact measure is determined in dependence upon a sum of the maximum of the vertical gradient measure of pixels defined as a potential horizontal boundary and the horizontal gradient measure of pixels defined as a potential vertical boundary.

### Claim 13 (depends on 1)

A method according to claim 1, in which the blocking artefact measure is determined in dependence upon the total number of pixels defined as a potential horizontal boundary and pixels defined as a potential vertical boundary.

### Claim 14 (depends on 1)

A method according to claim 1, in which the pixel value is a luminance value.

### Claim 15 (depends on 1)

A method of image quality assessment comprising the step of generating a quality measure in dependence upon a blocking artefact measure determined according to claim 1.

### Claim 16 (depends on 1)

A method of video signal quality assessment comprising the step of generating a quality measure in dependence upon a plurality of blocking artefact measures relating to a plurality of image frames in the video signal, said blocking artefact measures being determined according to claim 1.

### Claim 17 (depends on 15)

A method according to claim 15 further comprising the step of storing the quality measure for visualisation and analysis.

### Claim 18 (depends on 1)

A computer readable medium carrying a computer program for implementing the method according to claim 1.

### Claim 19 (depends on 1)

A computer program for implementing the method according to claim 1.

### Claim 20 (depends on 15)

An apparatus for determining a measure of blocking artefacts in a digital image comprising:
a processor for generating a quality measure;
a store for storing said quality measure;
wherein the processor is arranged in operation to generate the quality measure in accordance with the method of claim 15.

### Claim 21 (depends on 16)

An apparatus for determining a measure of blocking artefacts in a video signal comprising:
a processor for generating a quality measure;
a store for storing said quality measure;
wherein the processor is arranged in operation to generate the quality measure in accordance with the method of claim 16.

### Claim 22 (depends on 20)

An apparatus according to claim 20, further comprising means (5) for analysis and visualisation of said quality measure.
