Barcode scanner optimization
Disclosed are barcode scanners and methods for scanning a barcode. The barcode scanners and methods for scanning a barcode may include receiving a raw image from a scanner. Channel information may be extracted from each pixel of the raw image. A composite image may be created using the channel information from each pixel of the raw image. Finally, product information may be extracted from the composite image.
1. A method for scanning a color barcode, the method comprising:
receiving, at a computing device, a raw image from a scanner, the raw image including a plurality of pixels and each pixel including four channels;
extracting, by the computing device, channel information from each of the four channels for each of the plurality of pixels;
creating, by the computing device, a composite image using the channel information from each of the plurality of pixels of the raw image, the composite image consisting of four sub-images, wherein creating the composite image includes:
grouping corresponding channel information from each of the plurality of pixels to create each of the four sub-images, wherein each channel corresponds to a respective sub-image, and
repositioning each of the four groupings of channel information so that each of the four groupings forms the respective sub-image of the composite image in a respective quadrant of the composite image; and
extracting product information from the composite image.
2. The method of claim 1 , wherein receiving the raw image includes receiving an image of a color barcode.
3. The method of claim 1 , wherein receiving the raw image includes receiving the raw image from an optical scanner.
4. The method of claim 1 , wherein receiving the raw image includes receiving an image with four channels per pixel.
5. The method of claim 1 , wherein extracting the channel information includes extracting a color value for each channel of each pixel.
6. The method of claim 1 , wherein the raw image is a non-mosaic image.
7. The method of claim 1 , wherein the product information includes price lookup (PLU) information.
8. The method of claim 1 , further comprising:
creating a de-mosaic image using the raw image; and
extracting the product information from the de-mosaic.
9. A system for scanning a color barcode, the system comprising:
a processor; and
a memory that stores instructions that, when executed by the processor, cause the processor to perform actions comprising:
receiving a raw image from an optical scanner, the raw image including a plurality of pixels and each pixel including four channels,
extracting channel information from each of the four channels for each of the plurality of pixels,
creating a composite image using the channel information from each of the plurality of pixels of the raw image, the composite image consisting of four sub-images, wherein creating the composite image includes:
grouping corresponding channel information from each of the plurality of pixels to create each of the four sub-images, wherein each channel corresponds to a respective sub-image, and
repositioning each of the four groupings of channel information so that each of the four groupings forms the respective sub-image of the composite image in a respective quadrant of the composite image, and
extracting product information from the composite image.
10. The system of claim 9 , wherein receiving the raw image includes receiving an image with four channels per pixel.
11. The system of claim 9 , wherein extracting the channel information includes extracting a color value for each channel of each pixel.
12. A self-service terminal comprising:
an optical scanner;
a processor electrically coupled to the optical scanner; and
a memory that stores instructions that, when executed by the processor, cause the processor to perform actions comprising:
receiving a raw image from the optical scanner, the raw image including a plurality of pixels and each pixel including four channels,
extracting channel information from each of the four channels for each of the plurality of pixels,
creating a composite image using the channel information from each of the plurality of pixels of the raw image, the composite image consisting of four sub-images, wherein creating the composite image includes:
grouping corresponding channel information from each of the plurality of pixels to create each of the four sub-images, wherein each channel corresponds to a respective sub-image, and
repositioning each of the four groupings of channel information so that each of the four groupings forms the respective sub-image of the composite image in a respective quadrant of the composite image, and
extracting product information from the composite image.
13. The self-service terminal of claim 12 , wherein receiving the raw image includes receiving an image with four channels per pixel.
14. The self-service terminal of claim 12 , wherein extracting the channel information includes extracting a color value for each channel of each pixel.