COMPUTER-IMPLEMENTED METHOD AND DEVICE FOR RECONSTRUCTING A BARCODE

DE602020043608T2Active Publication Date: 2024-12-25SIEMENS SANAYI & TICARET AS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
DE602020043608
Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
Filing Date
2020-10-07
Publication Date
2024-12-25
Estimated Expiration
2040-10-07

AI Technical Summary

Benefits of technology

[0012]By the invention, a barcode reconstruction for barcodes is obtained in a very simple manner.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The invention relates to a computer-implemented method and a device for reconstructing a barcode.

[0002] Generally, industrial optical readers work often in environments with harsh conditions, where for instance reflections on metal surfaces or grains because of wrong laminations can occur.

[0003] Optical reading devices for such as barcode readers, scanners or cameras can read a provided barcode by an electronic device.

[0004] A barcode is an opto-electronically readable font that consists of parallel lines and spaces of different widths defining a code, which maps data in binary symbols.

[0005] However, the decoding performance of industrial optical readers can be reduced dramatically by undesired optical effects, like reflections and bright light spots or bad illuminated areas.

[0006] In the publication CHEN ET AL: "Multiple-watermarking scheme of the European Article Number Barcode using similar code division multiple access technique", APPLIED MATHEMATICS AND COMPUTATION, ELSEVIER, US, vol. 197, no. 1, 11 February 2008 (2008-02-11), pages 243-261, XP022475535, ISSN: 0096-3003, DOI: 10.1016 / J.AMC.2007.07.078 uses a barcode pattern to generate the watermarks to enhance the effect of the digital rights management, with following two advantages: (1) the secret image has very high security by using SCDMA and APSK as in digital communication; and (2) the extracted watermarks have the same quality even under all kinds of attacks, which is better than other schemes with different extracted watermark quality.

[0007] This is achieved by a mix codec, a hamming codec, and a spread spectrum technique construct a similar code division multiple access (SCDMA) structure. It is used to configure a multiple-watermarking scheme for still images.

[0008] The publication EP 2 680 186 A1 (OPTOELECTRONICS CO LTD [JP]), 1 January 2014 (2014-01-01), describes a method to prevent misreading of barcodes and to allow accurate outputting of bar data even when an element is damaged or blurred. An optical information reading device contains a computation means 23 a for adding widths of 6 elements containing a bar and a space that are adjacent within one character to derive respective patterns of 2- through n element added widths and for converting each of the patterns of 2- through n-element added widths into the module number for one character to obtain the module numbers of the patterns of the 2- through n-element added widths; an extraction means 23b for narrowing down the target characters to extract a candidate character, wherein the target character is that each module number of the 2- through n-element widths is an integer with an error equal to or less than 1; and a search means 23d for comparing the extracted candidate character, having the module numbers of the patterns of the 2- through n-element added widths with the expected value character for evaluating the candidate character to search for an expected value character with the strongest correlation to the candidate character.

[0009] The publication US 7 328 847 B1 (SHEN BO [US] ET AL) 12 February 2008 (2008-02-12) provides barcode data communication methods, barcode embedding methods, and barcode systems are described. According to one embodiment, a barcode data communication method includes accessing a composite image comprising a disguised barcode image incapable of being directly read from a base image by a barcode reader, extracting data corresponding to the barcode image from the composite image, modifying the data to provide the barcode image in a state wherein the barcode image may be directly read by a barcode reader, and reading the barcode image using the barcode reader after the modifying.

[0010] It is the objective of the invention to improve the reader performance for barcodes at difficult optical conditions.

