# US 2019/0171853 A1 · Local tone mapping for symbol reading

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

- Number: US 2019/0171853 A1
- Document ID: US20190171853A1
- Status: Published application
- Kind: A1
- Application number: 16/208,317
- Filed: 2018-12-03
- Published: 2019-06-06
- Earliest claimed: 2017-12-06
- Assignees: Cognex Corporation
- Applicants: Cognex Corporation
- Inventors: Chen Gao; Ivan Bachelder
- Web page: https://patentgrep.com/patent/US20190171853A1

## CPC

- G06K 7/146: {the method including quality enhancement steps}
- G06K 7/10712: {Fixed beam scanning}
- G06K 7/1413: {1D bar codes}
- G06T 5/90: Dynamic range modification of images or parts thereof
- G06T 5/92: based on global image properties
- G06T 5/94: based on local image properties, e.g. for local contrast enhancement
- G06V 10/225: {based on a marking or identifier characterising the area}
- H04N 1/407: Control or modification of tonal gradation or of extreme levels, e.g. background level
- H04N 1/4074: {using histograms}
- G06T 2207/20208: High dynamic range [HDR] image processing
- G06T 2207/30204: Marker
- G06K: GRAPHICAL DATA READING (image or video recognition or understanding G06V); PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

Embodiments related to local tone mapping for symbol reading. A local pixel neighborhood metric is determined for at least one raw pixel in a region-of-interest, which identifies on one or more raw pixels near the at least one raw pixel. A local mapping function is determined for the at least one raw pixel that maps the value of the raw pixel to a mapped pixel value with a mapped bit depth that is smaller than the bit depth associated with the raw image. The local mapping function is based on a value of at least one other raw pixel near the at least one raw pixel within the local pixel neighborhood metric, and at least one parameter determined based on the raw image. A mapped image is computed for the region-of-interest by applying the local mapping function to the raw image.

## Claims

### Claim 1

A method for reading a barcode symbol, the method comprising:
acquiring a raw image of a barcode symbol, where each pixel of the raw image has a digital value having a raw bit depth;
identifying a region-of-interest of the raw image;
determining a local pixel neighborhood metric for at least one raw pixel in the region-of-interest based on an attribute of a symbology of the barcode in the raw image, wherein the local pixel neighborhood metric identifies on one or more raw pixels near the at least one raw pixel;
determining a local mapping function for the at least one raw pixel that maps the value of the raw pixel to a mapped pixel value with a mapped bit depth that is smaller than the bit depth associated with the raw image, wherein the local mapping function is based on:
a value of a set of raw pixels near the at least one raw pixel within the local pixel neighborhood metric; and
at least one parameter determined based on the raw image;
computing a mapped image for the region-of-interest, comprising determining a pixel value for at least one mapped pixel value in the mapped image by applying the local mapping function to the raw pixel value in the raw image to generate the mapped pixel value; and
decoding the barcode symbol using the mapped image.

### Claim 2 (depends on 1)

The method of claim 1, wherein the intensity value is determined by applying a Gaussian kernel with a kernel size determined based on the local pixel neighborhood metric, and computing the mapped image for the region of interest comprises applying the local mapping function, including the Gaussian kernel with the determined kernel size, to the raw pixel value in the raw image to generate the mapped pixel value.

### Claim 3 (depends on 1)

The method of claim 1, wherein identifying a region-of-interest comprises:
identifying a region within the raw image containing the barcode symbol;
identifying the entire raw image;
identifying a predetermined region in the raw image;
or some combination thereof.

### Claim 4 (depends on 1)

The method of claim 1, wherein the method is configured so that the method can be executed by an FPGA.

### Claim 5 (depends on 1)

The method of claim 1, wherein the local mapping function depends on pixel values of all raw pixel values within the local pixel neighborhood metric.

### Claim 6 (depends on 5)

The method of claim 5, where the local mapping function is a Reinhard operator.

### Claim 7 (depends on 1)

The method of claim 1, wherein computing the mapped image comprises applying a different mapping function to each raw pixel in the region-of-interest.

### Claim 8 (depends on 1)

