CN102117399A - Method and device for recognizing document barcode - Google Patents

Method and device for recognizing document barcode Download PDF

Info

Publication number
CN102117399A
CN102117399A CN2009102175230A CN200910217523A CN102117399A CN 102117399 A CN102117399 A CN 102117399A CN 2009102175230 A CN2009102175230 A CN 2009102175230A CN 200910217523 A CN200910217523 A CN 200910217523A CN 102117399 A CN102117399 A CN 102117399A
Authority
CN
China
Prior art keywords
pixels point
official document
monochrome pixels
module
bar code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2009102175230A
Other languages
Chinese (zh)
Inventor
杨健
周欣
葛雷
张清江
张星
张鸿雁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kfky Information & Technology Co Ltd
Original Assignee
Beijing Kfky Information & Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kfky Information & Technology Co Ltd filed Critical Beijing Kfky Information & Technology Co Ltd
Priority to CN2009102175230A priority Critical patent/CN102117399A/en
Publication of CN102117399A publication Critical patent/CN102117399A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method for recognizing the document barcode. The method comprises the following steps: detecting the distribution of black pixel points and white pixel points in a document image to find the starting code and the finish region of the document barcode; detecting the distribution of the black pixel points and the white pixel points between the starting code and the finish region to obtain the color of each model in each layer of the document barcode; and recognizing and reading the information of the document barcode according to the binary value corresponding to the color of each model. The invention also discloses a device for recognizing the document barcode. The method can automatically recognize the information of the document barcode from the document image while acquiring the document image, thereby improving the work efficiency.

Description