[0011] The objective of the invention is solved by a method for reconstructing a barcode, wherein for a received digital input image with a barcode, a bar of the barcode with a gap, the gap represented and defined by an interrupted or broken portion of the bar, is identified, and the gap is reconstructed pixelwise by setting all gap pixels of the bar to a value representing the identified bar as a numeric value of an index in a grey scale, and a reconstructed digital output image is provided, wherein following steps are executed: a) receiving a digital input image with a barcode, b) detecting a rectangular candidate area within the received image, wherein the area includes the barcode and the bars of the barcode are perpendicularly arranged elongated along the longer side of the rectangular candidate area, c) calculating a virtual sampling line for the candidate area, which line is parallel to a longer side of the rectangular candidate area, preferably in the middle between both longer sides of the candidate area, d) defining a sampling point on the virtual sampling line, e) calculating a virtual bar line for the candidate area perpendicular to the virtual sampling line crossing the sampling point, f) identifying bar pixels within the candidate area being on the virtual bar line, g) calculating an average field index for each of the bar pixels representing the average pixel value, representing a numeric value of an index in a grey scale, of the pixels of the candidate area within a predefined distance around the respective pixel, h) detecting significant pixels from all the bar pixels, which respective pixel value is smaller than the respective average field index, i) counting significant pixels and if the count is greater than a predefined confidence ratio, define all pixels along the virtual bar line (BL) as proper pixels, j) reconstructing pixels by setting the proper pixels to the value of a respective pixel of a bar pixel in the image, k) selecting a new position of the sampling point (SP) on the virtual sampling line (SL), which is not yet processed, l) continuing with step e), until all positions of the sampling point are being processed, m) provide the reconstructed digital image as a digital output image.

[0012] By the invention, a barcode reconstruction for barcodes is obtained in a very simple manner.

[0013] The reconstructed barcode can be read easily and reliable by conventional reader.

[0014] Especially highly distorted regions, for instance by optical reflections, within the barcode area can be reconstructed.

[0015] The basic principle is, that a bar of a barcode can appear as interrupted, which can be closed when identifying a probability of a bar line.

[0016] Therefore, reconstruction can be interpreted as closing a gap in a distorted, broken bar line.

[0017] Since a bar code can also appear inverse, a value representing a bar pixel in the image can be white or black, or even appearing like grey when disturbed.

[0018] Bars of a bar code should provide high contrast related to the background.

[0019] Such probability can be determined when a certain number of dark pixels along a potential bar line is present.

[0020] Optionally to that, a further spacer, i.e. a certain number of white pixels between parallel bar lines can support the probability of bar lines.

[0021] Grey scaled pixels can also support the probability of a bar line or a spacer.

[0022] The method provides a very simple and reliable implementation for reconstructing a barcode, with a gap at a bar of a barcode.

[0023] With other words, step i) can also being defined as determining the virtual bar line is a proper bar line that belongs to the barcode, if the significant pixel count or the length of a bar of the virtual bar line is greater than a predefined confidence ratio.

[0024] Regarding step j), the set value of a proper pixel can be one leading to a high contrast, i.e. at least a predefined contrast level, with respect to the background of the image or candidate area.

[0025] The shown method with steps a) to m) can replace the initial description of the method of the invention since the result is identical.

[0026] In a further development of the invention it is foreseen that in step d) setting the sampling point to the crossing point of the virtual sampling line and a first virtual line being in the course of a shorter edge of the rectangular candidate area, and in step k) shifting the sampling point to the neighboring pixel of the previous sampling point on the virtual sampling line, and in step l) continuing with step e), until the sampling point reaches a second virtual line being in the course of the other shorter edge of the rectangular candidate area.

[0027] By this feature, a simplified implementation can be obtained.

[0028] In a further development of the invention it is foreseen that the sampling point is set to the crossing point of the virtual sampling line and a first virtual line being in the course of a shorter edge of the rectangular candidate area.

[0029] By this feature, a simplified implementation can be obtained.

[0030] In a further development of the invention it is foreseen that after the step of detecting a candidate area, a step with cropping the image to the candidate area is performed.

[0031] By this feature, a simplified and fast implementation can be obtained reducing processing power and saving memory.

[0032] The objective of the invention is also solved by a device for reconstructing a barcode, comprising a processor and a memory, wherein the device is configured to receive a digital input image with the barcode and to reconstruct the barcode according to the method of the invention, and to provide the reconstructed digital output image.

[0033] The invention is explained in more detail below with reference to an exemplary embodiment shown in the accompanying drawings. In the drawings shows Fig. 1a flowchart as an embodiment of the method of the invention and a device according to the invention, Fig. 2an example for a digital image with a barcode, Fig. 3a cropped part of the image of the previous figure, Fig. 4an embodiment of steps of the method according to the invention, Fig. 5an illustration of an example with a virtual bar line with virtual bar pixels, Fig. 6an illustration of an example for determining significant pixels, Fig. 7an example of an image with reconstructed pixels, Fig. 8an example of an outputted reconstructed image.

[0034] Fig. 1 shows a flowchart as an embodiment of the method of the invention.

