CN106228097A - bar code quality level detection method and device - Google Patents

bar code quality level detection method and device Download PDF

Info

Publication number
CN106228097A
CN106228097A CN201610552113.1A CN201610552113A CN106228097A CN 106228097 A CN106228097 A CN 106228097A CN 201610552113 A CN201610552113 A CN 201610552113A CN 106228097 A CN106228097 A CN 106228097A
Authority
CN
China
Prior art keywords
bar code
symbol contrast
degree
credit rating
described bar
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.)
Granted
Application number
CN201610552113.1A
Other languages
Chinese (zh)
Other versions
CN106228097B (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.)
Luster LightTech Co Ltd
Original Assignee
Luster LightTech 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 Luster LightTech Co Ltd filed Critical Luster LightTech Co Ltd
Priority to CN201610552113.1A priority Critical patent/CN106228097B/en
Publication of CN106228097A publication Critical patent/CN106228097A/en
Application granted granted Critical
Publication of CN106228097B publication Critical patent/CN106228097B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10544Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06046Constructional details

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Electromagnetism (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)

Abstract

The invention discloses a kind of bar code quality level detection method and device, after obtaining bar code, extract the symbol contrast of bar code, it is judged that whether symbol contrast is less than predetermined symbol contrast;If symbol contrast is less than predetermined symbol contrast, then the credit rating exporting bar code is F;If symbol contrast is more than or equal to predetermined symbol contrast, then bar code is decoded;Judge whether bar code can be decoded;If can not be decoded, then the credit rating exporting bar code is F;If can be decoded, then extract the modulation ratio of bar code, decodable code degree and degree of imperfection, and according to modulation ratio, the credit rating of bar code is evaluated by decodable code degree and degree of imperfection respectively, and generate three credit rating results, select credit rating minimum in three credit rating results as the credit rating of bar code;The credit rating of bar code can be detected by the present invention automatically, it is to avoid carries out the work waste that the judgement of credit rating is caused after the parameters of artificial detection bar code again, saves manpower, improve detection efficiency.

Description