A kind of method and apparatus of discerning the official document bar code
Technical field
The present invention relates to Bar Code, relate in particular to a kind of method and apparatus of discerning the official document bar code.
Background technology
Barcode technology is most economical, practical up to now a kind of automatic identification technology, bar code is widely used in all trades and professions, greatly improved the speed of data acquisition and information processing, improved work efficiency, for very big contribution has been made in the scientific and modernization of management.
At present, bar code on the official document is all by manually directly discerning with the scanner scans bar code, according to the difference of scanning theory, scanner can be divided into three kinds in light pen, charge-coupled device (CCD), laser, the bar code that compiles out according to certain rule can be converted to significant information.When discerning by scanner scans, need experience scanning and decipher two processes: because the color of object is by its catoptrical type decided, white object can reflect the visible light of various wavelength, black object then absorbs the visible light of various wavelength, so, when light that the barcode scanner light source sends after reflection on the bar code, reflected light shines on the photoelectric commutator of barcode scanner inside, the reflected light signal that photoelectric commutator is different according to power converts corresponding electric signal to; Electric signal outputs to after the amplifying circuit enhancing signal of barcode scanner, delivers to shaping circuit again, and according to the width difference of informal voucher, secret note, corresponding electric signal duration length is also different, and analog signal conversion is become digital signal, forms by 0 and 1; Then, the code translator of barcode scanner is differentiated bar and empty number by the number of measuring pulse digit electric signal 0,1.Differentiate bar and empty width by measuring the lasting time of 0,1 signal; This moment, resulting data remained rambling, know the information that bar code comprises, and then needed according to bar code corresponding codes rule, for example: shorten version bar code (EAN-8 sign indicating number), change bar symbol into corresponding digital, character information; At last, carry out data processing and management by computer system, the details of article just can be identified.
According to present bar code recognition, after method such as official document is scanned or take pictures is preserved the official document image, still need to use the scanner of identification bar code to carry out the identification of official document bar code, very trouble and process are loaded down with trivial details.
Summary of the invention
In view of this, fundamental purpose of the present invention is to provide a kind of method and apparatus of discerning the official document bar code, can identify the information of official document bar code automatically from the official document image when gathering the official document image.
For achieving the above object, technical scheme of the present invention is achieved in that
A kind of method that realizes discerning the file bar code provided by the invention, this method comprises:
Detect the distribution of the monochrome pixels point in the official document image, find the initial code and the end zone of official document bar code;
Detect the distribution of the monochrome pixels point between initial code and the end zone, obtain the color of every layer of each module in the official document bar code,, discern and read the information of official document bar code according to the binary value of each module color correspondence.
In the such scheme, described official document bar code is the PDF417 sign indicating number.
In the such scheme, the distribution of the monochrome pixels point in the described detection official document image is specially:
The official document image is carried out binaryzation, the earlier horizontal distribution that detects monochrome pixels point line by line, distribution proportion according to monochrome pixels point, search the distribution of the monochrome pixels point of the empty ratio of black and white bar that meets initial code and end zone in the PDF417 standard, when not finding, carry out longitudinally detecting the distribution of monochrome pixels point again, search the distribution that meets the monochrome pixels point of the black and white bar sky ratio of initial code and end zone in the PDF417 standard by row.
In the such scheme, the distribution of the monochrome pixels point between described detection initial code and the end zone is specially:
According to the position of initial code and end zone, detect the monochrome pixels point between initial code and the end zone line by line, delegation's monochrome pixels point of each layer in the official document bar code is determined in the distribution of the monochrome pixels point of more continuous triplex row successively.
In the such scheme, the described black or white color that obtains each module of each layer in the official document bar code is specially: in delegation's monochrome pixels point of one deck, the width that distributes according to monochrome pixels point, and, obtain the black or white color of each module of this layer according to the width of a module.
In the such scheme, the information that the official document bar code was discerned and read to described binary value according to each module color correspondence is specially: according to the binary value of each module color correspondence, the coding rule that comprises 17 modules and character code according to a character code, identification is also read each character code in the official document bar code, wherein, black is 1, and white is 0.
A kind of device of realizing discerning the file bar code provided by the invention, this device comprises: official document bar code locating module, information recognition module; Wherein,
Official document bar code locating module is used for detecting the distribution of the monochrome pixels point of official document image, finds the initial code and the end zone of official document bar code;
Information recognition module is used to detect the distribution of the monochrome pixels point between initial code and the end zone, obtains the color of every layer of each module in the official document bar code, according to the binary value of each module color correspondence, discerns and read the information of official document bar code.
In the such scheme, described information recognition module further comprises: layer detection module, recognition module; Wherein,
Layer detection module, be used to detect the distribution of the monochrome pixels point between initial code and the end zone, by the distribution of the monochrome pixels point of more continuous multirow successively, determine each effective delegation of layer monochrome pixels point in the official document bar code, and send each effective delegation of layer monochrome pixels point to the recognition module;
The recognition module, be used for monochrome pixels point in delegation, width according to the distribution of monochrome pixels point, and the width of a module, obtain the black or white color of each module of each layer, again according to the binary value of each module color correspondence, comprise the coding rule of 17 modules and character code according to a character code, discern and read the information of official document bar code.
A kind of method and apparatus of discerning the file bar code provided by the invention detects the distribution of the monochrome pixels point in the official document image, finds the initial code and the end zone of official document bar code; Detect the distribution of the monochrome pixels point between initial code and the end zone again, obtain the black or white color of each module of each layer in the official document bar code, distinguish out the information of official document bar code according to the binary value of each module color correspondence.According to the solution of the present invention, can be when gathering the official document image, when preserving the official document image as method such as official document being scanned or take pictures, automatically from the official document image, identify the information of official document bar code, thereby reduce the step of official document additionally being carried out bar code scan, save the working time, simplify the official document processing procedure, increase work efficiency.
Description of drawings
Fig. 1 is the composition synoptic diagram of PDF417 sign indicating number;
Fig. 2 is the composition synoptic diagram of a code word in the PDF417 sign indicating number;
Fig. 3 realizes discerning the schematic flow sheet of the method for file bar code for the present invention;
Fig. 4 realizes discerning the structural representation of the device of file bar code for the present invention.
Embodiment
At present, regulation official document bar code is the two-dimensional bar code of PDF417 in the official document bar code standard, PDF417 is by (the American National Standards Institute of ANSI, ANSI) the MH10 SBC-8 council elects the two-dimensional bar code international standard as and formulates one of two-dimensional bar code of scope, mainly is that preparation is applied to shipping parcel and commodity data tag.PDF417 not only has the error detection ability, and the complete information that can read back from impaired bar code, and the error resilient rate reaches as high as 50%.Each PDF417 sign indicating number is also referred to as layer by 3~90 lines and piles up and form, and in order to scan conveniently, all has quiet dead zone, quiet dead zone to be divided into quiet dead zone of level and vertical quiet dead zone around the PDF417 sign indicating number, should be 0.020 cun at least, as shown in Figure 1.
Each floor all comprises following five parts in the PDF417 sign indicating number: initial code, left side mark district, information data area, right mark district, end zone; Wherein, initial code: at the line Far Left; Mark district, a left side: after initial code, be the symbol character of each layer of indication; Information data area: can hold 1~30 data character; Right mark district:, be a designated symbol character in the back of information data area; End zone: at the line rightmost.
Except initial code and end zone, the composition character in mark district, a left side, information data area and right mark district all can be described as character code (Codeword), each character code is made of 17 modules (Modules), each character code can be divided into 4 lines or black line and 4 blank or white line again, and it is wide that each lines can not surpass 6 modules at the most.Each PDF417 sign indicating number varies in size because of data, and the data module number of its line number and every row and character code number can from 1 to 30 wait, and the composition of character code as shown in Figure 2.
Because how much quantity of information is variable in the bar code, more flexible, each PDF417 dimension bar-code can be printed as different Aspect Ratios and density in response to being used for different entity devices, to adapt to the requirement of the printing condition and the condition of scanning.Wherein, the wide X of each module is one of most important size in the PDF417 sign indicating number, and the minimum limit of X value is 0.0075 inch, about 0.191mm, and in same bar code symbol, the value of X is changeless.
The minimum constructive height of PDF417 and length can be calculated by following formula:
W=(17C+69)X+2Q
H=R×Y+2Q
Wherein, W is the bar code width; H is the bar code height; X is that the bar code module is wide; Y is the number of plies; C is the sum of every layer of symbol character, mark district about containing; R is a floor height; Q is a quiet dead zone size.
A key property of PDF417 two-dimensional bar code is that the ability of correcting a mistake automatically is higher, its error correcting ability is relevant with the data quantity that each bar code can be deposited, the PDF417 sign indicating number is divided into nine grades with the error correcting ability, its value from 0 to 8, progression is higher, the error correcting ability is stronger, but it is just fewer to deposit data quantity, and at least 10% inspection character code is enrolled in general recommendations.
Based on above-mentioned PDF417 bar code, basic thought of the present invention is: detect the distribution of the monochrome pixels point in the official document image, find the initial code and the end zone of official document bar code; Detect the distribution of the monochrome pixels point between initial code and the end zone again, obtain the black or white color of each module of each layer in the official document bar code; According to the binary value of each module color correspondence, discern and read the information of official document bar code.
Below by drawings and the specific embodiments the present invention is described in further detail again.
The method that the present invention realizes discerning the file bar code as shown in Figure 3, this method may further comprise the steps:
Step 301: obtain the official document image;
Concrete, can adopt scanner scanning to go out the official document image, or obtain the official document image with camera or facsimile recorder;
Step 302: detect the distribution of the monochrome pixels point in the official document image,, find the initial code and the end zone of official document bar code according to the PDF417 standard;
Concrete, the official document image is carried out binaryzation, that is: with gray-scale value be 0 pixel as black pixel, gray-scale value is that 255 pixel is as the white pixel point.The earlier horizontal distribution that detects monochrome pixels point line by line, every row must be made of at interval several black pixels and several white pixel points; According to the distribution proportion of monochrome pixels point, search the distribution of the monochrome pixels the point whether empty ratio of black and white bar that meets initial code and end zone in the PDF417 standard is arranged, the order of searching comprises from left to right and from right to left; When not finding, carry out detecting by row longitudinally the distribution of monochrome pixels point again, every row are inevitable also to be made of at interval several black pixels and several white pixel points; According to the distribution proportion of monochrome pixels point, search the distribution of the monochrome pixels the point whether empty ratio of black and white bar that meets initial code and end zone in the PDF417 standard is arranged, the order of searching comprises from top to bottom and from top to bottom; When finding, record meets the distributing position of monochrome pixels point of the empty ratio of black and white bar of initial code and end zone, as the initial code and the end zone of the official document bar code of this official document, and is the width that unit calculates initial code with the pixel, finishes to search.
Step 303: detect the distribution of the monochrome pixels point between initial code and the end zone, obtain the color of each module of each layer in the official document bar code,, discern and read the information of official document bar code according to the binary value of each module color correspondence;
Concrete, according to the position of initial code and end zone, detect the monochrome pixels point between initial code and the end zone line by line; Because situations such as distortion, inclination might appear in the image that obtains, when detecting delegation's monochrome pixels point, it might some monochrome pixels points be the same one deck in the official document bar code, for addressing this problem, the monochrome pixels point of more continuous multirow distributes successively, and described multirow is less than a module height of official document bar code in the image.Here with three behavior examples, when the monochrome pixels point distribution of triplex row is identical, regard the same layer of this three behavior as, select wherein delegation, the delegation that distributes in the identical continuous triplex row with last layer monochrome pixels point compares, and with last layer when inequality, this journey monochrome pixels point is considered as belonging to new one deck; When identical with last layer, this journey monochrome pixels point is considered as belonging to last layer, invalid, proceeds the next comparison of triplex row continuously; When for the first time detecting the identical triplex row of monochrome pixels point distribution, do not carry out the comparison with last layer, directly regard wherein delegation's monochrome pixels point of a behavior ground floor as; When the monochrome pixels point of triplex row is distributed with when inequality, this triplex row can not be considered as same one deck, proceeds the next comparison of triplex row continuously; According to above-mentioned method, determine effective delegation monochrome pixels point in each layer of official document bar code;
In the effective delegation of one deck monochrome pixels point, the width that distributes according to monochrome pixels point, and, obtain the black or white color of each module of this layer according to the width of a module; According to the binary value of each module color correspondence, be 1 as black again, white is 0, comprise 17 modules according to a character code, discern and read each character code in the official document bar code, the binary value of described correspondence is predefined, can set black is 1, and white is 0; Also can set black is 0, and white is 1.
As shown in Figure 2, according to the binary value of each module color correspondence, this character code reading is " 10100111111001110 ", according to the coding rule of character code, distinguishes the character code of this group binary value representative; The rest may be inferred, discerns and read the information of each layer in the official document bar code; Wherein, the width of described module can obtain according to the ratio of module and initial code width, as: the initial code width is 51 pixels, and the ratio of module and initial code width is 1:17, then 3 pixels of the width of module.
For realizing said method, the present invention also provides a kind of device of realizing discerning the file bar code, and as shown in Figure 4, this device comprises: official document bar code locating module 41, information recognition module 42; Wherein,
Official document bar code locating module 41 is used for the official document image is carried out binaryzation, detects the distribution of the monochrome pixels point in the official document image, according to the PDF417 standard, according to the distribution proportion of monochrome pixels point, finds the initial code and the end zone of official document bar code;
Information recognition module 42, be used to detect the distribution of the monochrome pixels point between initial code and the end zone, obtain the black or white color of each module of each layer in the official document bar code,, discern and read the information of official document bar code according to the binary value of each module color correspondence;
Described information recognition module further comprises: layer detection module 421, recognition module 422; Wherein,
Layer detection module 421, be used to detect the distribution of the monochrome pixels point between initial code and the end zone, by the distribution of the monochrome pixels point of more continuous multirow successively, determine each effective delegation of layer monochrome pixels point in the official document bar code, and send each effective delegation of layer monochrome pixels point to recognition module 422;
Recognition module 422, be used for monochrome pixels point in delegation, width according to the distribution of monochrome pixels point, and the width of a module, obtain the black or white color of each module of each layer, again according to the binary value of each module color correspondence, comprise the coding rule of 17 modules and character code according to a character code, discern and read the information of official document bar code.
The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (8)

