# US 11,308,300 B2 · Colour correction

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

- Number: US 11,308,300 B2
- Document ID: US11308300B2
- Status: Granted
- Kind: B2
- Application number: 16/964,946
- Filed: 2019-01-24
- Published: 2021-02-11
- Granted: 2022-04-19
- Earliest claimed: 2018-01-26
- Assignees: Universitat De Barcelona
- Applicants: Universitat De Barcelona
- Inventors: Ismael Benito Altamirano; Olga Casals Guillen; Cristian Fàbrega Gallego; Juan Daniel Prades García; Andreas Hans Wilhelm Waag
- Web page: https://patentgrep.com/patent/US11308300B2

## CPC

- G06K 7/1417: {2D bar codes}
- H04N 1/6033: {using test pattern analysis (H04N1/6055 takes precedence)}
- G01J 3/0264: {Electrical interface; User interface}
- G01J 3/52: using colour charts
- G06K 7/1413: {1D bar codes}
- G06K 19/06028: {using bar codes}
- G06K 19/06037: {multi-dimensional coding}
- G06T 5/40: using histogram techniques
- G06T 5/90: Dynamic range modification of images or parts thereof
- G06T 11/10: Texturing; Colouring; Generation of textures or colours (retouching, inpainting or scratch removal G06T5/77)
- H04N 1/32144: {embedded in the image data, i.e. enclosed or integrated in the image, e.g. watermark, super-imposed logo or stamp}
- H04N 9/646: {for image enhancement, e.g. vertical detail restoration, cross-colour elimination, contour correction, chrominance trapping filters}
- G01J 3/524: {Calibration of colorimeters}
- G06K: GRAPHICAL DATA READING (image or video recognition or understanding G06V); PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION
- G01J: MEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY (light sources F21, H01J, H01K, H05B; investigating properties of materials by optical means G01N)
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

Methods are provided for generating a barcode with embedded colour palette for colour correction of a captured image in digital format. These methods comprise: generating an initial barcode according to a barcode standard and formed by light colour and dark colour encoding units jointly encoding a reference to storage location; splitting a predefined set of reference colours into reference dark and reference light colours depending on contrast threshold; modifying the initial barcode by replacing dark colour encoding units by reference dark colours and light colour encoding units by reference light colours; and updating the storage location with data representing the reference colours included in the modified barcode and positions of said reference colours in the modified barcode. Methods are provided for colour correction based on a barcode determined by said methods. Computer programs and systems are provided which are suitable for performing said barcode generation methods and colour correction methods.

## Claims

### Claim 1

A method for generating a barcode with an embedded colour palette for colour correction of a captured image in digital format, the method comprising:
generating an initial barcode according to a barcode standard or pre-known specification, the initial barcode being formed by a plurality of encoding units each having a predetermined position in the barcode, and the plurality of encoding units including light colour encoding units and dark colour encoding units jointly encoding a link to a storage location for storing data of the colour palette embedded in the barcode;
splitting a predefined set of reference colours for colour correction into a set of reference dark colours and a set of reference light colours depending on a first contrast threshold;
according to one or more predefined replacement criteria, modifying the initial barcode by replacing a respective one or more of the dark colour encoding units by one of the reference dark colours, and replacing a respective one or more of the light colour encoding units by one of the reference light colours;
accessing the storage location through the link to the storage location and updating the storage location with data representing the reference colours included in the modified barcode and corresponding positions in the barcode attributed to said reference colours in the modified barcode.

### Claim 2 (depends on 1)

A method according to claim 1, wherein the predefined set of reference colours correspond to colours of a general purpose colour palette for colour correction.

### Claim 3 (depends on 1)

A method according to claim 1, wherein the first contrast threshold is defined in terms of colour luminance, colour brightness, grayscale value or any scalar value of colour information accounting a difference in luminosity between colours.

### Claim 4 (depends on 1)

A method according to claim 1, wherein the one or more predefined replacement criteria comprise a random selection of dark colour and light colour encoding units to be replaced by corresponding reference dark and light colours.

### Claim 5 (depends on 1)

A method according to claim 1, further comprising
generating a histogram of a set of colours including the dark and light colours of the initial barcode and the predefined reference colours; and
determining an average value of the histogram to be used as the first contrast threshold.

### Claim 6 (depends on 1)

A method according to claim 1, wherein the barcode standard or pre-known specification includes an error correction mechanism such that any barcode determined according to the standard or pre-known specification is globally decodable as long as a ratio of individually decodable encoding units in said barcode is above a predefined ratio of encoding units; and wherein
the first contrast threshold is predefined or adjusted such that the ratio of individually decodable encoding units is above the predefined ratio of encoding units.

### Claim 7 (depends on 1)