Bar code quality level detection method and device
Technical field
The present invention relates to bar code detection technique field, particularly to a kind of bar code quality level detection method and device.
Background technology
Bar code is usually one group of coded identification formed according to the most regularly arranged bar, null symbol, specific in order to represent Character, numeral and symbolic information, this coded identification can be for machine recognition.The production of article can be recorded by bar code The much information such as state, manufacturing firm, trade name and date of manufacture, drastically increases information gathering and the speed of data process Degree, therefore, bar code is widely used in all trades and professions.
Can bar code be accurately identified the print quality depending greatly on bar code.Affect bar code printing quality Factor includes the many kinds of parameters such as squeegee pressure, ink usage, ink viscosity and temperature, in the print procedure of bar code, if Control these parameters bad, it is easy to causing the bar code printed to there is some defect, the color such as bar code is shallower, and bar code is rubbed Dirty etc., make troubles for user.The national standard of existing " inspection of bar code symbol printing quality " is by the quality of bar code Grade is divided into 5 grades, respectively A, B, C, D, F grade.Wherein, A is highest ranking, i.e. optimal quality;F is the lowest class, The most off quality.The detection of bar code quality grade can quantify the detection to some design parameters to bar code, as symbol contrast, Modulation ratio, decodable code degree, degree of imperfection etc..Existing bar code quality level detection method generally uses artificial detection, i.e. utilizes and sweeps After the devices such as code rifle manually detect the parameters of bar code, in conjunction with national standard, it is judged that the quality etc. corresponding to parameters Level, and using minimum grade as the credit rating of bar code.
But, in the actual production of bar code, barcoded color is shallower and bar code is that be easiest to occur two ask by set-off Topic.Barcoded color is shallower may cause symbol contrast too low, and then needs when being likely to result in decoding repeatedly could bar code scan Determine whether bar code can be decoded, cause detection efficiency to reduce;Bar code may be directly resulted in bar code by set-off and can not be decoded, this Either way will cause the off quality of bar code.Therefore, credit rating is carried out again after the parameters of artificial detection bar code Judgement, may expend substantial amounts of manpower, cause work to waste, detection efficiency is low.
Summary of the invention
The goal of the invention of the present invention is to provide a kind of bar code quality level detection method and device, to solve prior art The problem that detection efficiency is low.
First aspect according to an embodiment of the invention, it is provided that a kind of bar code quality level detection method, described method Comprise the following steps:
Obtain bar code;
Extract the symbol contrast of described bar code;
Judging whether described symbol contrast is less than predetermined symbol contrast, described predetermined symbol contrast is right by credit rating D The minimum symbol contrast answered;
If described symbol contrast is less than described predetermined symbol contrast, then the credit rating exporting described bar code is F;
If described symbol contrast is more than or equal to described predetermined symbol contrast, then described bar code is decoded;
Judge whether described bar code can be decoded;
If described bar code can not be decoded, then the credit rating exporting described bar code is F;
If described bar code can be decoded, extract the modulation ratio of described bar code, decodable code degree and degree of imperfection the most respectively;
According to described modulation ratio, the credit rating of described bar code is evaluated by decodable code degree and degree of imperfection respectively, and raw Become three credit rating results;
Export the credit rating minimum in described three the credit rating results credit rating as described bar code.
Specifically, described acquisition bar code includes:
Gather the image of described bar code;
Described image is converted to digital signal by analogue signal.
Optionally, the symbol contrast of the described bar code of described extraction includes:
Being scanned the diverse location of described bar code respectively, the symbol corresponding to each position extracting described scanning is anti- Difference sample;Described diverse location refers to that the height scanning described bar code is different;
The meansigma methods of calculated all symbol contrast samples is as the symbol contrast of described bar code.
Optionally, the symbol contrast of the described bar code of described extraction includes:
Being scanned the diverse location of described bar code respectively, the symbol corresponding to each position extracting described scanning is anti- Difference sample;Described diverse location refers to that the height scanning described bar code is different;
Extract the symbol contrast as described bar code of the minima in all symbol contrast samples obtained.
Specifically, the modulation ratio of the described bar code of described extraction, decodable code degree and degree of imperfection include:
Respectively the diverse location of described bar code is scanned, extracts the ratio of the modulation corresponding to each position of described scanning Sample, decodable code degree sample and degree of imperfection sample;Described diverse location refers to that the height scanning described bar code is different;
Calculated all modulation than the meansigma methods of sample as the modulation ratio of described bar code, calculated all can The meansigma methods of decoding degree sample is as the decodable code degree of described bar code, the meansigma methods conduct of calculated all defect degree sample The degree of imperfection of described bar code.
Second aspect according to an embodiment of the invention, it is provided that a kind of bar code quality grade detection device, including:
Bar code acquisition module, is used for obtaining bar code;
First parameter extraction module, for extracting the symbol contrast of described bar code;
First judge module, is used for judging whether described symbol contrast is less than predetermined symbol contrast, described predetermined symbol is anti- The difference minimum symbol contrast corresponding to credit rating D;
First credit rating output module, if for described symbol contrast less than described predetermined symbol contrast, output is described The credit rating of bar code is F;
Bar code decoding module, if for described symbol contrast more than or equal to described predetermined symbol contrast, to described bar code It is decoded;
Second judge module, is used for judging whether described bar code can be decoded;
Second credit rating output module, if can not be decoded for described bar code, exports the credit rating of described bar code For F;
Second parameter extraction module, if can be decoded for described bar code, extracts the modulation ratio of described bar code respectively, can translate Code degree and degree of imperfection;
Quality grade evaluation module, for according to described modulation ratio, decodable code degree and degree of imperfection are respectively to described bar code Credit rating is evaluated, and generates three credit rating results;
3rd credit rating output module, for exporting credit rating conduct minimum in described three credit rating results The credit rating of described bar code.
Specifically, described bar code acquisition module includes:
Image acquisition submodule, for gathering the image of described bar code;
Image transform subblock, for being converted to digital signal by described image by analogue signal.
Optionally, described first parameter extraction module includes:
First extracts submodule, for being scanned the diverse location of described bar code respectively, extracts the every of described scanning Symbol contrast sample corresponding to individual position;Described diverse location refers to that the height scanning described bar code is different;
First calculating sub module, for the meansigma methods of calculated all symbol contrast samples as the symbol of described bar code Number contrast.
Optionally, described first parameter extraction module includes:
First extracts submodule, for being scanned the diverse location of described bar code respectively, extracts the every of described scanning Symbol contrast sample corresponding to individual position;Described diverse location refers to that the height scanning described bar code is different;
Minima extracts submodule, for extracting the minima in all symbol contrast samples obtained as described bar code Symbol contrast.
Specifically, described second parameter extraction module includes:
Second extracts submodule, for being scanned the diverse location of described bar code respectively, extracts the every of described scanning Modulation corresponding to individual position is than sample, decodable code degree sample and degree of imperfection sample;Described diverse location refers to scan described bar The height of code is different;
Second calculating sub module, for calculated all modulation than the meansigma methods of sample as the modulation of described bar code Ratio, the meansigma methods of calculated all decodable code degree samples is as the decodable code degree of described bar code, calculated all scarce Fall into the meansigma methods degree of imperfection as described bar code of degree sample.
From above technical scheme, a kind of bar code quality level detection method that the embodiment of the present invention provides and device, After obtaining bar code, first extract the symbol contrast of bar code, it is judged that whether symbol contrast is less than predetermined symbol contrast;Predetermined symbol is anti- The difference minimum symbol contrast corresponding to credit rating D;If symbol contrast is less than predetermined symbol contrast, then export the quality of bar code Grade is F;If symbol contrast is more than or equal to predetermined symbol contrast, then bar code is decoded;Judge whether bar code can be solved Code;If can not be decoded, then the credit rating exporting bar code is F;If can be decoded, then continue to extract the modulation ratio of bar code, can Decoding degree and degree of imperfection, and according to described modulation ratio, the credit rating of described bar code is carried out by decodable code degree and degree of imperfection respectively Evaluation, and generate three credit rating results, select credit rating minimum in described three credit rating results as described The credit rating of bar code;The bar code quality level detection method of the present invention and device, can be carried out the credit rating of bar code automatically Detection, first extracts the symbol contrast of bar code, by judge symbol contrast whether be less than predetermined symbol contrast come to bar code etc. Level judges, in order to first detect because the too low bar code quality caused of symbol contrast is defective, it is to avoid need bar during decoding Code scanning the most just can determine that the situation whether bar code can be decoded, and promotes detection efficiency;If symbol contrast is more than or equal to pre- If symbol contrast, bar code is decoded, thus detects that can not to be decoded the bar code quality caused defective because of bar code in advance, It can be avoided that the work waste that the judgement carrying out credit rating after artificially detecting the parameters of bar code again is caused, effectively save Manpower, significantly improves detection efficiency.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to institute in embodiment The accompanying drawing used is needed to be briefly described, it should be apparent that, the accompanying drawing in describing below is only some enforcements of the present invention Example, for those of ordinary skill in the art, on the premise of not paying creative work, it is also possible to obtains according to these accompanying drawings Obtain other accompanying drawing.
The schematic flow sheet of a kind of bar code quality level detection method that Fig. 1 provides for the embodiment of the present invention;
The schematic flow sheet of a kind of method obtaining bar code that Fig. 2 provides for the embodiment of the present invention;
The schematic flow sheet of the method for a kind of symbol contrast extracting bar code that Fig. 3 provides for the embodiment of the present invention;
The schematic flow sheet of the method for the another kind of symbol contrast extracting bar code that Fig. 4 provides for the embodiment of the present invention;
The method of a kind of modulation ratio, decodable code degree and degree of imperfection extracting bar code that Fig. 5 provides for the embodiment of the present invention Schematic flow sheet;
The structured flowchart of a kind of bar code quality grade detection device that Fig. 6 provides for the embodiment of the present invention;
The structured flowchart of a kind of bar code acquisition module that Fig. 7 provides for the embodiment of the present invention;
The structured flowchart of a kind of first parameter extraction module that Fig. 8 provides for the embodiment of the present invention;
The structured flowchart of another kind the first parameter extraction module that Fig. 9 provides for the embodiment of the present invention;
The structured flowchart of a kind of second parameter extraction module that Figure 10 provides for the embodiment of the present invention.
Detailed description of the invention
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 Whole description, it is clear that described embodiment is only a part of embodiment of the present invention rather than whole embodiments.Based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under not making creative work premise Embodiment, broadly falls into the scope of protection of the invention.
Design parameter involved by bar code quality grade detection at present includes that symbol contrast is (English: Symbol Contrast, abbreviation: SC), modulation than (English: Modulation, abbreviation: MOD), decodable code degree (English: And degree of imperfection is (English: Defects) etc., wherein, decodable code degree generally represents with V Decodability).
Wherein, symbol contrast is the high reflectance (R of scanning reflection rate curvemax) and minimum reflectance (Rmin) difference, I.e. SC=Rmax-Rmin.Symbol contrast reflects the reflectance of bar code symbol bar, empty colour match or printable fabric and ink No meet requirement.Symbol contrast is big, illustrates that suitable or printable fabric and ink the reflectance of bar, empty colour match meets requirement; Symbol contrast is little, then bar, empty colour match, and the aspect such as printable fabric and ink has problems.
Edge contrast (English: Edge Contrast, abbreviation: EC) be the empty anti-of adjacent cells on scanning reflection rate curve Penetrate the difference of rate and bar reflectance, minimum edge contrast (ECmin) it is minimum one in all edge contrast, and modulate ratio and be Minimum edge contrast and the ratio of symbol contrast, i.e. MOD=ECmin/ SC, it reflects minimum edge contrast with symbol contrast at width Contrast on degree.
In general, symbol contrast is big, and minimum edge contrast will be big accordingly, otherwise modulate ratio less than normal, will make scanning During recognition, bar, sky are distinguished generation difficulty.
Decodable code degree is to print, with bar code symbol bar, empty width, the parameter that deviation is relevant, is bar code symbol and reference decoding Part that in unit that algorithm is relevant or the available tolerance of unit assembled dimension, the most printed deviation takies and this available hold Minima in the ratio of difference.
Unit reflectance non-uniformity (English: Element Reflectance Nonuniformity, abbreviation: ERN) anti- Reflect the impact that on bar code symbol, the reflectance of bar/sky local is caused by the defect such as deinking, stain.Degree of imperfection is that largest unit is anti- Penetrate rate non-uniformity (ERNmax) with the ratio of symbol contrast, i.e. Defects=ERNmax/SC。
In the national standard of existing " inspection of bar code symbol printing quality ", corresponding to each grade of A, B, C, D, F Symbol contrast, modulates ratio, and the scope of decodable code degree and degree of imperfection is as shown in Table 1 below.
Table 1
Bar code quality level detection method and device that the embodiment of the present invention is provided will be examined based on above parameter and standard Survey the credit rating of bar code.
Refer to Fig. 1, for the schematic flow sheet of a kind of bar code quality level detection method that the embodiment of the present invention provides, be somebody's turn to do Method comprises the following steps:
Step S101, obtains bar code.
Specifically, as in figure 2 it is shown, described acquisition bar code includes:
Step S201, gathers the image of described bar code.
Wherein, described bar code includes one-dimension code.Available colour or black and white line array camera, under D65 standard light source, adopt Collect the image of described bar code.
Line-scan digital camera is provided with line scan image sensor due to inside, is therefore beneficial to the collection to bar code image.
Step S202, is converted to digital signal by described image by analogue signal.
After utilizing line-scan digital camera to gather the image of bar code, described image being sent to capture card, capture card can be by described figure As being converted to digital signal by analogue signal, and then the credit rating of bar code is detected.
Step S102, extracts the symbol contrast of described bar code.
In the actual production of bar code, barcoded color is shallower is to be easiest to produced problem, easily causes symbol contrast mistake Low, it is to cause the underproof principal element of bar code.
Additionally, due to the detection that bar code is modulated ratio and degree of imperfection is required on the basis of symbol contrast by calculating Drawing, therefore, the symbol contrast first extracting bar code can avoid unnecessary testing process.
Refer to Fig. 3, for the flow process of method of a kind of symbol contrast extracting described bar code that the embodiment of the present invention provides Schematic diagram, the method includes:
Step S301, is scanned the diverse location of described bar code respectively, and each position institute extracting described scanning is right The symbol contrast sample answered;Described diverse location refers to that the height scanning described bar code is different.
Step S302, the meansigma methods of calculated all symbol contrast samples is as the symbol contrast of described bar code.
The method of the symbol contrast of the described bar code of this extraction, by being scanned the diverse location of bar code, obtains each Symbol contrast sample corresponding to position, and using the meansigma methods of all symbol contrast samples that obtains as the symbol of described bar code Contrast, compared with single-trial extraction symbol contrast, can promote the extraction accuracy of symbol contrast.
It should be noted that the method according to actual needs, can set the quantity of the diverse location of the bar code scanned, In the present embodiment, can set and respectively 10 diverse locations of described bar code are scanned, corresponding described 10 diverse locations Extract 10 symbol contrast samples of described bar code.Calculate the meansigma methods of described 10 symbol contrast samples as described bar code Symbol contrast.
Referring to Fig. 4, the another kind provided for the embodiment of the present invention extracts the stream of method of the symbol contrast of described bar code Journey schematic diagram, the method includes:
Step S401, is scanned the diverse location of described bar code respectively, and each position institute extracting described scanning is right The symbol contrast sample answered;Described diverse location refers to that the height scanning described bar code is different.
Step S402, extracts the symbol contrast as described bar code of the minima in all symbol contrast samples obtained.
The method of the symbol contrast of the described bar code of this extraction, by being scanned the diverse location of bar code, obtains each Symbol contrast sample corresponding to position, and extract the minima in all symbol contrast samples obtained as described bar code Symbol contrast, compared with single-trial extraction symbol contrast, can promote the extraction accuracy of symbol contrast.
It should be noted that the method according to actual needs, can set the quantity of the diverse location of the bar code scanned, In the present embodiment, can set and respectively 10 diverse locations of described bar code are scanned, corresponding described 10 diverse locations Extract 10 symbol contrast samples of described bar code.Extract the minima in described 10 symbol contrast samples as described bar code Symbol contrast.
Step S103, it is judged that whether described symbol contrast is less than predetermined symbol contrast, and described predetermined symbol contrast is quality Minimum symbol contrast corresponding to grade D.
According to table 1, symbol contrast corresponding to credit rating D, in the range of 20%≤SC < 40%, the most described is preset Symbol contrast is 20%.
Step S104, if described symbol contrast is less than described predetermined symbol contrast, then exports the credit rating of described bar code For F.
Owing to symbol contrast corresponding to credit rating F is in the range of less than 20%, if the most described symbol contrast is less than 20%, the credit rating directly exporting described bar code is F, thus can first detect because of the too low bar code quality caused of symbol contrast Defective, it is to avoid to need during decoding bar code scan the most just can determine that the situation whether bar code can be decoded, promote detection effect Rate.
Step S105, if described symbol contrast is more than or equal to described predetermined symbol contrast, then solves described bar code Code.
In the actual production of bar code, it is asking of easily occurring of another in addition to barcoded color is shallower that bar code is dirty Topic, it is that bar code cannot be decoded that bar code is dirty the direct result being likely to result in, and causes the off quality of bar code.
Therefore, after judged the credit rating of bar code by symbol contrast, then described bar code is decoded, permissible Find the defect that bar code cannot be decoded in advance, it is to avoid unnecessary testing process.
Step S106, it is judged that whether described bar code can be decoded.
Step S107, if described bar code can not be decoded, then the credit rating exporting described bar code is F.
It is serious defect that bar code can not be decoded, and therefore, the most directly exports the quality etc. of described bar code Level be F, thus detects that can not to be decoded the bar code quality caused defective because of bar code in advance, it is not necessary to join other of bar code again Number detects, it is possible to carry out the work wave that the judgement of credit rating is caused after avoiding artificially detecting the parameters of bar code again Take, effectively save manpower, significantly improve detection efficiency.
Step S108, if described bar code can be decoded, extracts the modulation ratio of described bar code, decodable code degree and defect the most respectively Degree.
Specifically, as it is shown in figure 5, the modulation ratio of the described bar code of described extraction, decodable code degree and degree of imperfection include:
Step S501, is scanned the diverse location of described bar code respectively, and each position institute extracting described scanning is right The modulation answered is than sample, decodable code degree sample and degree of imperfection sample;Described diverse location refers to scan the height of described bar code not With.
Step S502, calculated all modulation, calculate as the modulation ratio of described bar code than the meansigma methods of sample The meansigma methods of all decodable code degree samples arrived as the decodable code degree of described bar code, calculated all defect degree sample Meansigma methods is as the degree of imperfection of described bar code.
Extracting the modulation ratio of described bar code, during decodable code degree and degree of imperfection, all by the not coordination to bar code Put and be scanned, respectively obtain the sample of relevant parameter corresponding to each position, and calculated relevant parameter is all The meansigma methods of sample finally extracts result as relevant parameter, compared with single-trial extraction parameter, can promote modulation ratio, decodable code Degree and the extraction accuracy of degree of imperfection.
It should be noted that the quantity of the diverse location of the bar code scanned according to actual needs, can be set, in this reality Executing in example, can set and be scanned 10 diverse locations of described bar code respectively, corresponding described 10 diverse locations extract institute State 10 modulation ratio samples of bar code, 10 decodable code degree samples and 10 degree of imperfection samples.Calculate described 10 modulation and compare sample This meansigma methods, as the modulation ratio of described bar code, calculates the meansigma methods of described 10 decodable code degree samples as described bar code Decodable code degree, calculates the meansigma methods degree of imperfection as described bar code of described 10 degree of imperfection samples.
Step S109, according to described modulation ratio, the credit rating of described bar code is carried out by decodable code degree and degree of imperfection respectively Evaluation, and generate three credit rating results.
Step S110, exports the credit rating minimum in described three the credit rating results quality etc. as described bar code Level.
A kind of bar code quality level detection method that the invention described above embodiment provides, after obtaining bar code, first extracts bar The symbol contrast of code, it is judged that whether symbol contrast is less than predetermined symbol contrast;Predetermined symbol contrast is corresponding to credit rating D Minimum symbol contrast;If symbol contrast is less than predetermined symbol contrast, then the credit rating exporting bar code is F;If symbol contrast is big In or equal to predetermined symbol contrast, then bar code is decoded;Judge whether bar code can be decoded;If can not be decoded, the most defeated The credit rating going out bar code is F;If can be decoded, then the modulation ratio of continuation extraction bar code, decodable code degree and degree of imperfection, and according to Described modulation ratio, the credit rating of described bar code is evaluated, and is generated three quality etc. by decodable code degree and degree of imperfection respectively Level result, selects credit rating minimum in described three credit rating results as the credit rating of described bar code;The present invention Bar code quality level detection method and device, automatically the credit rating of bar code can be detected, first extract the symbol of bar code Number contrast, by judging whether symbol contrast judges the grade of bar code less than predetermined symbol contrast, in order to first detect Go out because the too low bar code quality caused of symbol contrast is defective, it is to avoid during decoding, need bar code scan the most just be can determine that bar code Situation about whether can be decoded, promotes detection efficiency;If symbol contrast is more than or equal to predetermined symbol contrast, bar code is solved Code, thus detect that can not to be decoded the bar code quality caused defective because of bar code in advance, it is possible to avoid artificially detecting bar code Carry out the work waste that the judgement of credit rating is caused after parameters again, effectively save manpower, significantly improve detection efficiency.
Referring to Fig. 6, a kind of bar code quality level detection method provided with embodiments of the invention is corresponding, this The bright embodiment also providing for a kind of bar code quality grade detection device, this bar code quality grade detection device includes:
Bar code acquisition module 60, is used for obtaining bar code.
First parameter extraction module 61, for extracting the symbol contrast of described bar code.
First judge module 62, is used for judging that whether described symbol contrast is less than predetermined symbol contrast;Described predetermined symbol Contrast is the minimum symbol contrast corresponding to credit rating D.
First credit rating output module 63, if for described symbol contrast less than described predetermined symbol contrast, exports institute The credit rating stating bar code is F.
Bar code decoding module 64, if for described symbol contrast more than or equal to described predetermined symbol contrast, to described bar Code is decoded.
Second judge module 65, is used for judging whether described bar code can be decoded.
Second credit rating output module 66, if can not be decoded for described bar code, exports the quality etc. of described bar code Level is F.
Second parameter extraction module 67, if can be decoded for described bar code, extracts the modulation ratio of described bar code respectively, can Decoding degree and degree of imperfection.
Quality grade evaluation module 68, for according to described modulation ratio, decodable code degree and degree of imperfection are respectively to described bar code Credit rating evaluate, and generate three credit rating results.
3rd credit rating output module 69, makees for exporting credit rating minimum in described three credit rating results Credit rating for described bar code.
Specifically, as it is shown in fig. 7, described bar code acquisition module 60 includes:
Image acquisition submodule 71, for gathering the image of described bar code.
Wherein, image acquisition submodule 71 can include colour or black and white line array camera, under D65 standard light source, adopts Collect the image of described bar code.Line-scan digital camera is provided with line scan image sensor due to inside, is therefore beneficial to the collection to bar code image.
Image transform subblock 72, for being converted to digital signal by described image by analogue signal.
Wherein, image transform subblock 72 can include capture card.
After image acquisition submodule 71 gathers the image of bar code, described image is sent to image transform subblock 72, figure As described image can be converted to digital signal by analogue signal by transform subblock 72, and described digital signal is sent to other Module, and then the credit rating of bar code is detected.
Optionally, as shown in Figure 8, the structured flowchart of a kind of first parameter extraction module 61 provided for the present embodiment.
Wherein, described first parameter extraction module 61 includes:
First extracts submodule 101, for being scanned the diverse location of described bar code respectively, extracts described scanning Symbol contrast sample corresponding to each position;Described diverse location refers to that the height scanning described bar code is different.
First calculating sub module 102, for the meansigma methods of calculated all symbol contrast samples as described bar code Symbol contrast.
Optionally, as it is shown in figure 9, the structured flowchart of another kind the first parameter extraction module 61 provided for the present embodiment. Wherein, described first parameter extraction module 61 includes:
First extracts submodule 101, for being scanned the diverse location of described bar code respectively, extracts described scanning Symbol contrast sample corresponding to each position;Described diverse location refers to that the height scanning described bar code is different.
Minima extracts submodule 103, for extracting the minima in all symbol contrast samples obtained as described The symbol contrast of bar code.
Specifically, as shown in Figure 10, described second parameter extraction module 67 includes:
Second extracts submodule 201, for being scanned the diverse location of described bar code respectively, extracts described scanning Modulation corresponding to each position is than sample, decodable code degree sample and degree of imperfection sample;Described diverse location refers to that scanning is described The height of bar code is different.
Second calculating sub module 202, for calculated all modulation than the meansigma methods of sample as described bar code Modulation ratio, the meansigma methods of calculated all decodable code degree samples is as the decodable code degree of described bar code, calculated institute The meansigma methods of defective degree sample is as the degree of imperfection of described bar code.
A kind of bar code quality grade detection device that the invention described above embodiment provides, can be used for the inspection of bar code quality grade Survey, after obtaining bar code, first extract the symbol contrast of bar code, it is judged that whether symbol contrast is less than predetermined symbol contrast;Preset symbol Number contrast is the minimum symbol contrast corresponding to credit rating D;If symbol contrast is less than predetermined symbol contrast, then export bar code Credit rating is F;If symbol contrast is more than or equal to predetermined symbol contrast, then bar code is decoded;Judge that bar code whether can It is decoded;If can not be decoded, then the credit rating exporting bar code is F;If can be decoded, then continue to extract the modulation of bar code Ratio, decodable code degree and degree of imperfection, and according to described modulation ratio, decodable code degree and degree of imperfection credit rating to described bar code respectively Evaluate, and generate three credit rating results, select credit rating conduct minimum in described three credit rating results The credit rating of described bar code;The bar code quality level detection method of the present invention and device, can credit rating to bar code automatically Detect, first extract the symbol contrast of bar code, by judging whether symbol contrast is come bar code less than predetermined symbol contrast Grade judge, in order to first detect because the too low bar code quality caused of symbol contrast is defective, it is to avoid during decoding need Bar code scan the most just be can determine that the situation whether bar code can be decoded, promote detection efficiency;If symbol contrast more than or etc. In predetermined symbol contrast, bar code is decoded, thus detects in advance because bar code can not be decoded the bar code quality caused not Qualified, it is possible to carry out the work waste that the judgement of credit rating is caused after avoiding artificially detecting the parameters of bar code again, have Effect saves manpower, significantly improves detection efficiency.
It should be noted that in this article, such as the relational terms of " first " and " second " or the like is used merely to one Individual entity or operation separate with another entity or operating space, and not necessarily require or imply these entities or operate it Between exist any this reality relation or order.And, term " includes ", " comprising " or its any other variant are intended to Contain comprising of nonexcludability, so that include that the process of a series of key element, method, article or equipment not only include those Key element, but also include other key elements being not expressly set out, or also include for this process, method, article or set Standby intrinsic key element.In the case of there is no more restriction, statement " including ... " key element limited, it is not excluded that Other identical element is there is also in including the process of described key element, method, article or equipment.
Those skilled in the art, after considering description and putting into practice invention disclosed herein, will readily occur to its of the present invention Its embodiment.The application is intended to any modification, purposes or the adaptations of the present invention, these modification, purposes or Person's adaptations is followed the general principle of the present invention and includes the undocumented common knowledge in the art of the disclosure Or conventional techniques means.Description and embodiments is considered only as exemplary, and true scope and spirit of the invention are by following Claim is pointed out.
It should be appreciated that the invention is not limited in precision architecture described above and illustrated in the accompanying drawings, and And various modifications and changes can carried out without departing from the scope.The scope of the present invention is only limited by appended claim.