1. a method that realizes discerning the file bar code is characterized in that, this method comprises:
Detect the distribution of the monochrome pixels point in the official document image, find the initial code and the end zone of official document bar code;
Detect the distribution of the monochrome pixels point between initial code and the end zone, obtain the color of every layer of each module in the official document bar code,, discern and read the information of official document bar code according to the binary value of each module color correspondence.
2. method according to claim 1 is characterized in that, described official document bar code is the PDF417 sign indicating number.
3. method according to claim 2 is characterized in that, the distribution of the monochrome pixels point in the described detection official document image is specially:
The official document image is carried out binaryzation, the earlier horizontal distribution that detects monochrome pixels point line by line, distribution proportion according to monochrome pixels point, search the distribution of the monochrome pixels point of the empty ratio of black and white bar that meets initial code and end zone in the PDF417 standard, when not finding, carry out longitudinally detecting the distribution of monochrome pixels point again, search the distribution that meets the monochrome pixels point of the black and white bar sky ratio of initial code and end zone in the PDF417 standard by row.
4. method according to claim 3 is characterized in that, the distribution of the monochrome pixels point between described detection initial code and the end zone is specially:
According to the position of initial code and end zone, detect the monochrome pixels point between initial code and the end zone line by line, delegation's monochrome pixels point of each layer in the official document bar code is determined in the distribution of the monochrome pixels point of more continuous triplex row successively.
5. method according to claim 4, it is characterized in that, the described black or white color that obtains each module of each layer in the official document bar code is specially: in delegation's monochrome pixels point of one deck, width according to the distribution of monochrome pixels point, and, obtain the black or white color of each module of this layer according to the width of a module.
6. method according to claim 5, it is characterized in that, the information that the official document bar code was discerned and read to described binary value according to each module color correspondence is specially: according to the binary value of each module color correspondence, the coding rule that comprises 17 modules and character code according to a character code, identification is also read each character code in the official document bar code, wherein, black is 1, and white is 0.
7. a device of realizing discerning the file bar code is characterized in that, this device comprises: official document bar code locating module, information recognition module; Wherein,
Official document bar code locating module is used for detecting the distribution of the monochrome pixels point of official document image, finds the initial code and the end zone of official document bar code;
Information recognition module is used to detect the distribution of the monochrome pixels point between initial code and the end zone, obtains the color of every layer of each module in the official document bar code, according to the binary value of each module color correspondence, discerns and read the information of official document bar code.
8. device according to claim 7 is characterized in that, described information recognition module further comprises: layer detection module, recognition module; Wherein,
Layer detection module, be used to detect the distribution of the monochrome pixels point between initial code and the end zone, by the distribution of the monochrome pixels point of more continuous multirow successively, determine each effective delegation of layer monochrome pixels point in the official document bar code, and send each effective delegation of layer monochrome pixels point to the recognition module;
The recognition module, be used for monochrome pixels point in delegation, width according to the distribution of monochrome pixels point, and the width of a module, obtain the black or white color of each module of each layer, again according to the binary value of each module color correspondence, comprise the coding rule of 17 modules and character code according to a character code, discern and read the information of official document bar code.
CN2009102175230A 2009-12-31 2009-12-31 Method and device for recognizing document barcode Pending CN102117399A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009102175230A CN102117399A (en) 2009-12-31 2009-12-31 Method and device for recognizing document barcode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009102175230A CN102117399A (en) 2009-12-31 2009-12-31 Method and device for recognizing document barcode