The method of claim 1, wherein the attribute comprises at least a minimum size, a maximum size, or both.

### Claim 9 (depends on 8)

The method of claim 8, wherein the attribute comprises one or more of a module size range, a feature size range, a symbol width range, or a symbol height range.

### Claim 10 (depends on 1)

The method of claim 1, wherein the attribute is determined based on a second image of a barcode symbol.

### Claim 11 (depends on 10)

The method of claim 10, wherein the second image is a previous image acquired of the same barcode symbol, an image acquired of a different barcode symbol during a tuning phase, or some combination thereof.

### Claim 12 (depends on 1)

The method of claim 1, wherein the at least one parameter is determined based on a second image of a barcode symbol.

### Claim 13 (depends on 12)

The method of claim 12, wherein the second image is a previous image acquired of the same barcode symbol, an image acquired of a different barcode symbol, during a tuning phase, or some combination thereof.

### Claim 14 (depends on 1)

The method of claim 1, further comprising applying a global tone mapping technique to a pixel value for at least one mapped pixel value in the mapped image by applying a global mapping function to the raw pixel value in the raw image to generate the mapped pixel value.

### Claim 15 (depends on 1)

The method of claim 1, further comprising tuning the global mapping function, the local mapping function, or both, for the image.

### Claim 16 (depends on 1)

The method of claim 1, further comprising determining the value, comprising:
determining an intensity of the set of raw pixels; and
determining a contrast based on intensity values of each pixel in the set of pixels.

### Claim 17 (depends on 16)

The method of claim 16, wherein determining the intensity of the set of raw pixels comprises determining a weighted average of the intensity values of each pixel in the set of pixels.

### Claim 18 (depends on 16)

The method of claim 16, wherein determining the contrast comprises determining a weighted standard deviation of the intensity values of each pixel in the set of pixels.

### Claim 19

An apparatus for reading a barcode symbol, the apparatus comprising a processor in communication with memory, the processor being configured to execute instructions stored in the memory that cause the processor to:
acquire a raw image of a barcode symbol, where each pixel of the raw image has a digital value having a raw bit depth;
identify a region-of-interest of the raw image;
determine a local pixel neighborhood metric for at least one raw pixel in the region-of-interest based on an attribute of a symbology of the barcode in the raw image, wherein the local pixel neighborhood metric identifies on one or more raw pixels near the at least one raw pixel;
determine a local mapping function for the at least one raw pixel that maps the value of the raw pixel to a mapped pixel value with a mapped bit depth that is smaller than the bit depth associated with the raw image, wherein the local mapping function is based on:
a value of a set of raw pixels near the at least one raw pixel within the local pixel neighborhood metric; and
at least one parameter determined based on the raw image;
compute a mapped image for the region-of-interest, comprising determining a pixel value for at least one mapped pixel value in the mapped image by applying the local mapping function to the raw pixel value in the raw image to generate the mapped pixel value; and
decode the barcode symbol using the mapped image.

### Claim 20

At least one non-transitory computer-readable storage medium storing processor-executable instructions that, when executed by at least one computer hardware processor, cause the at least one computer hardware processor to perform the acts of:
acquiring a raw image of a barcode symbol, where each pixel of the raw image has a digital value having a raw bit depth;
identifying a region-of-interest of the raw image;
determining a local pixel neighborhood metric for at least one raw pixel in the region-of-interest based on an attribute of a symbology of the barcode in the raw image, wherein the local pixel neighborhood metric identifies on one or more raw pixels near the at least one raw pixel;
determining a local mapping function for the at least one raw pixel that maps the value of the raw pixel to a mapped pixel value with a mapped bit depth that is smaller than the bit depth associated with the raw image, wherein the local mapping function is based on:
a value of a set of raw pixels near the at least one raw pixel within the local pixel neighborhood metric; and
at least one parameter determined based on the raw image;
computing a mapped image for the region-of-interest, comprising determining a pixel value for at least one mapped pixel value in the mapped image by applying the local mapping function to the raw pixel value in the raw image to generate the mapped pixel value; and
decoding the barcode symbol using the mapped image.