Claims (10)

1. a bar code quality level detection method, it is characterised in that said method comprising the steps of:
Obtain bar code;
Extract the symbol contrast of described bar code;
Judging whether described symbol contrast is less than predetermined symbol contrast, described predetermined symbol contrast is corresponding to credit rating D Minimum symbol contrast;
If described symbol contrast is less than described predetermined symbol contrast, then the credit rating exporting described bar code is F;
If described symbol contrast is more than or equal to described predetermined symbol contrast, then described bar code is decoded;
Judge whether described bar code can be decoded;
If described bar code can not be decoded, then the credit rating exporting described bar code is F;
If described bar code can be decoded, extract the modulation ratio of described bar code, decodable code degree and degree of imperfection the most respectively;
According to described modulation ratio, the credit rating of described bar code is evaluated, and is generated three by decodable code degree and degree of imperfection respectively Individual credit rating result;
Export the credit rating minimum in described three the credit rating results credit rating as described bar code.
Method the most according to claim 1, it is characterised in that described acquisition bar code includes:
Gather the image of described bar code;
Described image is converted to digital signal by analogue signal.
Method the most according to claim 1, it is characterised in that the symbol contrast of the described bar code of described extraction includes:
Respectively the diverse location of described bar code is scanned, extracts the symbol contrast sample corresponding to each position of described scanning This;Described diverse location refers to that the height scanning described bar code is different;
The meansigma methods of calculated all symbol contrast samples is as the symbol contrast of described bar code.
Method the most according to claim 1, it is characterised in that the symbol contrast of the described bar code of described extraction includes:
Respectively the diverse location of described bar code is scanned, extracts the symbol contrast sample corresponding to each position of described scanning This;Described diverse location refers to that the height scanning described bar code is different;
Extract the symbol contrast as described bar code of the minima in all symbol contrast samples obtained.
5. according to the method described in any one of Claims 1 to 4, it is characterised in that the modulation ratio of the described bar code of described extraction, can Decoding degree and degree of imperfection include:
Being scanned the diverse location of described bar code respectively, sample is compared in the modulation corresponding to each position extracting described scanning This, decodable code degree sample and degree of imperfection sample;Described diverse location refers to that the height scanning described bar code is different;
Calculated all modulation than the meansigma methods of sample as the modulation ratio of described bar code, calculated all decodable codes The meansigma methods of degree sample is as the decodable code degree of described bar code, and the meansigma methods of calculated all defect degree sample is as described The degree of imperfection of bar code.
6. a bar code quality grade detection device, it is characterised in that including:
Bar code acquisition module, is used for obtaining bar code;
First parameter extraction module, for extracting the symbol contrast of described bar code;
First judge module, is used for judging whether described symbol contrast is less than predetermined symbol contrast, described predetermined symbol contrast is Minimum symbol contrast corresponding to credit rating D;
First credit rating output module, if for described symbol contrast less than described predetermined symbol contrast, exporting described bar code Credit rating be F;
Bar code decoding module, if for described symbol contrast more than or equal to described predetermined symbol contrast, carrying out described bar code Decoding;
Second judge module, is used for judging whether described bar code can be decoded;
Second credit rating output module, if can not be decoded for described bar code, the credit rating exporting described bar code is F;
Second parameter extraction module, if can be decoded for described bar code, extracts the modulation ratio of described bar code, decodable code degree respectively And degree of imperfection;
Quality grade evaluation module, for according to described modulation ratio, decodable code degree and degree of imperfection quality to described bar code respectively Grade is evaluated, and generates three credit rating results;
3rd credit rating output module, for exporting credit rating minimum in described three credit rating results as described The credit rating of bar code.
Device the most according to claim 6, it is characterised in that described bar code acquisition module includes:
Image acquisition submodule, for gathering the image of described bar code;
Image transform subblock, for being converted to digital signal by described image by analogue signal.
Device the most according to claim 6, it is characterised in that described first parameter extraction module includes:
First extracts submodule, for being scanned the diverse location of described bar code respectively, extracts each position of described scanning Put corresponding symbol contrast sample;Described diverse location refers to that the height scanning described bar code is different;
First calculating sub module, anti-as the symbol of described bar code for the meansigma methods of calculated all symbol contrast samples Difference.
Device the most according to claim 6, it is characterised in that described first parameter extraction module includes:
First extracts submodule, for being scanned the diverse location of described bar code respectively, extracts each position of described scanning Put corresponding symbol contrast sample;Described diverse location refers to that the height scanning described bar code is different;
Minima extracts submodule, for extracting the symbol as described bar code of the minima in all symbol contrast samples obtained Number contrast.
10. according to the device described in any one of claim 6~9, it is characterised in that described second parameter extraction module includes:
Second extracts submodule, for being scanned the diverse location of described bar code respectively, extracts each position of described scanning Put corresponding modulation than sample, decodable code degree sample and degree of imperfection sample;Described diverse location refers to scan described bar code Highly different;
Second calculating sub module, for calculated all modulation than the meansigma methods of sample as the modulation ratio of described bar code, The meansigma methods of calculated all decodable code degree samples is as the decodable code degree of described bar code, calculated all defect degree The meansigma methods of sample is as the degree of imperfection of described bar code.
CN201610552113.1A 2016-07-13 2016-07-13 Bar code quality level detection method and device Active CN106228097B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610552113.1A CN106228097B (en) 2016-07-13 2016-07-13 Bar code quality level detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610552113.1A CN106228097B (en) 2016-07-13 2016-07-13 Bar code quality level detection method and device

