Nothing Special   »   [go: up one dir, main page]

CN106056020A - Bar code detection and recognition method and system based on machine vision system - Google Patents

Bar code detection and recognition method and system based on machine vision system Download PDF

Info

Publication number
CN106056020A
CN106056020A CN201610389625.0A CN201610389625A CN106056020A CN 106056020 A CN106056020 A CN 106056020A CN 201610389625 A CN201610389625 A CN 201610389625A CN 106056020 A CN106056020 A CN 106056020A
Authority
CN
China
Prior art keywords
bar code
region
zone location
module
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
CN201610389625.0A
Other languages
Chinese (zh)
Other versions
CN106056020B (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.)
Dongguan University of Technology
Original Assignee
Dongguan University of Technology
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 Dongguan University of Technology filed Critical Dongguan University of Technology
Priority to CN201610389625.0A priority Critical patent/CN106056020B/en
Publication of CN106056020A publication Critical patent/CN106056020A/en
Application granted granted Critical
Publication of CN106056020B publication Critical patent/CN106056020B/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
    • G06K7/10821Methods 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 further details of bar or optical code scanning devices

Landscapes

  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a bar code detection and recognition method and a bar code detection and recognition system based on a machine vision system. The bar code detection and recognition method is applied to a host of the machine vision system, and the host of the machine vision system is connected with a light source module and an image acquisition module. The bar code detection and recognition method comprises the steps of: S1, an image data acquisition step; S2, an image data preprocessing step; S3, a bar code region positioning step; S3A, a bar code region adjustment step; S4, and a bar code recognition step. By adopting the bar code detection and recognition method and the bar code detection and recognition system, products with bar codes can be automatically scanned and the bar codes are recognized without manual operation, and the method and the system have the advantages of high degree of automation, fast recognition speed, high working efficiency and the like.

Description