[0035] The computer-implemented method comprises following steps: a) receiving a digital input image 10 with a barcode, b) detecting a rectangular candidate area 11 within the received image, wherein the area includes the barcode and the bars of the barcode are perpendicularly arranged elongated along the longer side of the rectangular candidate area 11, c) calculating a virtual sampling line (SL) for the candidate area 11, which is parallel to a longer side of the rectangular candidate area 11, for instance in the middle between both longer sides, d) defining a sampling point SP on the virtual sampling line SL, e) calculating a virtual bar line BL for the candidate area 11 perpendicular to the virtual sampling line SL crossing the sampling point SP, f) identifying bar pixels 13 within the candidate area 11 being on the virtual bar line BL, g) calculating an average field index for each of the bar pixels 13 representing the average pixel value of the pixels of the candidate area 11 within a predefined distance 14 around the respective pixel, h) detecting significant pixels 15 from all the bar pixels 13, which respective pixel value is smaller than the respective average field index, i) counting significant pixels and if the count is greater than a predefined confidence ratio, define all pixels along the virtual bar line (BL) as proper pixels, j) reconstructing pixels by setting the proper pixels to the value of a respective pixel of a bar pixel in the image, k) shifting the sampling point SP to the neighboring pixel of the previous sampling point on the virtual sampling line SL, l) continuing with step e), until the sampling point SP reaches a second virtual line L2 being in the course of the other shorter edge of the rectangular candidate area 11, m) provide the reconstructed digital image as a digital output image 20.

[0036] Moreover, an embodiment of a device 1 with a processor and a memory for reconstructing a barcode according to the invention is shown.

[0037] The device 1 is configured to receive a digital image 10 with the barcode and to reconstruct the barcode according to the method of the preceding claim at a reconstructed digital image 20, and to provide the reconstructed digital image 20.

[0038] Fig. 2 illustrates an example for a received digital image 10 including a barcode in step a).

[0039] In step b), a rectangular candidate area 11 within the received image is detected.

[0040] The area 11 includes the barcode and the bars of the barcode are perpendicularly arranged elongated along the longer side of the rectangular candidate area 11.

[0041] Fig. 3 shows a cropped part of the image 10 of the previous figure including a rectangular candidate area 11 containing the barcode.

[0042] Cropping the relevant part of an image can improve the performance of the computer-implemented method and thus, a simpler device can be used to execute said method.

[0043] Fig. 4 depicts a principle illustration of steps of the method according to the invention.

[0044] A virtual sampling line SL, performed at step c), for the rectangular candidate area 11 is defined, which is parallel to a longer side of the rectangular candidate area 11.

[0045] A sampling point SP on the virtual sampling line SL is defined and virtually moved to the neighboring pixel of the previous virtual point when performing the method with its steps, i.e. by a respective predefined distance.

[0046] When running through the method steps, for all possible positions of the sampling point SP the reconstruction should be applied.

[0047] The simplest way doing so is shifting the sampling point SP to the neighboring pixel of the previous sampling point, i.e. increments, on the virtual sampling line SL from a starting point from a first virtual line L1, being in the course of a shorter edge of the rectangular candidate area 11, to a second virtual line L2 being in the course of the other shorter edge of the rectangular candidate area 11.

[0048] The trace of the moved sampling point SP, i.e. the scan direction 18 along virtual scan line, goes from the first end L1 of a longer side of the rectangular candidate area 11 to the second end L2 of a longer side of the rectangular candidate area 11.

[0049] A virtual bar line BL, performed at step e), is defined for the candidate area 11 perpendicular to the virtual sampling line SL and crossing the respective sampling point at the respective scan.

[0050] The virtual bar line BL is calculated for the candidate area 11 perpendicular to the virtual sampling line SL crossing the sampling point SP.

[0051] Fig. 5 shows an illustration of a virtual bar line BL with bar pixels 13 for the candidate area 11, which are identified on the virtual sampling line SL within the candidate area 11, performed at step f).

[0052] Fig. 6 an illustration of the determination of significant pixels in step g) to i).

[0053] An average field index for each of the bar pixels 13 is calculated representing the average pixel value of the pixels of the candidate area 11 within a predefined distance 14 around the respective pixel.

[0054] Subsequently, significant pixels 15 are detected from all the bar pixels 13, which respective pixel value is smaller than the respective average field index, e.g. 3 or 5.

