[go: up one dir, main page]

CN104899542B - A kind of image-type CMOS bar codes method for quickly identifying and device - Google Patents

A kind of image-type CMOS bar codes method for quickly identifying and device Download PDF

Info

Publication number
CN104899542B
CN104899542B CN201510279823.7A CN201510279823A CN104899542B CN 104899542 B CN104899542 B CN 104899542B CN 201510279823 A CN201510279823 A CN 201510279823A CN 104899542 B CN104899542 B CN 104899542B
Authority
CN
China
Prior art keywords
image
bar code
way
decoding
type cmos
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.)
Active
Application number
CN201510279823.7A
Other languages
Chinese (zh)
Other versions
CN104899542A (en
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.)
GUANGZHOU WINSON INFORMATION TECHNOLOGY Co Ltd
Original Assignee
GUANGZHOU WINSON 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 GUANGZHOU WINSON INFORMATION TECHNOLOGY Co Ltd filed Critical GUANGZHOU WINSON INFORMATION TECHNOLOGY Co Ltd
Priority to CN201510279823.7A priority Critical patent/CN104899542B/en
Publication of CN104899542A publication Critical patent/CN104899542A/en
Application granted granted Critical
Publication of CN104899542B publication Critical patent/CN104899542B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The present invention proposes a kind of image-type CMOS bar codes method for quickly identifying and device, and method includes:Start image-type cmos imaging system and obtain image, and it is buffered in the first data buffer zone and the second data buffer zone respectively;The image that will be buffered in the second data buffer zone carries out binary conversion treatment according to current Binarization methods;To carrying out bar code decoding by the image after binary conversion treatment, and judge whether successfully decoded, in this way, parameter pretreatment;Otherwise, next step is performed;Judge whether all types of Binarization methods all switched, in this way, return;Otherwise, next type Binarization methods are switched to and are returned;The corresponding interface way of output is selected according to interface type parameter value, and the successful bar code of automatic identification is exported by the corresponding interface.Implement image-type CMOS bar codes method for quickly identifying of the invention and device, have the advantages that:The data bit of reading, 360 degree of energy can be greatly improved to read, improve recognition rates.

Description