The detection recognition methods of a kind of bar code based on Vision Builder for Automated Inspection and system
Technical field
The present invention relates to the bar code detection technique field of Vision Builder for Automated Inspection, particularly relate to a kind of based on Vision Builder for Automated Inspection Bar code detection recognition methods and system.
Background technology
Along with the deepening constantly of concept of " industry 4.0 ", the machine vision extensive application in industrial automation, part system Making enterprise and initially enter the automated production stage, during production control and management, bar code and identification reading technology thereof have become For main product identification and means of tracking.Traditional scanner needs manual closely alignment bar code region to operate, its The drawbacks such as efficiency is low, speed is slow, and automaticity is low, and cost of labor is high cannot meet what extensive automatic industrial produced Demand.At present, the zone location of bar-code label, Chinese scholars has carried out research and has proposed corresponding solution, mainly There are method based on DCT, method based on difference and the morphologic method of mathematics etc..The bar code region of DCT algorithm is automatically positioned, This algorithm can position the bar code of any anglec of rotation, but when in image, the texture proportion in other regions is more than bar code region, This algorithm can lose efficacy;Bar code is positioned by method based on difference, and the method realizes fairly simple, to bar vertically and horizontally Code locating effect is preferable, but the robustness for complex background is poor;The expansive working using mathematical morphology defines bar Code region, it is easy to make bar code region connect together with other regions, the situation of flase drop and missing inspection easily occurs.Therefore, having must There is provided a kind of new bar code detection method, with the deficiency overcoming the detection recognition methods of existing bar code to exist.
Summary of the invention
In order to overcome deficiency of the prior art, the present invention provides the detection of a kind of bar code based on Vision Builder for Automated Inspection to identify Method and system, utilize the present invention, it is not necessary to carry out manual operation, can automatically scan and the product with bar code to bar Code is identified, and it has, and automaticity is high, recognition speed is fast, work efficiency advantages of higher.
The present invention is achieved by the following technical solutions:
The detection recognition methods of a kind of bar code based on Vision Builder for Automated Inspection, described method is applied to Vision Builder for Automated Inspection main frame In, described Vision Builder for Automated Inspection main frame connects light source module and image capture module, said method comprising the steps of:
S1, image data acquiring step, by coordinating, to having many rules of described image capture module and light source module The label of code carries out image data acquiring, and the view data transmission extremely described device visual system main frame that will collect;
S2, pre-processing image data step, described Vision Builder for Automated Inspection main frame carries out pretreatment to described view data, with The view data of acquisition is carried out label separate with background, thus the interference of filter background;
S3, bar code zone location step, after described Vision Builder for Automated Inspection main frame is to pre-processing image data step process View data carries out bar code feature extraction, and bar code is carried out zone location, to determine the place of all bar codes on described label Region, this region is the bar code region with all bar codes on described label;
Wherein, described bar code region includes bar code lower regions and region, bar code left and right, and described bar code zone location includes Location, bar code lower regions and bar code left and right zone location, be utilized respectively location, described bar code lower regions, region, bar code left and right Location determines the line number of bar code, with bar yardage present in a line bar code, to realize the district to bar codes all on described label Territory positions;
S4, bar code identification step, carry out bar code identification to each bar code in described bar code region.
Further, after described bar code zone location step S3, also include before described bar code identification step S4 with Lower step:
S3A, bar code region set-up procedure, be extended the tune of K pixel respectively to the right boundary in described bar code region Whole process, and the adjustment that the up-and-down boundary in described bar code region reduces P pixel respectively processes, and finally processes adjustment After bar code region as final bar code region, wherein said K, P are positive integer, and concrete value is chosen as required.
Preferably, in described bar code zone location step S3, in the position fixing process of described bar code lower regions, use normalizing Change Cross Correlation Matching algorithm and determine described bar code lower regions with Hough transformation line detection algorithm;Described bar code zone location In step S3, in carrying out region, described bar code left and right position fixing process, on the gray-scale map of pretreated image to each bar code Centrage l carry out straight line gray value scanning, to obtain the gray value profiles of the centrage l of each bar code, gray value is divided Pixel data on Butut carries out accumulating operation, if centrage l gray value array is LineA, produces one newly after accumulating operation Array be LineB, set up the centrage gray value of bar code according to described array LineA and data LineB and add up scattergram, logical Cross the straight line of the horizontal component that described centrage gray value adds up in scattergram to determine described bar code left and right zone location.
Preferably, in described pre-processing image data step S2, described Vision Builder for Automated Inspection main frame is to described view data The pretreatment carried out, including filtering, denoising, enhancing and/or binary conversion treatment;It is preferred that described image capture module is industry Camera.
Inventive concept based on said method, present invention also offers the detection of a kind of bar code based on Vision Builder for Automated Inspection and knows Other system, described system includes Vision Builder for Automated Inspection main frame, and described Vision Builder for Automated Inspection main frame connects light source module and image Acquisition module, described image capture module, for coordinating with light source module, carries out view data to the label with a plurality of bar code Gather, and in the view data transmission extremely described device visual system main frame that will collect, described Vision Builder for Automated Inspection main frame include:
Pre-processing image data module, for carrying out pretreatment to described view data, the view data of acquisition to be entered Row label separates with background, thus the interference of filter background;
Bar code zone location module, is carried out for pre-processing image data module is carried out pretreated view data Bar code feature extraction, and bar code is carried out zone location, to determine the region of all bar codes on described label, this location Territory is the bar code region with all bar codes on described label;
Wherein, described bar code region includes bar code lower regions and region, bar code left and right, and described bar code zone location includes Location, bar code lower regions and bar code left and right zone location, be utilized respectively location, described bar code lower regions, region, bar code left and right Location determines the line number of bar code, with bar yardage present in a line bar code, to realize the district to bar codes all on described label Territory positions;
Bar code identification module, for carrying out bar code identification to each bar code in described bar code region.
Further, described Vision Builder for Automated Inspection main frame also includes:
Bar code region adjusting module, for being extended the tune of K pixel respectively to the right boundary in described bar code region Whole process, and the adjustment that the up-and-down boundary in described bar code region reduces P pixel respectively processes, and finally processes adjustment After bar code region as final bar code region, wherein said K, P are positive integer, and concrete value is chosen as required.
Preferably, described bar code zone location module, in carrying out described bar code lower regions position fixing process, use normalizing Change Cross Correlation Matching algorithm and determine described bar code lower regions with Hough transformation line detection algorithm;Described bar code zone location Module, in carrying out region, described bar code left and right position fixing process, on the gray-scale map of pretreated image in each bar code Heart line l carries out straight line gray value scanning, to obtain the gray value profiles of the centrage l of each bar code, to gray value profiles On pixel data carry out accumulating operation, if centrage l gray value array is LineA, after accumulating operation produce a new number Group for LineB, is set up the centrage gray value of bar code according to described array LineA and data LineB and is added up scattergram, by institute State the straight line of the horizontal component that centrage gray value adds up in scattergram to determine described bar code left and right zone location.
It is preferred that the pretreatment that described view data is carried out by described pre-processing image data module, including filtering, go Make an uproar, strengthen and/or binary conversion treatment;Described image capture module is industrial camera.
The bar code based on Vision Builder for Automated Inspection utilizing the present invention to provide detects recognition methods and system, can effectively replace passing The bar code reader of system, even to tilting bar code, the single many bar codes of label, the many bar codes of single file, the bar code of excalation, having dirt Stain etc. can obtain relatively satisfactory recognition effect, and the automatization that can realize any direction bar code and many bar codes identifies, and And recognition speed is fast, recognition efficiency advantages of higher, thus can effectively meet the demand that the extensive automatic industrial of enterprise produces.
Accompanying drawing explanation
Accompanying drawing 1 is the schematic flow sheet of method described in the embodiment of the present invention;
The construction module block diagram that accompanying drawing 2 is system described in the embodiment of the present invention;
Accompanying drawing 3 is to utilize Hough transformation algorithm that the bar code on label carries out the straight line of straight-line detection acquisition, and by each directly The two-end-point of line carries out the schematic diagram of coordinate labelling;
Accompanying drawing 4 is the gray value profiles of the centrage with a bar code;
Accompanying drawing 5 is the gray value profiles with the centrage in a line with two bar codes;
Accompanying drawing 6 is that the gray value that the bar code centrage in accompanying drawing 4 is corresponding adds up scattergram;
Accompanying drawing 7 is that the gray value that the bar code centrage in accompanying drawing 5 is corresponding adds up scattergram.
Detailed description of the invention
For the ease of the understanding of those skilled in the art, the invention will be further described below in conjunction with the accompanying drawings.
As shown in Figure 1, the detection recognition methods of a kind of bar code based on Vision Builder for Automated Inspection, described method is applied to machine In visual system main frame, described Vision Builder for Automated Inspection main frame connects light source module and image capture module, in the present embodiment, and institute State image capture module and be preferably industrial camera, said method comprising the steps of:
S1, image data acquiring step, by coordinating, to having many rules of described image capture module and light source module The label of code carries out image data acquiring, and the view data transmission extremely described device visual system main frame that will collect;
S2, pre-processing image data step, described Vision Builder for Automated Inspection main frame carries out pretreatment to described view data, with The view data of acquisition is carried out label separate with background, thus the interference of filter background;Can use a kind of based on side in class The adaptive threshold fuzziness method of difference carries out pretreatment to view data, described pretreatment, including filtering, denoising, enhancing and/ Or binary conversion treatment;
S3, bar code zone location step, after described Vision Builder for Automated Inspection main frame is to pre-processing image data step process View data carries out bar code feature extraction, and bar code is carried out zone location, to determine the place of all bar codes on described label Region, this region is the bar code region with all bar codes on described label;Owing to there are the feelings of the bar code of inclination Condition, therefore after bar code feature extraction, if there is the image that bar code tilts, then the image to the bar code tilted carries out rotating school Again bar code is carried out zone location after just;
Wherein, described bar code region includes bar code lower regions and region, bar code left and right, and described bar code zone location includes Location, bar code lower regions and bar code left and right zone location, be utilized respectively location, described bar code lower regions, region, bar code left and right Location determines the line number of bar code, with bar yardage present in a line bar code, to realize the district to bar codes all on described label Territory positions;
S4, bar code identification step, carry out bar code identification to each bar code in described bar code region.
As preferred embodiment, after described bar code zone location step S3, before described bar code identification step S4 Further comprising the steps of:
S3A, bar code region set-up procedure, be extended the tune of K pixel respectively to the right boundary in described bar code region Whole process, to prevent the situation of left and right leakage code from occurring, and reduces P pixel respectively to the up-and-down boundary in described bar code region Adjustment process, to guarantee the stability of bar code identification, finally to adjustment process after bar code region as final bar code district Territory, by the bar code after adjustment being processed as final bar code region, and carries out bar code identification to this final bar code region, The situation of the most anti-leak-stopping code can there is and be effectively improved the stability of bar code identification.Wherein, described K, P are positive integer, specifically Value is chosen as required, in the present embodiment, and described K=P=15,
As preferred embodiment, in bar code zone location step S3, first pass through bar code feature extraction, and image is carried out Slant correction, carries out zone location the most again to bar code, and bar code zone location includes about location, bar code lower regions and bar code Zone location;In the position fixing process of described bar code lower regions, use normalized crosscorrelation matching algorithm (NCC) and Hough transformation Line detection algorithm determines described bar code lower regions;In described bar code zone location step S3, left carrying out described bar code During right zone location, centrage l to each bar code on the gray-scale map of pretreated image is carried out straight line gray value and sweeps Retouch, to obtain the gray value profiles of the centrage l of each bar code, the pixel data in gray value profiles is carried out cumulative fortune Calculating, if centrage l gray value array is LineA, producing a new array after accumulating operation is LineB, according to described array LineA and data LineB are set up the centrage gray value of bar code and are added up scattergram, by the cumulative distribution of described centrage gray value The straight line of the horizontal component in figure determines described bar code left and right zone location.
Hereinafter bar code zone location step S3 in the embodiment of the present invention is described in further detail:
Bar code is the multiple secret notes and blank not waited by width, according to certain coding rule arrangement, in order to express one group The graphical identifier of information.If bar code being regarded as the straight line of one group of regular arrangement, then as long as detecting on label All straight lines.The embodiment of the present invention preferably employs straight-line detection method bar code is carried out zone location, use straight line inspection The method surveyed carries out zone location to bar code, can effectively process the notable degenerate case of bar code quality outward appearance, though bar code angle There is change in degree, size and shade, even still can effectively orient bar code place in the case of defect occurs in bar code Position, thus bar code zone location can be realized;And, utilize straight-line detection method, only need to read the part secret note of a bar code I.e. may determine that the position of bar code, it is not necessary to accurately reading all secret notes can coarse localization barcode position.
In the embodiment of the present invention, the feature arranged according to the bar shaped of bar code, use Hough transformation algorithm to the bar on label Code carries out straight-line detection, and its cardinal principle is to use the polar coordinate formula of straight line: ρ=х cos (θ)+у sin (θ);ρ, θ are one To parameter (please the design parameter to ρ, θ defines and remarks additionally, and thanks), planar take a fixed point O, be limit, draw Article one, ray Ox, is called pole axis, then selectes the positive direction (generally taking counterclockwise) of a long measure and angle.For flat Any point M in face, represents the length of line segment OM with ρ, and θ represents the angle from Ox to OM, and ρ is called the footpath, pole of a M, and θ is called a M Polar angle, have ordinal number that (ρ, θ) just cries the polar coordinate of some M, the coordinate system being built such that is called polar coordinate system.By in image Pixel use this formula manipulation can be obtained by two dimension ρ, θ parameter space, peak value can be formed at parameter space, thus Utilize peak value just can detect straight line.Two end points of any one the straight line detected are denoted as: pi=(xi,yi),qi= (mi,ni) (i=1,2...k), as shown in Figure 3.By the position coordinates of two end points of every straight line is calculated, obtain all energy The length of the bar code secret note detected and slope, length and the angle of inclination of arbitrary line are respectively as follows:
d i = ( x i - m i ) 2 + ( y i - n i ) 2 - - - ( 1 ) , θ i = arctan y i - n i x i - m i - - - ( 2 ) .
If xi-mi=0, then this straight line is vertical direction, it is not necessary to do rotation counterclockwise;If xi-mi≠ 0, based on same The angle that bar code on label rotates is consistent, and this is true, if be detected that straight line belong to the inclination of the barcode size or text field then straight line Angle should closely be affected by the binary conversion treatment etc. in aforementioned described pretreatment, formula (2) calculated straight line Angle of inclination and real angle can there is certain error, therefore choose the median at the angle of inclination of all straight lines detected As reference value, if θiWithin the scope of belonging to positive and negative 1 degree of median, then retain this angle of inclination.Calculate all remaining The meansigma methods at angle of inclination as the Slant Rectify number of degrees of label, accordingly original tag image is rotated strong counterclockwise Just, and retain these bar codes coarse positioning region as bar code.
When all bar codes in many bar-code labels are carried out zone location, due to the impact of actual noise, if only used The method of line detection determines the lower regions of the bar code of straight line, then application condition is big.Permissible by analyzing, non-bar code region Most of bar code lines end points position coordinates that is blank obvious, that can draw according to above-mentioned detection, retains length suitable Straight line, the meansigma methods of straight line with a grain of salt be denoted asObtain the point midway of every straight line simultaneouslyObtain Taking the centrage l of each bar code, line tilt angle of going forward side by side rotates, upper and lower with centrage lCoarse positioning district as bar code Territory.
In order to bar code lower regions is precisely located out, use normalized crosscorrelation coupling in described coarse positioning region (NCC) algorithm is accurately positioned.NCC algorithm is the dependency by comparing two column data, weighs the degree of its coupling, The position that wherein correlation coefficient is maximum is exactly best match position.Assume f (xi), g (xi) it is any two row of bar code, they are right Average and the variance answered are denoted as respectivelyWithTwo row the most upwards pan-down is arbitrarily selected in bar code region, Then normalized-cross-correlation function is defined as:
R = 1 n - 1 Σ i = 1 n ( f ( x i ) - μ f ) ( g ( x i ) - μ g ) δ f × δ g - - - ( 3 )
Set threshold value T, then, as R > T, be otherwise bar code lower regions.Due to NCC algorithm have the highest accuracy, Adaptability, but operand is bigger, therefore uses Hough transformation line detection algorithm that original image is carried out area-of-interest Extracting, the up-and-down boundary in each bar code region is carried out coarse positioning, non-bar code region has obtained effective rejecting, has decreased computing Amount.By above-mentioned NCC algorithm and Hough transformation line detection algorithm, the edge line of bar code region can be determined accurately.
Bar code left and right zone location, including the detection of bar yardage present in same a line and the bar code left and right region of each bar code Territory positions, thus can realize the zone location of all bar codes in many bar-code labels.Centrage l is carried out straight line ash by gray-scale map Angle value scans, the gray value profiles of the centrage l of available each bar code.Due to during image binaryzation, bar code Right boundary is easy to the defect because of the reason such as quality, noise, if be directly scanned on bianry image, this defect Will result directly in the inaccurate of bar code left and right zone location, so the region, left and right using gray-scale map to carry out bar code region carries out determining Position.
According to the feature of bar code, at the right boundary of bar code, have one section of white space, if Fig. 4 is (for having in Fig. 4 The gray value profiles of the centrage of one bar code) in gray value be the place of 0;As multiple bar codes, bar code occurred in same a line Between white space can be bigger, such as Fig. 5 (for having the gray value profiles of the centrage of two bar codes in same a line in Fig. 5) institute Show.For further determining that the left and right edges in bar code region, the pixel data on scattergram is carried out accumulating operation, if centrage is grey Angle value array is LineA, and producing a new array after accumulating operation is LineB, that is:
LineA={x1,x2,x3...xn},
Wherein, LineB [0]=LineA [0].
Fig. 6 is that the bar code centrage gray value in Fig. 4 adds up scattergram, and Fig. 7 is that the bar code centrage gray value in Fig. 6 tires out Add scattergram;Wherein, in Fig. 6 with Fig. 7, horizontal component (i.e. slope is 0) is the boundary that bar code is interregional, accordingly can be real The now location to the region, left and right of bar code.
Remaining step such as step S1, S2, S3A, S4 can use prior art to realize, and is not described in detail in this.
Utilize bar code based on the Vision Builder for Automated Inspection detection recognition methods that the present embodiment provides, the label having is being entered During the identification of row bar code, even tilting bar code, the single many bar codes of label, the many bar codes of single file, the bar code of excalation, have The bar codes of spot etc. can obtain relatively satisfactory recognition effect, the most also can realize the automatic of any direction bar code and many bar codes Change and identify, and recognition speed is fast, recognition efficiency advantages of higher, thus can effectively meet the extensive automatic industrial of enterprise and produce Demand.
Inventive concept based on method described in above-described embodiment, embodiments of the invention additionally provide a kind of based on machine The bar code detection identification system of visual system, as shown in Figure 2, described system includes Vision Builder for Automated Inspection main frame, described machine Visual system main frame connects light source module and image capture module, and described image capture module is used for coordinating with light source module, The label with a plurality of bar code is carried out image data acquiring, and the view data transmission extremely described device visual system that will collect In main frame, described Vision Builder for Automated Inspection main frame includes:
Pre-processing image data module, for carrying out pretreatment to described view data, the view data of acquisition to be entered Row label separates with background, thus the interference of filter background;Described pretreatment, preferably include filtering, denoising, enhancing and/ Or binary conversion treatment;
Bar code zone location module, is carried out for pre-processing image data module is carried out pretreated view data Bar code feature extraction, and bar code is carried out zone location, to determine the region of all bar codes on described label, this location Territory is the bar code region with all bar codes on described label;
Wherein, described bar code region includes bar code lower regions and region, bar code left and right, and described bar code zone location includes Location, bar code lower regions and bar code left and right zone location, be utilized respectively location, described bar code lower regions, region, bar code left and right Location determines the line number of bar code, with bar yardage present in a line bar code, to realize the district to bar codes all on described label Territory positions;
Bar code identification module, for carrying out bar code identification to each bar code in described bar code region.
As preferred embodiment, described Vision Builder for Automated Inspection main frame also includes:
Bar code region adjusting module, for being extended the tune of K pixel respectively to the right boundary in described bar code region Whole process, and the adjustment that the up-and-down boundary in described bar code region reduces P pixel respectively processes, and finally processes adjustment After bar code region as final bar code region.By increasing described bar code region adjusting module, can the most anti-leak-stopping code Situation occurs and is effectively improved the stability of bar code identification.Wherein, described K, P are positive integer, and concrete value is chosen as required, In the present embodiment, described K=P=15.
In the present embodiment, described bar code zone location module includes bar code characteristic extracting module, slant correction module, bar Code region, left and right locating module and bar code lower regions locating module, the annexation of each functional module is as in figure 2 it is shown, at this No longer describe in detail.
In the present embodiment, described image capture module preferably has the industrial camera of GIGE interface, correspondingly, described Vision Builder for Automated Inspection main frame has GIGE interface, and Vision Builder for Automated Inspection main frame is connected with industrial camera by GIGE interface.It addition, Described Vision Builder for Automated Inspection main frame is additionally provided with light source control module, and described Vision Builder for Automated Inspection main frame is by this light source control mould Block is connected with light source module.
Bar code based on Vision Builder for Automated Inspection detection identification system in the present embodiment, the work of its each functional module is former The step that bar code based on the Vision Builder for Automated Inspection detection recognition methods as described in above-described embodiment of the reason/work process is corresponding Described, do not repeat them here.
It should be noted that above-mentioned each functional module, can the just integrated circuit of multiple functional modules in them Functional module realizes, it is also possible to one of them functional module is fabricated to multiple functional module respectively and realizes.
The bar code based on Vision Builder for Automated Inspection utilizing the embodiment of the present invention to provide detects recognition methods and system, it is not necessary to enter Row manual operation, can automatically scan the product with bar code and be identified bar code, and it has automaticity Height, recognition speed are fast, work efficiency advantages of higher;During the identification of bar code, even inclination bar code, single label are a plurality of Code, the many bar codes of single file, the bar code of excalation, the bar code etc. with spot can obtain relatively satisfactory recognition effect, simultaneously The automatization that also can realize any direction bar code and many bar codes identifies, and recognition speed is fast, recognition efficiency advantages of higher, thus Can effectively meet the demand that the extensive automatic industrial of enterprise produces.
The content mentioned in above-described embodiment is the present invention preferably embodiment, is not limited to the present invention, On the premise of present inventive concept, any obvious replacement is all within protection scope of the present invention.