A method for colour correction of a captured image included in a captured scene in digital format, the captured scene resulting from a capture of the scene comprising the image and a barcode with an embedded colour palette generated by performing a method according to claim 1, the image including real image colours and the barcode with the embedded colour palette including real reference colours; wherein
the captured scene comprises the captured image and the captured barcode with the embedded colour palette, the captured image including apparent image colours as seen in the captured image, and the captured barcode with the embedded colour palette including apparent reference colours as seen in the captured barcode with the embedded colour palette; and wherein
the method comprises:
identifying the captured barcode with the embedded colour palette in the captured scene;
decoding the captured barcode with the embedded colour palette according to the barcode standard or pre-known specification used to generate the barcode with the embedded colour palette, so as to determine the corresponding link to storage location where data of the colour palette embedded in the barcode is stored;
accessing the storage location through the determined corresponding link to the storage location, so as to retrieve the real reference colours in the barcode with the embedded colour palette and corresponding positions of the real reference colours in the barcode with the embedded colour palette;
identifying the apparent reference colours in the captured barcode with the embedded colour palette, based on the retrieved positions of the real reference colours in the barcode with the embedded colour palette;
determining, for each of at least some of the real reference colours, a colour deviation between the real reference colour and the corresponding apparent reference colour; and
performing colour correction of the captured image by adjusting the apparent image colours depending on the determined colour deviations between real and apparent reference colours.

### Claim 8 (depends on 7)

A method according to claim 7, wherein decoding the captured barcode with the embedded colour palette comprises:
binarizing the captured barcode with the embedded colour palette by converting the apparent reference colours as seen in the captured barcode with the embedded colour palette to dark or light colours depending on whether corresponding apparent reference colour is respectively below or above a second contrast threshold; and
decoding the binarized barcode with the embedded colour palette according to the barcode standard or pre-known specification.

### Claim 9 (depends on 8)

A method according to claim 8, further comprising verifying whether the decoding of the binarized barcode with the embedded colour palette produces an erroneous condition; and wherein
responsive to the erroneous condition, a loop is iteratively performed according to one or more predefined iteration criteria, each iteration of the loop comprising
varying the second contrast threshold;
binarizing the captured barcode with the embedded colour palette taking into account said varied second contrast threshold; and
decoding said binarized captured barcode with the embedded colour palette.

### Claim 10 (depends on 9)

A method according to claim 9, wherein the one or more predefined iteration criteria comprise performing iterations of the loop until the erroneous condition is not produced by the decoding of the binarized barcode with the embedded colour palette in a corresponding iteration.

### Claim 11 (depends on 9)

A method according to claim 9, wherein the erroneous condition comprises the production, by the decoding of the binarized barcode with the embedded colour palette, of an output not satisfying a predefined format that any link to storage location is expected to satisfy.

### Claim 12 (depends on 9)

A method according to claim 9, wherein the erroneous condition comprises the production, by the decoding of the binarized barcode with the embedded colour palette, of a decoding error according to the barcode standard or pre-known specification.

### Claim 13 (depends on 7)

A method according to claim 7, wherein the barcode with the embedded colour palette comprises one or more replicas of one or more of the real reference colours; and wherein determining the colour deviations between real and apparent reference colours comprises
determining, for each of at least some of the replicated real reference colours, an average of the apparent reference colours corresponding to the replicated real reference colour, and determining corresponding colour deviation between the averaged apparent reference colours and the replicated real reference colour; or
determining, for each of at least some of the replicated real reference colours, a colour deviation in the reference colour space between the replicated real reference colour and each of the apparent reference colours corresponding to the replicated real reference colour.

### Claim 14 (depends on 1)

A method of generating an environmental or physical condition sensor, the method comprising: providing a barcode with an embedded colour palette generated by performing a method according to claim 1, and a colour variable unit including a material or substance having a colour changeable depending on the environmental or physical condition.

### Claim 15 (depends on 1)

A method according to claim 1, further comprising determining the predefined set of reference colours, said determination comprising
determining a range of colours that are representative of a type of images to be captured and colour-corrected;
determining salient colours from the range of colours and determining said salient colours as the predefined set of reference colours.

### Claim 16 (depends on 15)

A method according to claim 15, wherein determining the range of colours comprises colour sampling a plurality of example images that are representative of the type of images to be captured and colour-corrected.

### Claim 17 (depends on 15)

A method according to claim 15, wherein determining the salient colours from the range of colours comprises clustering the colours of the range of colours.

### Claim 18 (depends on 1)

A method according to claim 1, wherein splitting the predefined set of reference colours comprises:
identifying reference colours with excessive proximity to the first contrast threshold depending on a predefined proximity threshold that when exceeded by corresponding reference colour, said reference colour is assumed as having excessive proximity to the first contrast threshold; and
distributing at least some of said reference colours with excessive proximity to the first contrast threshold randomly between the set of reference dark colours and the set of reference light colours.

### Claim 19 (depends on 1)

A method according to claim 1, wherein the barcode standard or pre-known specification is configured to generate a Quick Response (QR) barcode.

### Claim 20 (depends on 1)

A computing system for generating a barcode with an embedded colour palette for colour correction of a captured image in digital format, the computing system comprising a non-transitory memory and a processor, the non-transitory memory storing instructions which, when executed by the processor, perform a method according to claim 1 to generate a barcode with an embedded colour palette for colour correction.