Publications (2)

Publication Number Publication Date
CN106228097A true CN106228097A (en) 2016-12-14
CN106228097B CN106228097B (en) 2018-12-21

Family

ID=57519901

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610552113.1A Active CN106228097B (en) 2016-07-13 2016-07-13 Bar code quality level detection method and device

Country Status (1)

Country Link
CN (1) CN106228097B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107862230A (en) * 2017-11-14 2018-03-30 安徽虚境科技有限公司 A kind of grade determines and input method
CN109697486A (en) * 2018-11-23 2019-04-30 艾伟玛信息科技(上海)有限公司 Industrial bar codes data processing method, system and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101162497A (en) * 2007-11-09 2008-04-16 中国物品编码中心 Method and system for controlling the test of bar-code recognizing device
CN102649344A (en) * 2011-02-25 2012-08-29 深圳劲嘉彩印集团股份有限公司 Bar code printing device and method thereof
CN103317871A (en) * 2012-03-24 2013-09-25 广西真龙彩印包装有限公司 Bar code printing technology of laser composite cigarette packet
CN105628709A (en) * 2016-03-28 2016-06-01 苏州工业园区高泰电子有限公司 Label bar code grade test equipment and use method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101162497A (en) * 2007-11-09 2008-04-16 中国物品编码中心 Method and system for controlling the test of bar-code recognizing device
CN102649344A (en) * 2011-02-25 2012-08-29 深圳劲嘉彩印集团股份有限公司 Bar code printing device and method thereof
CN103317871A (en) * 2012-03-24 2013-09-25 广西真龙彩印包装有限公司 Bar code printing technology of laser composite cigarette packet
CN105628709A (en) * 2016-03-28 2016-06-01 苏州工业园区高泰电子有限公司 Label bar code grade test equipment and use method thereof

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107862230A (en) * 2017-11-14 2018-03-30 安徽虚境科技有限公司 A kind of grade determines and input method
CN109697486A (en) * 2018-11-23 2019-04-30 艾伟玛信息科技(上海)有限公司 Industrial bar codes data processing method, system and medium
CN109697486B (en) * 2018-11-23 2022-06-24 艾伟玛信息科技(上海)有限公司 Industrial bar code data processing method, system and medium