Claims (10)

1. bar code based on a Vision Builder for Automated Inspection detection recognition methods, described method is applied to Vision Builder for Automated Inspection main frame In, described Vision Builder for Automated Inspection main frame connect have light source module and image capture module, it is characterised in that described method include with Lower step:
S1, image data acquiring step, by coordinating, to having a plurality of bar code of described image capture module and light source module Label carries out image data acquiring, and the view data transmission extremely described device visual system main frame that will collect;
S2, pre-processing image data step, described Vision Builder for Automated Inspection main frame carries out pretreatment to described view data, obtaining The view data taken carries out label and separates with background, thus the interference of filter background;
S3, bar code zone location step, described Vision Builder for Automated Inspection main frame is to the image after pre-processing image data step process Data carry out bar code feature extraction, and bar code is carried out zone location, to determine the region of all bar codes on described label, This region is the bar code region with all bar codes on described label;
Wherein, described bar code region includes bar code lower regions and region, bar code left and right, and described bar code zone location includes bar code Location, lower regions and bar code left and right zone location, be utilized respectively location, described bar code lower regions, bar code left and right zone location Determine the line number of bar code, with bar yardage present in a line bar code, fixed to realize the region to bar codes all on described label Position;
S4, bar code identification step, carry out bar code identification to each bar code in described bar code region.
Method the most according to claim 1, it is characterised in that: after described bar code zone location step S3, described bar Code identification step S4 before further comprising the steps of:
S3A, bar code region set-up procedure, be extended at the adjustment of K pixel respectively to the right boundary in described bar code region Reason, and the adjustment that the up-and-down boundary in described bar code region reduces P pixel respectively processes, finally to adjustment process after Bar code region is as final bar code region, and wherein said K, P are positive integer, and concrete value is chosen as required.
Method the most according to claim 2, it is characterised in that: in described bar code zone location step S3, in described bar code In the position fixing process of lower regions, normalized crosscorrelation matching algorithm and Hough transformation line detection algorithm is used to determine described bar Code lower regions.
Method the most according to claim 3, it is characterised in that: in described bar code zone location step S3, described in carrying out In the position fixing process of region, bar code left and right, centrage to each bar code on the gray-scale map of pretreated image is carried out straight line gray scale Scan value, to obtain the gray value profiles of the centrage of each bar code, tires out the pixel data in gray value profiles Adding computing, if centrage gray value array is LineA, producing a new array after accumulating operation is LineB, according to described number Group LineA and data LineB are set up the centrage gray value of bar code and are added up scattergram, by cumulative point of described centrage gray value The straight line of the horizontal component in Butut determines described bar code left and right zone location.
5. according to the method according to any one of Claims 1 to 4, it is characterised in that: described pre-processing image data step S2 In, the pretreatment that described view data is carried out by described Vision Builder for Automated Inspection main frame, including filtering, denoising, enhancing and/or two-value Change processes.
6. bar code based on a Vision Builder for Automated Inspection detection identification system, described system includes Vision Builder for Automated Inspection main frame, institute Stating the connection of Vision Builder for Automated Inspection main frame and have light source module and image capture module, described image capture module is used for and light source module Coordinate, the label with a plurality of bar code is carried out image data acquiring, and the view data collected transmission is regarded to described device In vision system main frame, it is characterised in that described Vision Builder for Automated Inspection main frame includes:
Pre-processing image data module, for carrying out pretreatment to described view data, the view data of acquisition to be marked Sign and separate with background, thus the interference of filter background;
Bar code zone location module, carries out bar code for pre-processing image data module is carried out pretreated view data Feature extraction, and bar code is carried out zone location, to determine the region of all bar codes on described label, this region is i.e. For having the bar code region of all bar codes on described label;
Wherein, described bar code region includes bar code lower regions and region, bar code left and right, and described bar code zone location includes bar code Location, lower regions and bar code left and right zone location, be utilized respectively location, described bar code lower regions, bar code left and right zone location Determine the line number of bar code, with bar yardage present in a line bar code, fixed to realize the region to bar codes all on described label Position;
Bar code identification module, for carrying out bar code identification to each bar code in described bar code region.
System the most according to claim 6, it is characterised in that: described Vision Builder for Automated Inspection main frame also includes:
Bar code region adjusting module, for being extended respectively at the adjustment of K pixel the right boundary in described bar code region Reason, and the adjustment that the up-and-down boundary in described bar code region reduces P pixel respectively processes, finally to adjustment process after Bar code region is as final bar code region, and wherein said K, P are positive integer, and concrete value is chosen as required.
System the most according to claim 7, it is characterised in that: described bar code zone location module, carrying out described bar code In the position fixing process of lower regions, normalized crosscorrelation matching algorithm and Hough transformation line detection algorithm is used to determine described bar Code lower regions.
System the most according to claim 8, it is characterised in that: described bar code zone location module, carrying out described bar code In the position fixing process of region, left and right, centrage to each bar code on the gray-scale map of pretreated image is carried out straight line gray value and sweeps Retouch, to obtain the gray value profiles of the centrage of each bar code, the pixel data in gray value profiles is carried out cumulative fortune Calculating, if centrage gray value array is LineA, producing a new array after accumulating operation is LineB, according to described array LineA and data LineB are set up the centrage gray value of bar code and are added up scattergram, by the cumulative distribution of described centrage gray value The straight line of the horizontal component in figure determines described bar code left and right zone location.
10. according to the system according to any one of claim 6~9, it is characterised in that: described pre-processing image data module pair The pretreatment that described view data is carried out, including filtering, denoising, enhancing and/or binary conversion treatment.
CN201610389625.0A 2016-06-01 2016-06-01 A kind of bar code detection recognition method and system based on NI Vision Builder for Automated Inspection Active CN106056020B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610389625.0A CN106056020B (en) 2016-06-01 2016-06-01 A kind of bar code detection recognition method and system based on NI Vision Builder for Automated Inspection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610389625.0A CN106056020B (en) 2016-06-01 2016-06-01 A kind of bar code detection recognition method and system based on NI Vision Builder for Automated Inspection