A kind of image-type CMOS bar codes method for quickly identifying and device
Technical field
Field, more particularly to a kind of image-type CMOS bar codes method for quickly identifying and device are recognized the present invention relates to bar code.
Background technology
According to bar code current applied environment and information quantity requirement, in bar code recognition field, to the reader for recognizing Requirement more and more higher.It is required that reader can read one-dimensional bar code, two-dimensional bar code can be read again;It is required that data bit may be up to More than 500 bar codes, and can the reading of 360 degrees omnidirection angle;And conventional laser reader, CCD readers can only read 100 Bar code within position (typically within 48);Can only be positive and to reading, it is impossible to which 360 degree are read.In addition, conventional laser is read Device, CCD readers can not be recognized is making the bar code of background containing light absorbent for medium.Traditional image-type CMOS two-dimensional scanners are only Serial ports TTL/RS232 outputs are supported, the keyboard of HID containing USB, USB-VCP (CDC), RS485 switching outputs are not supported.Pass System image-type CMOS two-dimensional scanners do not support image in 2 D code export function.One-dimensional bar code decoding lacks translation-angle solution Code, influences recognition rate and decoding speed.Picture pretreatment Binarization methods lack many algorithms switching, influence recognition rate.
The content of the invention
The technical problem to be solved in the present invention is, for the above-mentioned reading of prior art data bit it is less, can not 360 Degree reads, the defect of influence recognition rate, there is provided a kind of data bit that can greatly improve reading, 360 degree of energy read, improve recognition rate Image-type CMOS bar codes method for quickly identifying and device.
The technical solution adopted for the present invention to solve the technical problems is:A kind of image-type CMOS bar codes are constructed quickly to recognize Method, is applied to Processing in Barcode Recognizing System, and the Processing in Barcode Recognizing System includes image-type cmos imaging system, the recognition methods bag Include following steps:
A) start scan function, and start the image-type cmos imaging system;
B) the image-type cmos imaging system obtains image, and the image of acquisition is buffered in into the first data buffering respectively In area and the second data buffer zone;
C the image that) will be buffered in second data buffer zone carries out image according to the Binarization methods of current type Binary conversion treatment;
D) to carrying out one-dimensional bar code decoding by the image after binary conversion treatment, and successfully decoded is judged whether, in this way, Perform step G);Otherwise, step E is performed);
E decoding two-dimensional bar code) is carried out to the image by after binary conversion treatment, and judges whether successfully decoded, In this way, step G is performed);Otherwise, step F is performed);
F) judge whether all types of Binarization methods specified in advance all switched, in this way, return to step B);It is no Then, the Binarization methods of next type, and return to step C are switched to);
G line parameter pretreatment) is entered;The parameter pretreatment includes that the conversion of output interface type and decoded data format turn Change;
H) size according to current interface type parameter value selects the corresponding interface way of output, and defeated by corresponding interface Go out the automatic bar code for being identified as work(.
In image-type CMOS bar code method for quickly identifying of the present invention, also comprise the following steps:
I) judge whether serial ports receives the instruction for deriving original image, in this way, in output first data buffer zone Image information;Otherwise, the judgement of this step is proceeded.
In image-type CMOS bar code method for quickly identifying of the present invention, the step D) further include:
D1 0) is entered as to the anglec of rotation;
D2) will be rotated according to the size of the anglec of rotation by the image after binary conversion treatment;
D3 repeating query decoding) is carried out according to one-dimensional bar code coding schedule, and judges whether decoding succeeds, in this way, perform step G);Otherwise, step D4 is performed);
D4) anglec of rotation in this way, is held plus whether its size after an angle setpoint, is judged more than 180 degree Row step E);Otherwise, return to step D2).
In image-type CMOS bar code method for quickly identifying of the present invention, it is described in advance specify all types of two Value algorithm includes median filtering algorithm, big law and local algorithm.
In image-type CMOS bar code method for quickly identifying of the present invention, when local algorithm is switched to, the office Algorithms comprise the following steps:
C1 ') pixel of acquisition image from the second data buffer zone;
C2 ') carry out assignment to radius reference value and correction factor respectively;
C3 ') calculate the pixel average and standard of the pixel respectively according to the square value size of radius reference value Variance yields;
C4 ') correction factor is multiplied with standard deviation square value, and the product that will be obtained is carried out with the pixel average Addition obtains binary value;
C5 ') to carrying out one-dimensional bar code or decoding two-dimensional bar code by the image after binary conversion treatment, and sentencing decoding to be No success, in this way, performs step G);Otherwise, step C6 ' are performed);
C6 ') size of the radius reference value is converted, and judge the size of the radius reference value after conversion whether more than half Footpath setting value, in this way, performs step G);Otherwise, return to step C2 ').
In image-type CMOS bar code method for quickly identifying of the present invention, the step H) further include:
H1) judge whether interface parameters is equal to the first setting value, in this way, select TTL interfaces or RS232 interfaces output side Formula, and export the successful bar code of automatic identification using the TTL interfaces or RS232 interfaces;Otherwise, step H2 is performed);
H2) judge whether the interface parameters is equal to the second setting value, in this way, select the USB HID keyboard way of outputs, and The successful bar code of automatic identification is exported using the USB HID keyboards;Otherwise, step H3 is performed);
H3) judge whether the interface parameters is equal to the 3rd setting value, in this way, select the USB virtual serial port way of outputs, and The successful bar code of automatic identification is exported using the USB virtual serial ports;Otherwise, step H4 is performed);
H4) judge whether the interface parameters is equal to the 4th setting value, in this way, select the RS485 interface way of outputs, and make The successful bar code of automatic identification is exported with the RS485 interfaces;Otherwise, warning message is pointed out.
The invention further relates to a kind of device for realizing above-mentioned image-type CMOS bar code method for quickly identifying, bar code knowledge is applied to Other system, the Processing in Barcode Recognizing System includes image-type cmos imaging system, and described device includes:
Start unit:For starting scan function, and start the image-type cmos imaging system;
Image obtains buffer unit:For making the image-type cmos imaging system obtain image, and the image that will be obtained It is buffered in respectively in the first data buffer zone and the second data buffer zone;
Binary conversion treatment unit:For the image in second data buffer zone will to be buffered according to the two of current type Value algorithm carries out image binaryzation treatment;
One-dimensional bar code decoding unit:For to carrying out one-dimensional bar code decoding by the image after binary conversion treatment, and Judge whether successfully decoded;
Decoding two-dimensional bar code unit:For carrying out two-dimensional bar solution to the image by after binary conversion treatment Code, and judge whether successfully decoded;
Switching judging unit:Whether all types of Binarization methods for judging to specify in advance all switched, in this way, Return;Otherwise, the Binarization methods of next type are switched to;
Parameter pretreatment unit:For entering line parameter pretreatment;The parameter pretreatment includes that output interface type is changed Changed with decoded data format;
Bar code output unit:For selecting corresponding interface output side according to the size of current interface type parameter value Formula, and the successful bar code of automatic identification is exported by corresponding interface.
In device of the present invention, also include:
Command reception judging unit:For judging whether serial ports receives the instruction for deriving original image, in this way, output is described Image information in first data buffer zone;Otherwise, proceed to judge.
In device of the present invention, the one-dimensional bar code decoding unit is further included:
Assignment module:For being entered as 0 to the anglec of rotation;
Image rotation module:For will be revolved according to the size of the anglec of rotation by the image after binary conversion treatment Turn;
Repeating query decoder module:For carrying out repeating query decoding according to one-dimensional bar code coding schedule, and judge whether decoding succeeds;
Anglec of rotation size judge module:, plus after an angle setpoint, judge that its is big for by the anglec of rotation It is small whether to be more than 180 degree.
In device of the present invention, all types of Binarization methods specified in advance are calculated including medium filtering Method, big law and local algorithm.
Implement image-type CMOS bar codes method for quickly identifying of the invention and device, have the advantages that:Due to making With image-type cmos imaging system, one-dimensional bar code is both read, two-dimensional bar code, barcode data position up to 500 can be read again Above bar code, or even 1024/2048 bar code, can 360 degrees omnidirection angle read, can be the two of the multiple types specified in advance Switched in value algorithm;So its can greatly improve reading data bit, can 360 degree read, raising recognition rates.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is the flow chart of method in image-type CMOS bar codes method for quickly identifying of the present invention and device one embodiment;
Fig. 2 is that, to carrying out one-dimensional bar code decoding by the image after binary conversion treatment in the embodiment, and judgement is The particular flow sheet of no successfully decoded;
Fig. 3 is the particular flow sheet of local algorithm in the embodiment;
Fig. 4 is to select the corresponding interface way of output according to the size of current interface type parameter value in the embodiment, And the particular flow sheet of the successful bar code of automatic identification is exported by corresponding interface;
Fig. 5 is the structural representation of device in the embodiment.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art obtained on the premise of creative work is not made it is all its His embodiment, belongs to the scope of protection of the invention.
In image-type CMOS bar codes method for quickly identifying of the present invention and device embodiment, its image-type CMOS bar codes are quick The flow chart of recognition methods is as shown in Figure 1.Image-type CMOS bar code method for quickly identifying is applied to Processing in Barcode Recognizing System, bar code Identifying system includes image-type cmos imaging system, and in Fig. 1, image-type CMOS bar codes method for quickly identifying includes following step Suddenly:
Step S001 starts scan function, and starts image-type cmos imaging system:In this step, start scan function, And start image-type cmos imaging system.
Step S002 image-type cmos imagings system obtains image, and the image of acquisition is buffered in into the first data respectively delays Rush in area and the second data buffer zone:In this step, image-type cmos imaging system obtains image, after the completion of image is obtained, The image of acquisition is buffered in the first data buffer zone and the second data buffer zone respectively, in the present embodiment, by the first data Buffer tag is buf_F [x], and the second data buffer zone is labeled as into buf_d [x].
The image that step S003 will be buffered in the second data buffer zone carries out figure according to the Binarization methods of current type As binary conversion treatment:In this step, Binarization methods of the image in the second data buffer zone according to current type will be buffered in Image binaryzation treatment is carried out, on how to process, subsequently be will be described in detail.
Step S004 judges whether to be decoded into carrying out one-dimensional bar code decoding by the image after binary conversion treatment Work(:It is noted that the image that image-type cmos imaging system is obtained is likely to be the picture of one-dimensional bar code, it is also possible to The picture of two-dimensional bar.In this step, to carrying out one-dimensional bar code decoding by the image after binary conversion treatment, and judgement is No successfully decoded, if it is determined that result be yes, then perform step S008;Otherwise, step S005 is performed.
Step S005 judges whether to be decoded into carrying out decoding two-dimensional bar code by the image after binary conversion treatment Work(:If the judged result of above-mentioned steps S004 is no, this step is performed.In this step, to by after binary conversion treatment Image carries out decoding two-dimensional bar code, and judges whether successfully decoded, if it is determined that result be yes, then perform step S008; Otherwise, step S006 is performed.
Step S006 judges whether all types of Binarization methods specified in advance all switched:If above-mentioned steps The judged result of S005 is no, then perform this step.In the present embodiment, all types of Binarization methods specified in advance include Median filtering algorithm, big law (OTSU) and local algorithm (Niblack).In this step, all types specified in advance are judged Binarization methods whether all switched, that is, judge whether median filtering algorithm, big law and local algorithm are all switched Cross once, if it is determined that result be yes, then return to step S002;Otherwise, step S007 is performed.
Step S007 is switched to the Binarization methods of next type:If the judged result of above-mentioned steps S006 is no, Perform this step.In this step, the Binarization methods of next type are switched to, that is, be switched to median filtering algorithm, big rule A kind of algorithm not being switched in method and local algorithm.This step, return to step S003 are performed.
Step S008 enters line parameter pretreatment:In this step, enter line parameter pretreatment, parameter pretreatment there are many kinds, For example:Output interface type is changed and decoded data format is changed etc., can specifically need to set corresponding parameter.
Step S009 selects the corresponding interface way of output according to the size of current interface type parameter value, and by corresponding Interface exports the successful bar code of automatic identification:In this step, the size selection according to current interface type parameter value is corresponding The interface way of output, and the successful bar code of automatic identification is exported by corresponding interface.
It is noted that in the present embodiment, using image-type CMOS (such as:MT9V0xx, OV79xx, OV76xx) conduct Image-type cmos imaging system, the image-type cmos imaging system also includes master cpu, and master cpu is ARM, and ARM is selected ARM9/ARM11 series, specially self-carried USB, CSI utilizing camera interface functional chips, for example:Imx257, imx353 series etc. Deng.Due to using image-type cmos imaging system, one-dimensional bar code is both read, two-dimensional bar code can be read again, barcode data position can Up to more than 500 bar codes, or even 1024/2048 bar code, can 360 degrees omnidirection angle read, can be many what is specified in advance Switched in the Binarization methods of individual type;So its can greatly improve reading data bit, can 360 degree read, improve knowledge Reading rate.Also support to contain the bar code that light absorbent makees background for medium simultaneously.
For the present embodiment, when needing to derive original image, image-type CMOS bar code method for quickly identifying is also wrapped Include following steps:
Step S010 judges whether serial ports receives the instruction for deriving original image:After execution of step S009, sheet is performed Step.In this step, judge serial ports whether receive derive original image instruction, if it is determined that result be yes, then perform step Rapid S011;Otherwise, the judgement of this step is proceeded.
Step S011 exports the image information in the first data buffer zone:If the judged result of above-mentioned steps S010 is It is then to perform this step.In this step, the image information in the first data buffer zone of output.So the present invention is supported in output After recognizing successfully bar code, receiving instruction control derives the original image for recognizing successfully bar code.
For the present embodiment, above-mentioned steps S004 can also be refined further, the flow chart such as Fig. 2 institutes after its refinement Show.In Fig. 2, above-mentioned steps S004 is further included:
Step S41 is entered as 0 to the anglec of rotation:In this step, 0, in the present embodiment is entered as to the anglec of rotation, for side Just describe, the anglec of rotation is compared in being angle, this step, that is, make angle=0.
Step S42 will be rotated by the image after binary conversion treatment according to the size of the anglec of rotation:In this step, will Rotated according to the size of the anglec of rotation by the image after binary conversion treatment, that is, by by the figure after binary conversion treatment As rotation angle degree.
Step S43 carries out repeating query decoding according to one-dimensional bar code coding schedule, and judges whether decoding succeeds:In this step, Repeating query decoding is carried out according to one-dimensional bar code coding schedule, and judges whether decoding succeeds, if it is determined that result be yes, then perform Step S006;Otherwise, step S44 is performed.
After the anglec of rotation is added an angle setpoint by step S44, judge its size whether more than 180 degree:If on The judged result for stating step S43 is no, then perform this step.In this step, after the anglec of rotation is added into an angle setpoint, Whether its size is judged more than 180 degree, specifically, in the present embodiment, during angle setpoint is 15, this step, that is, is made Whether angle=angle+15, then judge angle more than 180 degree, if it is determined that result be yes, then execution step S005; Otherwise, return to step S42.One-dimensional bar code decoding and decoding two-dimensional bar code are carried out classification decoding by the present invention, in one-dimensional bar When shape code is decoded, decoded by the transformation of the anglec of rotation by by image, can so be improved recognition rate and decoding speed.Value Obtain one to be mentioned that, under the certain situation of the present embodiment, the size of above-mentioned angle setpoint can also be other values, specially many It is few, can flexibly be set according to actual conditions.
In the present embodiment, when Binarization methods are switched to local algorithm, its flow chart is as shown in Figure 3.In Fig. 3, the office Algorithms comprise the following steps:
Step S31 ' obtain the pixel of image from the second data buffer zone:In this step, obtained from buf_d [x] The pixel of image.
Step S32 ' carry out assignment to radius reference value and correction factor respectively:In this step, radius reference value is given respectively Assignment is carried out with correction factor, is described for convenience, in the present embodiment, radius reference value and correction factor mark are designated as R respectively And K.
Step S33 ' calculate the pixel average and standard of pixel according to the square value size of radius reference value respectively Variance yields:In this step, the square value size according to radius reference value calculates the pixel average and standard of pixel respectively Variance yields, m (x, y) is labeled as by the pixel average of pixel, and standard deviation square value is labeled as S (x, y), and (x, y) is pixel Coordinate, specifically, according to the size of R*R, m (x, y) and S (x, y) is calculated respectively.
With standard deviation square value be multiplied correction factor by step S34 ', and the product that will be obtained is added with pixel average Obtain binary value:In the present embodiment, binary value is labeled as T (x, y), in this step, that is, T (x, y)=m (x, y)+ K*S (x, y).
Step S35 ' sentence solution to carrying out one-dimensional bar code or decoding two-dimensional bar code by the image after binary conversion treatment Whether code succeeds:In this step, to carrying out one-dimensional bar code or decoding two-dimensional bar code by the image after binary conversion treatment, and Sentence whether decoding succeeds, if it is determined that result be yes, then execution step S006;Otherwise, step S36 ' are performed.
Whether step S36 ' convert the size of radius reference value, and judge the size of the radius reference value after conversion more than half Footpath setting value:If the judged result of above-mentioned steps S35 ' is no, this step is performed.In the present embodiment, radius setting value is 5, in this step, convert the size of R, and whether judge R more than 5, if it is determined that result be yes, then execution step S006;It is no Then, return to step S32 '.So it is achieved that local algorithm.
For the present embodiment, above-mentioned steps S009 can also be refined further, the flow chart such as Fig. 4 institutes after its refinement Show.In Fig. 4, above-mentioned steps S009 is further included:
Step S91 judges whether interface parameters is equal to the first setting value:In the present embodiment, the interface parameters of every kind of interface Size is all different.In this step, judge interface parameters whether be equal to the first setting value, if it is determined that result be yes, then hold Row step S92;Otherwise, step S93 is performed.In the present embodiment, interface parameters is labeled as transmit_mode.The present embodiment In, the first setting value is 0x30, and certainly, under the certain situation of the present embodiment, the size of the first setting value can also be other Value, can as the case may be set its size.
Step S92 selects TTL interfaces or the RS232 interface way of outputs, and is exported certainly using TTL interfaces or RS232 interfaces The dynamic successful bar code of identification:If the judged result of above-mentioned steps S91 is yes, this step is performed.In this step, selection TTL interfaces or the RS232 interface way of outputs, and export the successful bar code of automatic identification using TTL interfaces or RS232 interfaces.
Step S93 judges whether interface parameters is equal to the second setting value:If the judged result of above-mentioned steps S91 is no, Then perform this step.In this step, judge transmit_mode whether be equal to the second setting value, if it is determined that result be it is yes, Then perform step S94;Otherwise, step S95 is performed.In the present embodiment, the second setting value is 0x31, certainly, in the present embodiment Under certain situation, the size of the second setting value can also be other values, can as the case may be set its size.
Step S94 selects the USB HID keyboard way of outputs, and exports the successful bar of automatic identification using USB HID keyboards Shape code:If the judged result of above-mentioned steps S93 is yes, this step is performed.In this step, selection USB HID keyboard outputs Mode, and export the successful bar code of automatic identification using USB HID keyboards.
Step S95 judges whether interface parameters is equal to the 3rd setting value:If the judged result of above-mentioned steps S93 is no, Then perform this step.In this step, judge transmit_mode whether be equal to the 3rd setting value, if it is determined that result be it is yes, Then perform step S96;Otherwise, step S97 is performed.In the present embodiment, the 3rd setting value is 0x32, certainly, in the present embodiment Under certain situation, the size of the 3rd setting value can also be other values, can as the case may be set its size.
Step S96 selects the USB virtual serial port way of outputs, and exports the successful bar of automatic identification using USB virtual serial ports Shape code:If the judged result of above-mentioned steps S95 is yes, this step is performed.In this step, selection USB virtual serial port outputs Mode, and export the successful bar code of automatic identification using USB virtual serial ports.
Step S97 judges whether interface parameters is equal to the 4th setting value:If the judged result of above-mentioned steps S95 is no, Then perform this step.In this step, judge transmit_mode whether be equal to the 4th setting value, if it is determined that result be it is yes, Then perform step S98;Otherwise, step S99 is performed.In the present embodiment, the 4th setting value is 0x34, certainly, in the present embodiment Under certain situation, the size of the 4th setting value can also be other values, can as the case may be set its size.
Step S98 selects the RS485 interface way of outputs, and exports the successful bar code of automatic identification using RS485 interfaces: If the judged result of above-mentioned steps S97 is yes, this step is performed.In this step, the RS485 interface way of outputs are selected, and The successful bar code of automatic identification is exported using RS485 interfaces.
Step S99 points out warning message:If the judged result of above-mentioned steps S97 is no, this step is performed.This step In, point out warning message.The present invention has powerful predeterminable processing parameter and abundant output interface, can only support serial ports TTL/RS232 is exported, while supporting the keyboards of HID containing USB (USB HID keyboard), USB virtual serial ports (USB-VCP (CDC)), RS485 switchings output.
The present embodiment further relates to a kind of device for realizing above-mentioned image-type CMOS bar code method for quickly identifying, its structural representation Figure is as shown in Figure 5.The device is applied to Processing in Barcode Recognizing System, and the Processing in Barcode Recognizing System includes image-type cmos imaging system, Fig. 5 In, the device include start unit 1, image obtain buffer unit 2, binary conversion treatment unit 3, one-dimensional bar code decoding unit 4, Decoding two-dimensional bar code unit 5, switching judging unit 6, parameter pretreatment unit 7 and bar code output unit 8;Wherein, start Unit 1 is used to start scan function, and starts image-type cmos imaging system;Image obtains buffer unit 2 to be used to make image-type Cmos imaging system obtains image, and the image of acquisition is buffered in into the first data buffer zone and the second data buffer zone respectively In;Binary conversion treatment unit 3 is used to that binaryzation of the image in second data buffer zone according to current type will to be buffered in Algorithm carries out image binaryzation treatment;One-dimensional bar code decoding unit 4 is used for carrying out one by the image after binary conversion treatment Dimension bar code decoding, and judge whether successfully decoded;Decoding two-dimensional bar code unit 5 is used for by the figure after binary conversion treatment As carrying out decoding two-dimensional bar code, and judge whether successfully decoded;Switching judging unit 6 is used for all classes for judging to specify in advance Whether the Binarization methods of type all switched, and in this way, returned;Otherwise, the Binarization methods of next type are switched to, are specified in advance All types of Binarization methods include median filtering algorithm, big law and local algorithm.Parameter pretreatment unit 7 be used for into Line parameter is pre-processed;Parameter pretreatment includes the conversion of output interface type and decoded data format conversion;Bar code output unit 8 It is for selecting the corresponding interface way of output according to the size of current interface type parameter value and automatic by the output of corresponding interface Recognize successful bar code.Due to using image-type cmos imaging system, one-dimensional bar code is both read, two-dimensional strip can be read again Code, barcode data position may be up to more than 500 bar codes, or even 1024/2048 bar code, can the reading of 360 degrees omnidirection angle, energy Switched in the Binarization methods of the multiple types specified in advance;So its can greatly improve reading data bit, can 360 Degree reads, improves recognition rate.Also support to contain the bar code that light absorbent makees background for medium simultaneously.
For the present embodiment, when needing to derive original image, the device also includes command reception judging unit 9, refers to Order receives judging unit 9 to be used to judge whether serial ports receives the instruction for deriving original image, in this way, exports the first data buffer zone In image information;Otherwise, proceed to judge.It supports that after output recognizes successfully bar code receiving instruction control derives Recognize the original image of successfully bar code.
In the present embodiment, one-dimensional bar code decoding unit 4 further includes assignment module 41, image rotation module 42, wheel Follow decoder module 43 and anglec of rotation size judge module 44;Wherein, assignment module 41 is used to be entered as 0 to the anglec of rotation;Figure As rotary module 42 is used to be rotated according to the size of the anglec of rotation by the image after binary conversion treatment;Repeating query decodes mould Block 43 is used to carry out repeating query decoding according to one-dimensional bar code coding schedule, and judges whether decoding succeeds;Anglec of rotation size judges After module 44 is used to for the anglec of rotation to add an angle setpoint, judge its size whether more than 180 degree.In one-dimensional bar code During decoding, decoded by the transformation of the anglec of rotation by by image, can so be improved recognition rate and decoding speed.
In a word, in the present embodiment, master cpu is made as imaging system, ARM9/ARM11 using image-type CMOS;Both read One-dimensional bar code is taken, two-dimensional bar code can be read again;Barcode data position may be up to more than 500 bar codes, or even 1024/2048 bar Code;Can the reading of 360 degrees omnidirection angle;Support to contain the bar code that light absorbent makees background for medium;With powerful predeterminable treatment Parameter and abundant output interface, can only support serial ports TTL/RS232 output, at the same also support the keyboard of HID containing USB, USB-VCP (CDC), RS485 switching output;Support after output recognizes successfully bar code, receive instruction control derivation and be identified as The original image of work(bar code;One-dimensional, decoding two-dimensional bar code classification decoding, in one-dimensional bar code decoding, increases image by rotation Gyration transformation decoding, improves recognition rate and decoding speed;Increase various binary conversion treatment algorithms, switching is used, improve recognition Rate.
Presently preferred embodiments of the present invention is the foregoing is only, is not intended to limit the invention, it is all in essence of the invention Within god and principle, any modification, equivalent substitution and improvements made etc. should be included within the scope of the present invention.

Claims (8)

1. a kind of image-type CMOS bar code method for quickly identifying, it is characterised in that be applied to Processing in Barcode Recognizing System, the bar code is known Other system includes image-type cmos imaging system, and the recognition methods comprises the following steps:
A) start scan function, and start the image-type cmos imaging system;
B) the image-type cmos imaging system obtains image, and by the image of acquisition be buffered in respectively the first data buffer zone and In second data buffer zone;
C the image that) will be buffered in second data buffer zone carries out image two-value according to the Binarization methods of current type Change is processed;
D) to carrying out one-dimensional bar code decoding by the image after binary conversion treatment, and judge whether successfully decoded, in this way, perform Step G);Otherwise, step E is performed);
E decoding two-dimensional bar code) is carried out to the image by after binary conversion treatment, and judges whether successfully decoded, in this way, Perform step G);Otherwise, step F is performed);
F) judge whether all types of Binarization methods specified in advance all switched, in this way, return to step B);Otherwise, cut Change to the Binarization methods of next type, and return to step C);
G line parameter pretreatment) is entered;The parameter pretreatment includes the conversion of output interface type and decoded data format conversion;
H) size according to current interface type parameter value selects the corresponding interface way of output, and by the output of corresponding interface certainly The dynamic successful bar code of identification;
The step D) further include:
D1 0) is entered as to the anglec of rotation;
D2) will be rotated according to the size of the anglec of rotation by the image after binary conversion treatment;
D3 repeating query decoding) is carried out according to one-dimensional bar code coding schedule, and judges whether decoding succeeds, in this way, perform step G);It is no Then, step D4 is performed);
D4 the anglec of rotation in this way) is performed into step plus whether its size after an angle setpoint, is judged more than 180 degree Rapid E);Otherwise, return to step D2).
2. image-type CMOS bar code method for quickly identifying according to claim 1, it is characterised in that also including following step Suddenly:
I) judge whether serial ports receives the instruction for deriving original image, in this way, export the image in first data buffer zone Information;Otherwise, the judgement of this step is proceeded.
3. image-type CMOS bar code method for quickly identifying according to claim 1, it is characterised in that described in advance to specify All types of Binarization methods include median filtering algorithm, big law and local algorithm.
4. image-type CMOS bar code method for quickly identifying according to claim 3, it is characterised in that when being switched to local calculation During method, the local algorithm comprises the following steps:
C1 ') pixel of acquisition image from the second data buffer zone;
C2 ') carry out assignment to radius reference value and correction factor respectively;
C3 ') calculate the pixel average and standard variance of the pixel respectively according to the square value size of radius reference value Value;
C4 ') correction factor is multiplied with standard deviation square value, and the product that will be obtained is added with the pixel average Obtain binary value;
C5 ') to carrying out one-dimensional bar code or decoding two-dimensional bar code by the image after binary conversion treatment, and sentence decoding whether into Work(, in this way, performs step G);Otherwise, step C6 ' are performed);
C6 ') size of the radius reference value is converted, and judge whether the size of the radius reference value after conversion sets more than radius Definite value, in this way, performs step G);Otherwise, return to step C2 ').
5. image-type CMOS bar code method for quickly identifying according to claim 1, it is characterised in that the step H) enter one Step includes:
H1) judge whether interface parameters is equal to the first setting value, in this way, select TTL interfaces or the RS232 interface way of outputs, and The successful bar code of automatic identification is exported using the TTL interfaces or RS232 interfaces;Otherwise, step H2 is performed);
H2) judge whether the interface parameters is equal to the second setting value, in this way, select the USB HID keyboard way of outputs, and use The USB HID keyboards export the successful bar code of automatic identification;Otherwise, step H3 is performed);
H3) judge whether the interface parameters is equal to the 3rd setting value, in this way, select the USB virtual serial port way of outputs, and use The USB virtual serial ports export the successful bar code of automatic identification;Otherwise, step H4 is performed);
H4) judge whether the interface parameters is equal to the 4th setting value, in this way, select the RS485 interface way of outputs, and use institute State the RS485 interfaces output successful bar code of automatic identification;Otherwise, warning message is pointed out.
6. a kind of device for realizing image-type CMOS bar code method for quickly identifying as claimed in claim 1, it is characterised in that should For Processing in Barcode Recognizing System, the Processing in Barcode Recognizing System includes image-type cmos imaging system, and described device includes:
Start unit:For starting scan function, and start the image-type cmos imaging system;
Image obtains buffer unit:For making the image-type cmos imaging system obtain image, and the image difference that will be obtained It is buffered in the first data buffer zone and the second data buffer zone;
Binary conversion treatment unit:For binaryzation of the image in second data buffer zone according to current type will to be buffered in Algorithm carries out image binaryzation treatment;
One-dimensional bar code decoding unit:For to carrying out one-dimensional bar code decoding by the image after binary conversion treatment, and judge Whether successfully decoded;
Decoding two-dimensional bar code unit:For carrying out decoding two-dimensional bar code to the image by after binary conversion treatment, and Judge whether successfully decoded;
Switching judging unit:Whether all types of Binarization methods for judging to specify in advance all switched, and in this way, returned Return;Otherwise, the Binarization methods of next type are switched to;
Parameter pretreatment unit:For entering line parameter pretreatment;The parameter pretreatment includes that the conversion of output interface type is conciliate Code Data Format Transform;
Bar code output unit:For selecting the corresponding interface way of output according to the size of current interface type parameter value, and The successful bar code of automatic identification is exported by corresponding interface;
The one-dimensional bar code decoding unit is further included:
Assignment module:For being entered as 0 to the anglec of rotation;
Image rotation module:For will be rotated according to the size of the anglec of rotation by the image after binary conversion treatment;
Repeating query decoder module:For carrying out repeating query decoding according to one-dimensional bar code coding schedule, and judge whether decoding succeeds;
Anglec of rotation size judge module:, plus after an angle setpoint, judge that its size is for by the anglec of rotation It is no more than 180 degree.
7. device according to claim 6, it is characterised in that also include:
Command reception judging unit:For judging whether serial ports receives the instruction for deriving original image, in this way, output described first Image information in data buffer zone;Otherwise, proceed to judge.
8. device according to claim 7, it is characterised in that all types of Binarization methods bags specified in advance Include median filtering algorithm, big law and local algorithm.
CN201510279823.7A 2015-05-27 2015-05-27 A kind of image-type CMOS bar codes method for quickly identifying and device Active CN104899542B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510279823.7A CN104899542B (en) 2015-05-27 2015-05-27 A kind of image-type CMOS bar codes method for quickly identifying and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510279823.7A CN104899542B (en) 2015-05-27 2015-05-27 A kind of image-type CMOS bar codes method for quickly identifying and device