Also Published As

Publication number Publication date
CN106228097B (en) 2018-12-21

Similar Documents

Publication Publication Date Title
WO2020248439A1 (en) Crown cap surface defect online inspection method employing image processing
CN102246186B (en) Method and system for item identification
US20170004612A1 (en) Optical film defect detection method and system thereof
CN201218723Y (en) Optoelectronic non-contact type image detection apparatus
US20090034827A1 (en) Inspection device, inspection method, method of manufacturing color filter, and computer-readable storage medium containing inspection device control program
CN102360419B (en) Method and system for computer scanning reading management
CN110288561A (en) Refractory brick surface scratch recognition methods based on frequency filtering enhancing
CN111179362B (en) Test paper color uniformity detection method based on dynamic illumination correction algorithm
CN106650614A (en) Dynamic calibration method and apparatus
CN106599890A (en) Transformer substation patrol robot digital type instrument identification algorithm
CN106093055B (en) Quality detection method for plural films
CN116168218A (en) Circuit board fault diagnosis method based on image recognition technology
CN110533660B (en) Method for detecting silk-screen defect of electronic product shell
CN106228097A (en) bar code quality level detection method and device
CN114266764A (en) Character integrity detection method and device for printed label
US8094922B2 (en) Crack measuring method and apparatus
CN102507008B (en) Multi-template automatic optical color detection method
CN106093051A (en) Paper roll tangent plane burr detection method based on machine vision and device
CN102054161B (en) Fingerprint image inspection method
CN109410210B (en) Commodity bar code printing quality detection method based on machine vision
CN111028209A (en) Telephone silk-screen quality detection method and system
CN111818250B (en) Full-computerized intelligent automatic printed product detection system and method
CN112329770B (en) Instrument scale identification method and device
US11514256B2 (en) Printing inspection device
CN114943704A (en) Method, device and equipment for detecting defects of battery electrode die-cut piece

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 100094 Beijing city Haidian District Cui Hunan loop 13 Hospital No. 7 Building 7 room 701

Patentee after: Lingyunguang Technology Co., Ltd

Address before: 100094 Beijing city Haidian District Cui Hunan loop 13 Hospital No. 7 Building 7 room 701

Patentee before: LUSTER LIGHTTECH GROUP Co.,Ltd.

CP01 Change in the name or title of a patent holder