Publications (2)

Publication Number Publication Date
CN106056020A true CN106056020A (en) 2016-10-26
CN106056020B CN106056020B (en) 2018-09-25

Family

ID=57170110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610389625.0A Active CN106056020B (en) 2016-06-01 2016-06-01 A kind of bar code detection recognition method and system based on NI Vision Builder for Automated Inspection

Country Status (1)

Country Link
CN (1) CN106056020B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106778719A (en) * 2016-11-11 2017-05-31 广州弥特智能科技有限公司 It is a kind of to improve the method that on-line continuous gather bar code successfully decoded rate
CN107609450A (en) * 2017-09-08 2018-01-19 苏州佳世达光电有限公司 Bar code discrimination method
CN109165538A (en) * 2018-07-18 2019-01-08 北京飞搜科技有限公司 Bar code detection method and device based on deep neural network
CN109670363A (en) * 2018-10-31 2019-04-23 江西索立德环保服务有限公司 A kind of sampling system having automatic identification sample number into spectrum
CN109829346A (en) * 2019-01-11 2019-05-31 安徽工程大学 A kind of bar code and two-dimensional code identification method and system based on machine vision
CN110119799A (en) * 2019-05-11 2019-08-13 安图实验仪器(郑州)有限公司 Sample rack heparin tube bar code visual identity method
CN110532826A (en) * 2019-08-21 2019-12-03 厦门壹普智慧科技有限公司 A kind of bar code identifying device and method based on artificial intelligence semantic segmentation
CN110532832A (en) * 2018-05-24 2019-12-03 广东技术师范学院 A kind of bar code high-precision recognition methods based on computer vision
CN110532825A (en) * 2019-08-21 2019-12-03 厦门壹普智慧科技有限公司 A kind of bar code identifying device and method based on artificial intelligence target detection
CN110795955A (en) * 2019-07-30 2020-02-14 广东工业大学 System and method for rapidly identifying multiple bar codes
CN111639507A (en) * 2020-05-29 2020-09-08 天津维创微智能科技有限公司 Method and device for positioning bar code in image, code scanning device and storage medium
CN112347866A (en) * 2020-10-22 2021-02-09 上海铂端科技有限公司 System and method for realizing attachment assembly fool-proof detection processing based on machine vision
CN116681675A (en) * 2023-06-07 2023-09-01 深圳鑫振华光电科技有限公司 Automatic control system and method based on big data analysis

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663337A (en) * 2012-03-16 2012-09-12 江南大学 Method for quick Data Matrix two-dimensional barcode identifying under simple condition background
CN104657728A (en) * 2015-03-19 2015-05-27 江苏物联网研究发展中心 Barcode recognition system based on computer vision
CN104680109A (en) * 2013-12-03 2015-06-03 航天信息股份有限公司 Image recognition-based location method for bar code area
CN104992449A (en) * 2015-08-06 2015-10-21 西安冉科信息技术有限公司 Information identification and surface defect on-line detection method based on machine visual sense

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663337A (en) * 2012-03-16 2012-09-12 江南大学 Method for quick Data Matrix two-dimensional barcode identifying under simple condition background
CN104680109A (en) * 2013-12-03 2015-06-03 航天信息股份有限公司 Image recognition-based location method for bar code area
CN104657728A (en) * 2015-03-19 2015-05-27 江苏物联网研究发展中心 Barcode recognition system based on computer vision
CN104992449A (en) * 2015-08-06 2015-10-21 西安冉科信息技术有限公司 Information identification and surface defect on-line detection method based on machine visual sense

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106778719A (en) * 2016-11-11 2017-05-31 广州弥特智能科技有限公司 It is a kind of to improve the method that on-line continuous gather bar code successfully decoded rate
CN107609450B (en) * 2017-09-08 2020-06-26 苏州佳世达光电有限公司 Bar code identification method
CN107609450A (en) * 2017-09-08 2018-01-19 苏州佳世达光电有限公司 Bar code discrimination method
CN110532832A (en) * 2018-05-24 2019-12-03 广东技术师范学院 A kind of bar code high-precision recognition methods based on computer vision
CN109165538A (en) * 2018-07-18 2019-01-08 北京飞搜科技有限公司 Bar code detection method and device based on deep neural network
CN109165538B (en) * 2018-07-18 2021-10-22 苏州飞搜科技有限公司 Bar code detection method and device based on deep neural network
CN109670363A (en) * 2018-10-31 2019-04-23 江西索立德环保服务有限公司 A kind of sampling system having automatic identification sample number into spectrum
CN109829346A (en) * 2019-01-11 2019-05-31 安徽工程大学 A kind of bar code and two-dimensional code identification method and system based on machine vision
CN110119799A (en) * 2019-05-11 2019-08-13 安图实验仪器(郑州)有限公司 Sample rack heparin tube bar code visual identity method
CN110795955A (en) * 2019-07-30 2020-02-14 广东工业大学 System and method for rapidly identifying multiple bar codes
CN110532825A (en) * 2019-08-21 2019-12-03 厦门壹普智慧科技有限公司 A kind of bar code identifying device and method based on artificial intelligence target detection
CN110532826A (en) * 2019-08-21 2019-12-03 厦门壹普智慧科技有限公司 A kind of bar code identifying device and method based on artificial intelligence semantic segmentation
CN110532825B (en) * 2019-08-21 2022-09-30 厦门壹普智慧科技有限公司 Bar code identification device and method based on artificial intelligence target detection
CN110532826B (en) * 2019-08-21 2022-09-30 厦门壹普智慧科技有限公司 Bar code recognition device and method based on artificial intelligence semantic segmentation
CN111639507A (en) * 2020-05-29 2020-09-08 天津维创微智能科技有限公司 Method and device for positioning bar code in image, code scanning device and storage medium
CN111639507B (en) * 2020-05-29 2023-06-09 天津维创微智能科技有限公司 Positioning method and device for bar codes in image, code scanning equipment and storage medium
CN112347866A (en) * 2020-10-22 2021-02-09 上海铂端科技有限公司 System and method for realizing attachment assembly fool-proof detection processing based on machine vision
CN116681675A (en) * 2023-06-07 2023-09-01 深圳鑫振华光电科技有限公司 Automatic control system and method based on big data analysis