Publications (2)

Publication Number Publication Date
CN104899542A CN104899542A (en) 2015-09-09
CN104899542B true CN104899542B (en) 2017-06-20

Family

ID=54032200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510279823.7A Active CN104899542B (en) 2015-05-27 2015-05-27 A kind of image-type CMOS bar codes method for quickly identifying and device

Country Status (1)

Country Link
CN (1) CN104899542B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729792A (en) * 2017-10-23 2018-02-23 广州市韦尔讯信息科技有限公司 Image-type CMOS mobile payments method for quickly identifying and device
CN109255277B (en) * 2018-08-31 2020-04-28 阿里巴巴集团控股有限公司 Two-dimensional code analysis method and device
CN109376568A (en) * 2018-09-19 2019-02-22 上海商米科技有限公司 Identify the method, apparatus and system of bar code
CN110245537B (en) * 2019-05-28 2020-10-02 北京三快在线科技有限公司 Graphic code decoding method, device, storage medium and electronic equipment
CN111435417B (en) * 2020-01-14 2023-07-07 珠海市杰理科技股份有限公司 Image analysis method, device and storage medium for bar code scanning
CN112287702B (en) * 2020-05-19 2023-03-14 珠海市杰理科技股份有限公司 Code scanning method and device without external memory, scanning equipment and mobile terminal
CN113111675B (en) * 2021-04-19 2021-10-12 广州讯宝电子科技有限公司 Method and system for rapidly identifying bar code based on bar code scanner

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101499135A (en) * 2008-01-29 2009-08-05 茂森科技股份有限公司 Quasi-omni-directional bar code scanner
CN101751591A (en) * 2010-01-14 2010-06-23 复旦大学 High-capacity two-dimensional barcode capable of recording voice message and reader
US7949155B2 (en) * 2005-03-08 2011-05-24 Fuji Xerox Co., Ltd. Image processing apparatus, image processing method, and storage medium
CN202584157U (en) * 2012-05-21 2012-12-05 深圳市民德电子科技有限公司 Two-dimensional bar code reading system
CN204302987U (en) * 2014-11-26 2015-04-29 戴银飞 A kind of two-dimension code recognition device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6561428B2 (en) * 1997-10-17 2003-05-13 Hand Held Products, Inc. Imaging device having indicia-controlled image parsing mode
US7128266B2 (en) * 2003-11-13 2006-10-31 Metrologic Instruments. Inc. Hand-supportable digital imaging-based bar code symbol reader supporting narrow-area and wide-area modes of illumination and image capture

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7949155B2 (en) * 2005-03-08 2011-05-24 Fuji Xerox Co., Ltd. Image processing apparatus, image processing method, and storage medium
CN101499135A (en) * 2008-01-29 2009-08-05 茂森科技股份有限公司 Quasi-omni-directional bar code scanner
CN101751591A (en) * 2010-01-14 2010-06-23 复旦大学 High-capacity two-dimensional barcode capable of recording voice message and reader
CN202584157U (en) * 2012-05-21 2012-12-05 深圳市民德电子科技有限公司 Two-dimensional bar code reading system
CN204302987U (en) * 2014-11-26 2015-04-29 戴银飞 A kind of two-dimension code recognition device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"二维条码识读技术及其应用研究";吴佳鹏;《中国博士学位论文全文数据库 信息科技辑》;20101115;正文第18页-109页 *