Publications (1)

Publication Number Publication Date
CN102117399A true CN102117399A (en) 2011-07-06

Family

ID=44216162

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009102175230A Pending CN102117399A (en) 2009-12-31 2009-12-31 Method and device for recognizing document barcode

Country Status (1)

Country Link
CN (1) CN102117399A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105512590A (en) * 2015-12-04 2016-04-20 天津智慧信源科技有限责任公司 Code scrambling method for electronic code of RFID labeled product

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1742279A (en) * 2002-12-17 2006-03-01 夏普株式会社 Barcode recognition apparatus

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1742279A (en) * 2002-12-17 2006-03-01 夏普株式会社 Barcode recognition apparatus

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
范哲意等: "基于拍摄图像的PDF417条码识别", 《北京理工大学学报》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105512590A (en) * 2015-12-04 2016-04-20 天津智慧信源科技有限责任公司 Code scrambling method for electronic code of RFID labeled product
CN105512590B (en) * 2015-12-04 2019-01-25 天津智慧信源科技有限责任公司 A kind of scrambling method of RFID tag product electronic code

Similar Documents

Publication Publication Date Title
US6802450B2 (en) Guiding a scanning device to decode 2D symbols
US6685095B2 (en) Apparatus and method for decoding damaged optical codes
US4874936A (en) Hexagonal, information encoding article, process and system
US7380718B2 (en) Method for reading out symbol information and device for reading out symbol information
US4896029A (en) Polygonal information encoding article, process and system
US5155343A (en) Omnidirectional bar code reader with method and apparatus for detecting and scanning a bar code symbol
US7159780B2 (en) Method for reading a symbol having encoded information
US7949187B2 (en) Character string recognition method and device
JPH11502654A (en) Machine readable label
CN105046183A (en) Decoding method and system for distorted QR (Quick Response) code
US20140291402A1 (en) Stack barcode reader and stack barcode reading method
US20070115152A1 (en) Method, apparatus, computer program and sotrage medium for recording a movement of a user unit
JP5676183B2 (en) Bar code reading apparatus and bar code reading method
CN111339797A (en) Decoding method and terminal capable of accurately identifying damaged one-dimensional bar code
CN1074302A (en) Apparatus for reading marks and information
US20120248193A1 (en) Blur Resistant Barcode
CN101901329A (en) Method and device for recognizing low-resolution barcode
CN100356399C (en) Two-dimensional barcode card and its decoding method
JP4652201B2 (en) Bar code symbol information reading method and bar code symbol information reading device
CN102117399A (en) Method and device for recognizing document barcode
JP2011076208A (en) Method and device for reading stacked bar code information
CN1444175A (en) Cmnibearing information synchronous two-dimensional bar code system and reading method
JP5683891B2 (en) Stacked bar code reader and stack bar code reading method
JP5657987B2 (en) Stacked bar code reader and stack bar code reading method
CN110502950A (en) A kind of quick self-adapted binarization method of QR code of uneven illumination

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20110706