Also Published As

Publication number Publication date
CN106056020B (en) 2018-09-25

Similar Documents

Publication Publication Date Title
CN106056020A (en) Bar code detection and recognition method and system based on machine vision system
EP3309703B1 (en) Method and system for decoding qr code based on weighted average grey method
CN100380393C (en) Precise location method of QR code image symbol region at complex background
CN101576956B (en) On-line character detection method based on machine vision and system thereof
CN104751187A (en) Automatic meter-reading image recognition method
CN108596166A (en) A kind of container number identification method based on convolutional neural networks classification
CN113781486B (en) IC card image defect detection method
CN102721364A (en) Positioning method and positioning device for workpiece
CN103745475A (en) Detection and positioning method used for spherical pin element
CN109767445B (en) High-precision PCB defect intelligent detection method
CN110097596A (en) A kind of object detection system based on opencv
CN103530590A (en) DPM (direct part mark) two-dimensional code recognition system
CN104240204A (en) Solar silicon wafer and battery piece counting method based on image processing
CN109101854A (en) A kind of multiple barcode localization method
CN110473184A (en) A kind of pcb board defect inspection method
CN109190434B (en) Bar code recognition algorithm based on sub-pixel level corner detection
CN109752392A (en) A kind of pcb board defect type detection system and method
CN102915433A (en) Character combination-based license plate positioning and identifying method
CN104463129A (en) Fingerprint registration method and device
CN102750531A (en) Method for detecting handwriting mark symbols for bill document positioning grids
CN103745221A (en) Two-dimensional code image correction method
Dillabaugh et al. Semi-automated extraction of rivers from digital imagery
CN117746165A (en) Method and device for identifying tire types of wheel type excavator
Tu et al. An efficient crop row detection method for agriculture robots
CN112419225B (en) SOP type chip detection method and system based on pin segmentation

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
EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20161026