Also Published As

Publication number Publication date
CN104899542A (en) 2015-09-09

Similar Documents

Publication Publication Date Title
CN104899542B (en) A kind of image-type CMOS bar codes method for quickly identifying and device
US6814290B2 (en) Method for processing images captured with bar code reader having area image sensor
CN114127833B (en) Display screen configuration method, device and system and computer readable storage medium
US6264105B1 (en) Bar code reader configured to read fine print barcode symbols
EP2275968A1 (en) Code type determining method and code boundary detecting method
CN113255829B (en) Zero sample image target detection method and device based on deep learning
CN104298953A (en) Method and system for recognizing barcodes in batches
CN111414837A (en) Gesture recognition method and device, computer equipment and storage medium
CN103034831A (en) Method and system for identifying linear bar code
CN102393906A (en) Computer vision inspection technology-based method for rapid detection and extraction of two-dimensional code
KR102366396B1 (en) RGB-D Data and Deep Learning Based 3D Instance Segmentation Method and System
CN103793679A (en) One-dimensional bar code recognition method based on DaVinci technology
EP2052331A1 (en) System of implementing user handwriting and method thereof
KR20200087243A (en) Grain recognition methods, devices and computer storage media
CN109670362A (en) Bar code scanning method and device
JP6424432B2 (en) Control device, robot system, robot and robot control method
WO2006100720A1 (en) Code image processing method
JP2022111038A (en) Optical information reader
CN114463719B (en) Parking space number detection method, detection device, vehicle and storage medium
CN116033633A (en) Light control method, device, equipment and storage medium based on deep learning
CN105631395A (en) Iris recognition-based terminal control method and device
CN101075297A (en) Universal encoding-decoding and read-write device for non-contacting IC card
KR101562933B1 (en) System and method for actuator sensor tag
CN106156676B (en) A kind of image-type CCD bar code method for quickly identifying and device
CN101882201A (en) Barcode decoding chip and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant