(19)
(11)EP 3 531 335 B1

(12)EUROPEAN PATENT SPECIFICATION

(45)Mention of the grant of the patent:
22.07.2020 Bulletin 2020/30

(21)Application number: 17865471.1

(22)Date of filing:  17.10.2017
(51)International Patent Classification (IPC): 
G06K 7/14(2006.01)
(86)International application number:
PCT/CN2017/106483
(87)International publication number:
WO 2018/077059 (03.05.2018 Gazette  2018/18)

(54)

BARCODE IDENTIFICATION METHOD AND APPARATUS

BARCODE-IDENTIFIZIERUNGSVERFAHREN UND -VORRICHTUNG

PROCÉDÉ ET APPAREIL D'IDENTIFICATION DE CODE-BARRES


(84)Designated Contracting States:
AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR

(30)Priority: 24.10.2016 CN 201610939696

(43)Date of publication of application:
28.08.2019 Bulletin 2019/35

(73)Proprietor: Alibaba Group Holding Limited
Grand Cayman (KY)

(72)Inventor:
  • LIU, Zhengbao
    Hangzhou Zhejiang 311121 (CN)

(74)Representative: Conroy, John 
Fish & Richardson P.C. Highlight Business Towers Mies-van-der-Rohe-Straße 8
80807 München
80807 München (DE)


(56)References cited: : 
WO-A1-2010/014084
CN-A- 104 361 309
CN-A- 107 016 316
JP-A- 2012 198 763
CN-A- 102 737 214
CN-A- 104 361 309
JP-A- 2009 151 504
US-A1- 2012 080 515
  
      
    Note: Within nine months from the publication of the mention of the grant of the European patent, any person may give notice to the European Patent Office of opposition to the European patent granted. Notice of opposition shall be filed in a written reasoned statement. It shall not be deemed to have been filed until the opposition fee has been paid. (Art. 99(1) European Patent Convention).


    Description

    TECHNICAL FIELD



    [0001] The present application relates to the field of computer technologies, and in particular, to a method and apparatus for barcode identification.

    BACKGROUND



    [0002] With rapid development of Internet technologies, barcodes enter people's lives. By scanning and identifying the barcodes, various services such as payment, adding friends, and information acquisition can be implemented. The barcode identification rate has become an important measure for user experience.

    [0003] Patent Publication WO 2010/014084 A1 to Optoelectronics Co Ltd., et al., for "One dimensional barcode reader using two dimensional image sensor," published 4 February 2010, discloses a method and apparatus that uses a two-dimensional image sensor to read a one-dimensional symbol such a barcode. The one-dimensional barcode is imaged using a selected set of rows of the two dimensional image sensor, and corresponding positions in the selected rows are then averaged. The single sequence of averaged values is then converted to a run length code to decode the associated data. The number and location of rows of elements of the two dimensional sensor that are used may be varied to adjust various characteristics of the reader.

    [0004] Patent Publication CN 104 361 309 A to Wangyibao Co. Ltd. for "Bar code identifying method and bar code identifying equipment," published 18 February 2015, discloses a method and apparatus that addresses the problem that in the prior art, if a picture contains a plurality of barcodes at the same time, it is impossible to support simultaneous identification of a plurality of barcodes at one time, but scanning and decoding are performed one by one bar code, resulting in low recognition efficiency of the barcode. A method scans an original picture line by line, counting the number of pixels in the two color bands alternately on the scanning line, obtaining a data sequence of the scan line, determining whether the same or similar subsequence is included in the data sequence on consecutive N adjacent scans, and if so, determining that the subsequence includes at least one barcode, and decoding the subsequence. In this way the method supports the identification of a plurality of barcodes in the original picture at the same time.

    [0005] Patent Publication JP 2009 151504 A to Fuji Xerox Co. Ltd. for "Code recognition device and program," published 9 July 2009, discloses a bar code decoder that can read a code that can be decoded as multiple types of barcodes. The document discloses an apparatus and a program for recognizing a bar code with an appropriate code system.

    SUMMARY



    [0006] In view of this, the present application provides a method and apparatus for barcode identification. The invention is defined in the claims.

    [0007] The present application is specifically implemented by using the following technical solutions.

    [0008] An example method for barcode identification is disclosed, and the method includes: extracting a row of pixels from a barcode image based on a predetermined extraction policy; parsing the row of pixels to obtain a corresponding first character string; and determining the first character string as an identification result of a barcode in the barcode image when the first character string satisfies a predetermined character rule.

    [0009] An example apparatus for barcode identification is disclosed, and the apparatus includes: a pixel extraction unit, configured to extract a row of pixels from a barcode image based on a predetermined extraction policy; a pixel parsing unit, configured to parse the row of pixels to obtain a corresponding first character string; and a first identification unit, configured to determine the first character string as an identification result of a barcode in the barcode image when the first character string satisfies a predetermined character rule.

    [0010] It can be seen from the previous descriptions that most character strings included in the barcode satisfy the predetermined character rule. Therefore, in the present application, when a character string corresponding to a row of pixels in the barcode image satisfies the character rule, the character string can be determined as the identification result of the barcode without performing a plurality of times of parsing, thereby improving a barcode identification rate.

    BRIEF DESCRIPTION OF DRAWINGS



    [0011] 

    FIG. 1 is a schematic flowchart illustrating a method for barcode identification, according to an example implementation of the present application;

    FIG. 2 is a schematic flowchart illustrating another method for barcode identification, according to an example implementation of the present application;

    FIG. 3 is a schematic structural diagram illustrating an apparatus for barcode identification, according to an example implementation of the present application; and

    FIG. 4 is a block diagram illustrating an apparatus for barcode identification, according to an example implementation of the present application.


    DESCRIPTION OF IMPLEMENTATIONS



    [0012] Example implementations are described in detail here, and examples of the example implementations are presented in the accompanying drawings. When the following description relates to the accompanying drawings, unless specified otherwise, same numbers in different accompanying drawings represent same or similar elements. Implementations described in the following example implementations do not represent all implementations consistent with the present application. On the contrary, the implementations are only examples of apparatuses and methods consistent with some aspects of the present application that are described in detail in the appended claims.

    [0013] The terms used in the present application are merely for illustrating specific implementations, and are not intended to limit the present application. The terms "a" and "the" of singular forms used in the present application and the appended claims are also intended to include plural forms, unless otherwise specified in the context clearly. It should be further understood that the term "and/or" used in the present specification indicates and includes any or all possible combinations of one or more associated listed items.

    [0014] It should be understood that although terms "first", "second", "third", etc. may be used in the present application to describe various types of information, the information is not limited to the terms. These terms are only used to differentiate information of a same type. For example, without departing from the scope of the present application, first information can also be referred to as second information, and similarly, the second information can be referred to as the first information. Depending on the context, for example, the word "if" used here can be explained as "while", "when", or "in response to determining".

    [0015] FIG. 1 is a schematic flowchart illustrating a method for barcode identification, according to an example implementation of the present application.

    [0016] Referring to FIG. 1, the method for barcode identification can be applied to a terminal device such as a mobile phone or a tablet computer, and includes the following steps.

    [0017] Step 101: Extract a row of pixels from a barcode image based on a predetermined extraction policy.

    [0018] In this implementation, after scanning a barcode, the terminal device can obtain an image including the barcode. For ease of subsequent identification, the terminal device can perform compression, greyscale processing, binarization, etc. on the image including the barcode. For processing and implementation of this part, references can be made to the related technology. Details are omitted in the present application for simplicity.

    [0019] In this implementation, the image including the barcode that is obtained after compression, greyscale processing, binarization, etc. is performed can be referred to as a barcode image. In the present step, a row of pixels can be extracted from the barcode image based on the predetermined extraction policy. The predetermined extraction policy is to extract pixels based on a unit of a row, and can be specifically set by a developer.

    [0020] In an example, pixels can be extracted starting from a default row at an interval of a fixed number of rows, until a target extraction row goes beyond the barcode image. Assume that the default row is set to the first row of the barcode image, and the fixed number of rows can be 10. Based on such an extraction policy, the first row of pixels in the barcode image are extracted for the first time, the 11th row of pixels in the barcode image are extracted for the second time, the 21st row of pixels in the barcode image are extracted for the third time, and the (1 + (N - 1) × 10)th row of pixels in the barcode image are extracted for the Nth time. The pixel extraction does not end until the (1 + (N - 1) × 10)th row of pixels go beyond the barcode image. Certainly, the default row can be the second row of the barcode image, and the fixed number of rows can be 15, etc. Implementations are not specially limited in the present application.

    [0021] In another example, pixels can be extracted starting from a default row at an interval of a dynamically changed number of rows, until a target extraction row goes beyond the barcode image. Assume that the default row is set to the first row of the barcode image, and the number of rows of the interval ranges from 10 to 20. Based on such an extraction policy, the first row of pixels in the barcode image are extracted for the first time, the 11th row of pixels in the barcode image are extracted for the second time, the 31st row of pixels in the barcode image are extracted for the third time, the 41st row of pixels in the barcode image are extracted for the fourth time, and the 61st row of pixels in the barcode image are extracted for the fifth time. By analogy, the pixel extraction does not end until the target extraction row goes beyond the barcode image.

    [0022] Step 102: Parse the row of pixels to obtain a corresponding first character string.

    [0023] Based on step 101, after the row of pixels are extracted, the row of pixels can be parsed to obtain the corresponding first character string. It is worthwhile to note that based on a barcode composition rule, a barcode usually includes a check code. For a barcode including a check code, the first character string obtained through parsing has passed verification of the check code. Certainly, some barcodes do not include a check code. For a barcode that does not include a check code, the first character string is not verified. For processing and implementation of this part, references can be made to the related technology. Details are omitted in the present application for simplicity.

    [0024] Step 103: Determine the first character string as an identification result of a barcode in the barcode image when the first character string satisfies a predetermined character rule.

    [0025] Based on step 102, after the first character string is obtained, it can be determined whether the first character string satisfies the predetermined character rule. If the first character string satisfies the character rule, it can be determined that the first character string is the identification result of the barcode in the barcode image.

    [0026] In this implementation, the character rule can be set by a developer. For example, no consecutive predetermined characters exist, and the predetermined characters usually do not include 26 uppercase and lowercase letters, 0 to 9, and spaces. That is, the predetermined characters can be characters different from the 26 uppercase letters, the 26 lowercase letters, 0 to 9, and the spaces, for example, characters "&", "%", and "#". Specifically, in actual applications, a probability that a predetermined character occurs consecutively in a barcode is almost 0. Therefore, in the present step, it can be determined whether no consecutive predetermined characters exist in the first character string, and if no consecutive predetermined characters exist in the first character string, it can be determined that the first character string is the identification result of the barcode. Certainly, in actual applications, the developer can set another character rule based on a characteristic of a character string included in a barcode. For example, the first three digits in a barcode of a domestic product usually range from 690 to 699, and therefore, the character rule can further include that the first three digits range from 690 to 699 for the barcode of the domestic product.

    [0027] It can be seen from the previous descriptions that most character strings included in the barcode satisfy the predetermined character rule. Therefore, in the present application, when a character string corresponding to a row of pixels in the barcode image satisfies the character rule, the character string can be determined as the identification result of the barcode without performing a plurality of times of parsing, thereby improving a barcode identification rate.

    [0028] Optionally, in another example of the present application, based on the implementation shown in FIG. 1, to improve barcode identification accuracy, when the first character string obtained through parsing in step 102 does not satisfy the predetermined character rule, it can be further determined whether the first character string is the same as a second character string, and the first character string is determined as the identification result of the barcode when the first character string is the same as the second character string, where the second character string corresponds to a row of pixels that are different from the row of pixels corresponding to the first character string and that are extracted from the barcode image immediately previously based on the extraction policy.

    [0029] Specifically, although almost 100% of character strings included in the barcode satisfy the predetermined character rule, to avoid a problem that the barcode includes a character string that does not satisfy the character rule and a barcode identification error occurs when the method shown in FIG. 1 is used, when the first character string obtained through parsing in step 102 does not satisfy the predetermined character rule, it can be further determined whether parsing results of pixels extracted for consecutive two times are the same. The same parsing result can be determined as the identification result of the barcode if the parsing results are the same, thereby improving barcode identification accuracy. If the parsing results are different, pixels can continue to be extracted based on the predetermined extraction policy, and it is determined whether a character string corresponding to the pixels extracted this time satisfies the character rule, until a character string corresponding to a row of pixels satisfies the character rule or character strings corresponding to pixels extracted for consecutive two times are the same.

    [0030] It can be seen from the previous descriptions that in the present application, when a character string included in the barcode cannot be identified based on the character rule, it can be determined whether character strings corresponding to pixels extracted for consecutive two times are the same, and the same character string is determined as the identification result of the barcode, thereby improving barcode identification accuracy. Certainly, in actual applications, to further improve barcode identification accuracy, when a character string included in the barcode cannot be identified based on the character rule, it can be further determined whether character strings corresponding to pixels extracted for consecutive three or four times are the same, and the consecutive three or four character strings that are the same are used as the identification result of the barcode. Implementations are not specially limited in the present application.

    [0031] Optionally, in another example of the present application, when the target extraction row goes beyond the barcode image, if the identification result of the barcode is still not determined based on the character rule or the previous solution that consecutive two character strings are the same, a number of occurrence frequencies of each character string obtained through parsing can be counted, and a character string whose number of occurrence frequencies is largest and is greater than 1 is determined as the identification result of the barcode in the barcode image. For example, assume that two character strings are obtained through parsing, which are respectively character string A and character string B, character string A occurs three times, and character string B occurs one time. In this case, character string A can be determined as the identification result of the barcode. In the present application, the barcode image that cannot be identified in the previous method can be further identified based on the number of occurrence frequencies of the character string obtained through parsing, thereby improving barcode identification accuracy. It can be understood that in actual implementation, the number of occurrence frequencies used to determine the identification result of barcode can be set to be greater than 2 or 3, so as to further improve barcode identification accuracy. For example, a larger number of occurrence frequencies can be set for a barcode that does not include a check code. In this implementation, it can be determined that barcode identification fails if the number of occurrence frequencies of each character string obtained through parsing is 1. In addition, it can be determined that barcode identification fails if no character string is obtained through parsing when the target extraction row goes beyond the barcode image.

    [0032] In the present application, a rate of identifying the barcode based on the character rule is the fastest, and most barcodes can be identified. Therefore, the barcode can be first identified based on the character rule in the present application. A rate of performing identification in the method that character strings corresponding to pixels extracted for consecutive two times ranks second. Therefore, the method can be used as a supplement to the character rule-based identification method in the present application. A rate of performing identification by using the number of occurrence frequencies is the slowest. Therefore, the method is used as a supplement to the previous two identification methods in the present application. It can be seen that in the present application, the barcode can be identified in three identification methods, and barcode identification accuracy can be improved while an identification rate is ensured.

    [0033] FIG. 2 is a schematic flowchart illustrating another method for barcode identification, according to an example implementation of the present application.

    [0034] Referring to FIG. 2, the method for barcode identification in this example can include the following steps.

    [0035] Step 201: Extract a default row of pixels from a barcode image based on a predetermined extraction policy.

    [0036] In this implementation, assume that the barcode image obtained after a terminal device performs compression, greyscale processing, and binarization, etc. has a total of 40 rows of pixels, the default row is the first row, and the predetermined extraction policy is to extract pixels at an interval of 10 rows. In the present step, the first row of pixels in the barcode image are extracted for the first time.

    [0037] Step 202: Parse the row of pixels to obtain a corresponding character string A.

    [0038] In the present step, the first row of pixels in the barcode image are parsed to obtain the corresponding character string A.

    [0039] Step 203: Determine whether character string A satisfies a predetermined character rule; and perform step 204 if character string A does not satisfy the character rule; or perform step 208 if character string A satisfies the character rule.

    [0040] Step 204: Extract another row of pixels from the barcode image based on the extraction policy.

    [0041] Based on a determining result in step 203, when character string A corresponding to the first row of pixels in the barcode image does not satisfy the character rule, the 11th row of pixels in the barcode image can be extracted based on the extraction policy.

    [0042] Step 205: Parse the row of pixels to obtain a corresponding character string B.

    [0043] Based on step 204, the 11th row of pixels can be parsed to obtain the corresponding character string B.

    [0044] Step 206: Determine whether character string B satisfies the character rule; and perform step 208 if character string B satisfies the character rule; or perform step 207 if character string B does not satisfy the character rule.

    [0045] Step 207: Determine whether character string B is the same as the character string (character string A) corresponding to the pixels extracted immediately previously; and perform step 208 if the character strings are the same; or continue to perform step 204 if the character strings are different.

    [0046] Based on a determining result in step 206, when character string B corresponding to the 11th row of pixels in the barcode image does not satisfy the character rule, it can be determined whether character string B is the same as character string A, and step 208 can be performed if character string B is the same as character string A.

    [0047] Step 208: Determine an identification result of a barcode.

    [0048] Based on the determining result in step 203, when character string A corresponding to the first row of pixels in the barcode image satisfies the character rule, character string A can be determined as the identification result of the barcode.

    [0049] Based on the determining result in step 206, when character string B corresponding to the 11th row of pixels in the barcode image satisfies the character rule, character string B can be determined as the identification result of the barcode.

    [0050] Based on a determining result in the previous step 207, when character string B is the same as character string A, character string B can be determined as the identification result of the barcode.

    [0051] In this implementation, if it is determined in step 207 that character string B is different from character string A, step 204 can be performed again to extract the 21st row of pixels from the barcode image, and step 202 continues to be performed to parse the 21st row of pixels to obtain a corresponding character string C. Whether character string C satisfies the character rule is determined, and character string C can be determined as the identification result of the barcode if character string C satisfies the character rule. If character string C does not satisfy the character rule, it is determined whether character string C is the same as character string B, and character string C can be determined as the identification result of the barcode if character string C is the same as character string B. If character string C is different from character string B, the 31st row of pixels can be extracted from the barcode image, and the 31st row of pixels are parsed to obtain a corresponding character string D. If character string D does not satisfy the character rule, and character string D is different from character string C, and the 41st row of pixels go beyond the barcode image, a number of occurrence frequencies of each character string can be counted, and a character string whose number of occurrence frequencies is largest and is greater than 1 is determined as the identification result of the barcode. It can be determined that barcode identification fails if the number of occurrence frequencies of each character string is 1.

    [0052] Corresponding to the implementation of the method for barcode identification, the present application further provides an implementation of an apparatus for barcode identification.

    [0053] The implementation of the apparatus for barcode identification in the present application can be applied to a terminal device. The apparatus implementation can be implemented by software, hardware, or a combination of hardware and software. Software implementation is used as an example. As a logical apparatus, the apparatus is formed by reading a corresponding computer program instruction in a nonvolatile memory to a memory by a processor of a terminal device where the apparatus is located. In terms of hardware, FIG. 3 is a structural diagram illustrating hardware of the terminal device where the apparatus for barcode identification in the present application is located. In addition to a processor, a memory, a network interface, and a nonvolatile memory shown in FIG. 3, the terminal device where the apparatus is located in this implementation usually can include other hardware based on an actual function of the terminal device. Details are omitted here for simplicity.

    [0054] FIG. 4 is a block diagram illustrating an apparatus for barcode identification, according to an example implementation of the present application.

    [0055] Referring to FIG. 4, an apparatus 300 for barcode identification can be applied to the terminal device shown in FIG. 3, and the apparatus includes a pixel extraction unit 301, a pixel parsing unit 302, a first identification unit 303, a sameness determining unit 304, a second identification unit 305, a frequency number counting unit 306, a third identification unit 307, a fourth identification unit 308, and a fifth identification unit 309.

    [0056] The pixel extraction unit 301 is configured to extract a row of pixels from a barcode image based on a predetermined extraction policy.

    [0057] The pixel parsing unit 302 is configured to parse the row of pixels to obtain a corresponding first character string.

    [0058] The first identification unit 303 is configured to determine the first character string as an identification result of a barcode in the barcode image when the first character string satisfies a predetermined character rule.

    [0059] The sameness determining unit 304 is configured to determine whether the first character string is the same as a second character string when the first character string does not satisfy the character rule, where the second character string corresponds to a row of pixels that are different from the row of pixels corresponding to the first character string and that are extracted from the barcode image immediately previously based on the extraction policy.

    [0060] The second identification unit 305 is configured to: determine the first character string as the identification result of the barcode in the barcode image when the first character string is the same as the second character string; or return to the pixel extraction unit when the first character string is different from the second character string.

    [0061] Optionally, the extraction policy is to extract pixels starting from a default row at an interval of a fixed number of rows, until a target extraction row goes beyond the barcode image.

    [0062] Optionally, the extraction policy is to extract pixels starting from a default row at an interval of a dynamically changed number of rows, until a target extraction row goes beyond the barcode image.

    [0063] The frequency number counting unit 306 is configured to count a number of occurrence frequencies of each character string obtained through parsing when the target extraction row goes beyond the barcode image.

    [0064] The third identification unit 307 is configured to determine a character string whose number of occurrence frequencies is largest and is greater than 1 as the identification result of the barcode in the barcode image.

    [0065] The fourth identification unit 308 is configured to determine that barcode identification fails when the number of occurrence frequencies of each character string obtained through parsing is 1.

    [0066] The fifth identification unit 309 is configured to determine that barcode identification fails if no character string is obtained through parsing when the target extraction row goes beyond the barcode image.

    [0067] Optionally, the character rule is that no consecutive predetermined characters exist, and the predetermined characters do not include 26 uppercase and lowercase letters, 0 to 9, and spaces.

    [0068] For a detailed implementation process of functions and roles of each unit in the apparatus, references can be made to an implementation process of corresponding steps in the previous method. Details are omitted here for simplicity.

    [0069] Because an apparatus implementation basically corresponds to a method implementation, for related parts, references can be made to related descriptions in the method implementation. The previously described apparatus implementation is merely an example. The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the modules can be selected based on actual needs to achieve the objectives of the solutions in the present application. A person of ordinary skill in the art can understand and implement the implementations of the present application without creative efforts.

    [0070] The previous descriptions are merely examples of implementations of the present application, but are not intended to limit the present application.


    Claims

    1. A method for barcode identification, the method comprising:
    determining, based on an extraction policy and a predetermined character rule, an identification result of a barcode image, wherein the extraction policy defines an initial row of pixels in the barcode image and a rule for selecting a next row of pixels after a current row of pixels in the barcode image, wherein the determining comprises:

    selecting, as a current row, the initial row of pixels defined by the extraction policy;

    extracting (S201) the current row of pixels from the barcode image;

    parsing (S202) the current row of pixels to obtain a current character string corresponding to the current row of pixels; and

    determining (S203) whether the current character string satisfies the predetermined character rule and (i) if so, determining (S208) the current character string as the identification result of a barcode in the barcode image, and (ii) if not, performing an iteration of:

    selecting (S204) as the current row of pixels a next row of pixels according to the extraction policy;

    extracting (S204) the current row of pixels from the barcode image;

    parsing (S205) the current row of pixels to obtain a current character string corresponding to the current row of pixels; and

    determining first whether (i) (S206) the current character string satisfies the predetermined character rule and if not whether (ii) (S207) the current character string is the same as the immediately previous current character string, and if either is true, determining (S208) the current character string as the identification result of a barcode in the barcode image, and otherwise continuing the iteration of selecting (S204), extracting (S204), parsing (S205), and determining (S206, S207).


     
    2. The method according to claim 1, wherein the extraction policy is to extract pixels starting from a default row and then at an interval of a fixed number of rows, until a target extraction row goes beyond the barcode image.
     
    3. The method according to claim 1, wherein the extraction policy is to extract pixels starting from a default row to a target extraction row based on the extraction interval that dynamically changes an interval between rows to be extracted, until the target extraction row goes beyond the barcode image.
     
    4. The method according to claim 2 or 3, further comprising:

    counting a number of occurrence frequencies of each character string obtained through parsing when the target extraction row goes beyond the barcode image; and

    determining a character string whose number of occurrence frequencies is largest and is greater than 1 as the identification result of the barcode in the barcode image.


     
    5. The method according to claim 4, further comprising:
    determining that barcode identification fails when the number of occurrence frequencies of each character string obtained through parsing is 1.
     
    6. The method according to claim 1, wherein the character rule is that no consecutive predetermined characters exist, and the consecutive predetermined characters do not comprise uppercase letters, lowercase letters, numbers 0 to 9, and spaces.
     
    7. The method according to claim 1, further comprising:

    obtaining an image including the barcode; and

    processing the image by performing at least one of a compression operation, a greyscale processing, and a binarization operation.


     
    8. An apparatus for barcode identification, wherein the apparatus is configured to perform all steps of the method of any one of claims 1 to 7.
     


    Ansprüche

    1. Verfahren zur Strichcode-Identifikation, das Verfahren Folgendes umfassend:
    Bestimmen, basierend auf einer Extraktionsrichtlinie und einer vorbestimmten Zeichenregel, eines Identifikationsergebnisses eines Strichcodebildes, wobei die Extraktionsrichtlinie eine anfängliche Pixelzeile in dem Strichcodebild und eine Regel zum Auswählen einer nächsten Pixelzeile nach einer aktuellen Pixelzeile in dem Strichcode-Bild definiert, wobei das Bestimmen Folgendes umfasst:

    Auswählen, als aktuelle Zeile, der anfänglichen Pixelzeile, die durch die Extrahierungsrichtlinie definiert ist;

    Extrahieren (S201) der aktuellen Pixelzeile aus dem Strichcode-Bild;

    Parsen (S202) der aktuellen Pixelzeile, um eine aktuelle Zeichenkette zu erhalten, die der aktuellen Pixelzeile entspricht; und

    Bestimmen (S203), ob die aktuelle Zeichenfolge die vorgegebene Zeichenregel erfüllt, und (i) falls ja, Bestimmen (S208) der aktuellen Zeichenfolge als das Identifikationsergebnis eines Strichcodes im Strichcode-Bild, und (ii) falls nicht, Ausführen einer Iteration von Folgendem:

    Auswählen (S204) einer nächsten Pixelzeile als aktuelle Pixelzeile gemäß der Extraktionsrichtlinie;

    Extrahieren (S204) der aktuellen Pixelzeile aus dem Strichcode-Bild;

    Parsen (S205) der aktuellen Pixelzeile, um eine aktuelle Zeichenkette zu erhalten, die der aktuellen Pixelzeile entspricht; und

    Bestimmen zuerst, ob (i) (S206) die aktuelle Zeichenkette die vorbestimmte Zeichenregel erfüllt, und wenn nicht, ob (ii) (S207) die aktuelle Zeichenkette die gleiche wie die unmittelbar vorhergehende aktuelle Zeichenkette ist, und wenn eines von beiden wahr ist, Bestimmen (S208) der aktuellen Zeichenkette als das Identifikationsergebnis eines Strichcodes im Strichcode-Bild, und andernfalls Fortsetzen der Iteration des Auswählens (S204), Extrahierens (S204), Analysierens (S205) und Bestimmens (S206, S207).


     
    2. Verfahren nach Anspruch 1, wobei die Extraktionsrichtlinie darin besteht, Pixel ausgehend von einer Standardzeile und danach in einem Intervall einer festen Anzahl von Zeilen zu extrahieren, bis eine Zielextraktionszeile über das Strichcode-Bild hinausgeht.
     
    3. Verfahren nach Anspruch 1, wobei die Extraktionspolitik darin besteht, Pixel ausgehend von einer Standardzeile bis zu einer Zielextraktionszeile zu extrahieren, basierend auf dem Extraktionsintervall, das ein Intervall zwischen zu extrahierenden Zeilen dynamisch ändert, bis die Zielextraktionszeile über das Strichcode-Bild hinausgeht.
     
    4. Verfahren nach Anspruch 2 oder 3, ferner Folgendes umfassend:

    Zählen einer Anzahl von Auftrittshäufigkeiten jeder Zeichenkette, die durch Parsen erhalten wird, wenn die Zielextraktionszeile über das Strichcode-Bild hinausgeht; und

    Bestimmen einer Zeichenkette, deren Anzahl der Auftrittshäufigkeiten am größten und größer als 1 ist, als Identifikationsergebnis des Strichcodes im Strichcode-Bild.


     
    5. Verfahren nach Anspruch 4, ferner Folgendes umfassend:
    Bestimmen, dass die Strichcode-Identifikation fehlschlägt, wenn die Anzahl der Vorkommenshäufigkeiten jeder durch Parsen erhaltenen Zeichenkette 1 beträgt.
     
    6. Verfahren nach Anspruch 1, wobei die Zeichenregel darin besteht, dass keine aufeinanderfolgenden vorbestimmten Zeichen existieren, und die aufeinanderfolgenden vorbestimmten Zeichen keine Großbuchstaben, Kleinbuchstaben, Zahlen 0 bis 9 und Leerzeichen umfassen.
     
    7. Verfahren nach Anspruch 1, ferner Folgendes umfassend:

    Erhalten eines Bildes, das den Strichcode umfasst; und

    Verarbeitung des Bildes durch Ausführen mindestens eines Komprimierungsvorgangs, einer Graustufenverarbeitung oder eines Binarisierungsvorgangs.


     
    8. Vorrichtung zur Strichcode-Identifikation, wobei die Vorrichtung dafür konfiguriert ist, alle Schritte des Verfahrens nach einem der Ansprüche 1 bis 7 auszuführen.
     


    Revendications

    1. Procédé destiné à l'identification de code à barres, le procédé comprenant :
    la détermination, en fonction d'une politique d'extraction et d'une règle de caractères prédéfinie, d'un résultat d'identification d'une image de code à barres, la politique d'extraction définissant une rangée initiale de pixels dans l'image de code à barres et une règle destinée à sélectionner une rangée de pixels suivante après une rangée actuelle de pixels dans l'image de code à barres, la détermination comprenant :

    la sélection, en tant que rangée actuelle, de la rangée initiale de pixels définie par la politique d'extraction ;

    l'extraction (S201) de la rangée actuelle de pixels à partir de l'image de code à barres ;

    l'analyse (S202) de la rangée actuelle de pixels pour obtenir une chaîne actuelle de caractères correspondant à la rangée actuelle de pixels ; et

    la détermination (S203) de l'éventuelle vérification, par la chaîne actuelle de caractères, de la règle prédéfinie de caractères et (i) dans l'affirmative, la détermination (S208) de la chaîne actuelle de caractères comme résultat d'identification d'un code à barres dans l'image de code à barres et (ii) dans la négative, la réalisation d'une itération de :

    la sélection (S204) en tant que rangée actuelle de pixels d'une rangée suivante de pixels selon la politique d'extraction ;

    l'extraction (S204) de la rangée actuelle de pixels à partir de l'image de code à barres ;

    l'analyse (S205) de la rangée actuelle de pixels pour obtenir une chaîne actuelle de caractères correspondant à la rangée actuelle de pixels ; et

    la détermination d'abord (i) (S206) de l'éventuelle vérification, par la chaîne de caractères actuelle, de la règle de caractères prédéfinie et dans la négative (ii) (S207), de l'éventuelle identité de la chaîne de caractères actuelle avec la chaîne de caractères actuelle immédiatement précédente et si l'une ou l'autre est vraie, la détermination (S208) de la chaîne de caractères actuelle comme résultat d'identification d'un code à barres dans l'image de code à barres et par ailleurs la poursuite de l'itération de la sélection (S204), de l'extraction (S204), de l'analyse (S205) et de la détermination (S206, S207).


     
    2. Procédé selon la revendication 1, dans lequel la politique d'extraction sert à extraire les pixels à partir d'une rangée par défaut puis suivant un intervalle d'un nombre fixe de lignes, jusqu'à ce qu'une rangée d'extraction cible dépasse l'image de code à barres.
     
    3. Procédé selon la revendication 1, dans lequel la politique d'extraction sert à extraire des pixels d'une rangée par défaut à une rangée d'extraction cible, en fonction de l'intervalle d'extraction qui modifie dynamiquement un intervalle entre les lignes à extraire, jusqu'à ce que la rangée d'extraction cible disparaisse au-delà de l'image de code à barres.
     
    4. Procédé selon la revendication 2 ou 3, comprenant en outre :

    le comptage d'un certain nombre de fréquences d'occurrence de chaque chaîne de caractères obtenues par l'intermédiaire de l'analyse lorsque la rangée d'extraction cible dépasse l'image de code à barres ; et

    la détermination d'une chaîne de caractères dont le nombre de fréquences d'occurrence est maximal et supérieur à 1 comme résultat d'identification du code à barres dans l'image de code à barres.


     
    5. Procédé selon la revendication 4, comprenant en outre :
    la détermination de l'échec de l'identification de code à barres lorsque le nombre de fréquences d'occurrence de chaque chaîne de caractères obtenue par l'intermédiaire de l'analyse vaut 1.
     
    6. Procédé selon la revendication 1, dans lequel la règle de caractères est qu'aucun caractère prédéfini consécutif n'existe et que les caractères prédéfinis consécutifs ne comprennent pas de lettres majuscules, de lettres minuscules, de nombre de 0 à 9 ni d'espaces.
     
    7. Procédé selon la revendication 1, comprenant en outre :

    l'obtention d'une image contenant le code à barres ; et

    le traitement de l'image par réalisation d'au moins une opération de compression, d'un traitement en niveaux de gris et d'une opération de binarisation.


     
    8. Appareil destiné à l'identification de codes à barres, l'appareil étant configuré pour réaliser toutes les étapes du procédé selon l'une quelconque des revendications 1 à 7.
     




    Drawing

















    Cited references

    REFERENCES CITED IN THE DESCRIPTION



    This list of references cited by the applicant is for the reader's convenience only. It does not form part of the European patent document. Even though great care has been taken in compiling the references, errors or omissions cannot be excluded and the EPO disclaims all liability in this regard.

    Patent documents cited in the description