Assignee: GUANGDONG RONGZHENG INFORMATION TECHNOLOGY Co.,Ltd.

Assignor: DONGGUAN University OF TECHNOLOGY

Contract record no.: X2022440000288

Denomination of invention: A Bar Code Detection and Recognition Method and System Based on Machine Vision System

Granted publication date: 20180925

License type: Common License

Record date: 20221130

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20161026

Assignee: Xiamen Wenyi Network Technology Co.,Ltd.

Assignor: DONGGUAN University OF TECHNOLOGY

Contract record no.: X2022980027702

Denomination of invention: A bar code detection and recognition method and system based on machine vision system

Granted publication date: 20180925

License type: Common License

Record date: 20230103

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20161026

Assignee: Guangzhou Dongtong Technology Co.,Ltd.

Assignor: DONGGUAN University OF TECHNOLOGY

Contract record no.: X2023990000097

Denomination of invention: A bar code detection and recognition method and system based on machine vision system

Granted publication date: 20180925

License type: Common License

Record date: 20230112

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20161026

Assignee: Yantai Yuanzhen Label Printing Co.,Ltd.

Assignor: DONGGUAN University OF TECHNOLOGY

Contract record no.: X2023980033506

Denomination of invention: A Method and System for Bar Code Detection and Recognition Based on Machine Vision System

Granted publication date: 20180925

License type: Common License

Record date: 20230313

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20161026

Assignee: Guangdong Sanwei Kinetic Sports Technology Co.,Ltd.

Assignor: DONGGUAN University OF TECHNOLOGY

Contract record no.: X2023980034197

Denomination of invention: A barcode detection and recognition method and system based on machine vision system

Granted publication date: 20180925

License type: Common License

Record date: 20230329