[0055] Significant pixels are counted and if the sum is greater than a predefined confidence ratio, all pixels along the virtual bar line BL are defined as proper pixels,

[0056] Pixels are reconstructed by setting the proper pixels to the value of a respective pixel of a bar pixel in the image, i.e. the value of the pixels are selected to get highest contrast in the reconstructed digital image 20.

[0057] In one embodiment, the pixels represent a grey scale of a digital grey scale image.

[0058] The value representing a bar pixel in the shown figures is a black value, i.e. close to a value of zero.

[0059] The background value is a white value, i.e. close to a value of 255 at an eight-digit scale.

[0060] The scale and the values for the bar pixels and the background pixels can vary, dependent of the reader principle and the illumination, and of course being inverted.

[0061] Fig. 7 shows the candidate area 11 with reconstructed pixels,

[0062] Fig. 8 partially the outputted reconstructed image 20 including the candidate area 11 with reconstructed pixels.

[0063] Additional contrast enhancements to the image of the previous figure are applied.

[0064] The output image 20 can be of the size of the candidate area 11 or also of the size of the input image 10.

[0065] The candidate area 11 can replace the respective part of the input image 10 to form the output image 20.List of reference numerals:

[0066] 1device 10digital input image 11rectangular candidate area 12scan direction along virtual sampling line, trace 13bar pixel 14predefined distance around pixel 15significant pixel 16neighbor pixel 20reconstructed digital output image BLvirtual bar line L1, L2virtual line SLvirtual sampling line SPvirtual sampling point

Claims

1. Computer-implemented method for reconstructing a barcode, wherein for a received digital input image (10) with a barcode, a bar of the barcode with a gap, the gap represented and defined by an interrupted or broken portion of the bar, is identified, and the gap is reconstructed pixelwise by setting all gap pixels of the bar with the gap to a value representing the identified bar as a numeric value of an index in a grey scale, and a reconstructed digital output image (20) provided, wherein following steps are executed: a) receiving a digital input image (10) with a barcode, b) detecting a rectangular candidate area (11) within the received image, wherein the area includes the barcode and the bars of the barcode are perpendicularly arranged elongated along the longer side of the rectangular candidate area (11), c) calculating a virtual sampling line (SL) for the candidate area (11), which is parallel to a longer side of the rectangular candidate area (11), d) defining a sampling point (SP) on the virtual sampling line (SL), e) calculating a virtual bar line (BL) for the candidate area (11) perpendicular to the virtual sampling line (SL) crossing the sampling point (SP), f) identifying bar pixels (13) within the candidate area (11) being on the virtual bar line (BL), g) calculating an average field index for each of the bar pixels (13) representing the average pixel value, representing a numeric value of an index in a grey scale, of the pixels of the candidate area (11) within a predefined distance (14) around the respective pixel, h) detecting significant pixels (15) from all the bar pixels (13), which respective pixel value is smaller than the respective average field index, i) counting significant pixels and if the count is greater than a predefined confidence ratio, define all pixels along the virtual bar line (BL) as proper pixels, j) reconstructing pixels by setting the proper pixels to the value of a respective pixel of a bar pixel in the image, k) selecting a new position of the sampling point (SP) on the virtual sampling line (SL), which is not yet processed, l) continuing with step e), until all positions of the sampling point (SP) are being processed, m) provide the reconstructed digital image as a digital output image (20).

2. Method according to the preceding claim, wherein • in step d) setting the sampling point (SP) to the crossing point of the virtual sampling line (SL) and a first virtual line (L1) being in the course of a shorter edge of the rectangular candidate area (11), and • in step k) shifting the sampling point (SP) to the neighboring pixel of the previous sampling point and is on the virtual sampling line (SL), and • in step l) continuing with step e), until the sampling point (SP) reaches a second virtual line (L2) being in the course of the other shorter edge of the rectangular candidate area (11).

3. Method according to one of the preceding claims, wherein after the step of detecting a candidate area, a step with cropping the image (10) to the candidate area (11) is performed.

4. Device for reconstructing a barcode, comprising a processor and a memory, wherein the device is configured to receive a digital image (10) with the barcode and to reconstruct the barcode according to the method to one of the preceding claims at a reconstructed digital image (20), and to provide the reconstructed digital image (20).