CN109583535A - A kind of logistics bar code detection method, the computer program of view-based access control model - Google Patents

A kind of logistics bar code detection method, the computer program of view-based access control model Download PDF

Info

Publication number
CN109583535A
CN109583535A CN201811443403.8A CN201811443403A CN109583535A CN 109583535 A CN109583535 A CN 109583535A CN 201811443403 A CN201811443403 A CN 201811443403A CN 109583535 A CN109583535 A CN 109583535A
Authority
CN
China
Prior art keywords
bar code
cargo
picture
logistics
view
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
CN201811443403.8A
Other languages
Chinese (zh)
Other versions
CN109583535B (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.)
National University of Defense Technology
Original Assignee
Hunan Video Bit Robot 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 Hunan Video Bit Robot Co Ltd filed Critical Hunan Video Bit Robot Co Ltd
Priority to CN201811443403.8A priority Critical patent/CN109583535B/en
Publication of CN109583535A publication Critical patent/CN109583535A/en
Application granted granted Critical
Publication of CN109583535B publication Critical patent/CN109583535B/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
    • G06K17/00Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
    • G06K17/0022Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisious for transferring data to distant stations, e.g. from a sensing device
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Warehouses Or Storage Devices (AREA)
  • Image Processing (AREA)

Abstract

The invention belongs to logistics detection technique fields, disclose logistics bar code detection method, the computer program of a kind of view-based access control model;Including picture capture;Identification and positioning cargo location;Identification and positioning barcode position;Read bar code;Error correction alarm.The present invention uses computer vision library, and the one-dimensional code position and its rotation angle oriented under complex background except means of making an uproar is added, intercepts out horizontal one-dimension code picture;Ensure that each cargo only corresponds to a label, and discovery mechanism of the cargo without label alarm is added;The operation of irrelevant data in picture is avoided, arithmetic speed is improved.While the present invention realizes that assembly line transports package, high definition camera is installed in fixed position, identifies logistics parcel location within the scope of camera fields of view, obtains the one-dimension code information pasted on cargo and be decoded, and then replace traditional assembly line either scans completely.

Description

A kind of logistics bar code detection method, the computer program of view-based access control model
Technical field
The invention belongs to the logistics bar code detection method of logistics detection technique field more particularly to a kind of view-based access control model, Computer program.
Background technique
Currently, the prior art commonly used in the trade is such that
A large amount of with internet popularize, and logistic industry also rapidly develops therewith to emerge, and pursue the promotion of logistics speed, mention High information-based, the intelligent specific gravity in logistics, and replace an inevitable development trend of a part of manpower as logistic industry. In the pipelining of logistic industry, the general of industry is had become to logistics package number, label using one-dimensional bar code Way, and logistics company big absolutely still needs to man-hour manually hand-held barcode scanning gun and is scanned to package bar code.This way not only increases manpower Cost, and since scanner scanning direction needs horizontal aligument one-dimensional bar code and scanning distance is limited, seek operator must It looks for and artificially finds and be aligned barcode position and angle, when logistics capacity increases, this mode will be difficult to meet speed requirement.
Currently, mobile camera installation is widely available, obtains digital picture and just become increasingly easy.Meanwhile artificial intelligence Energy technology this year grows rapidly, and vision application technology is constantly researched and developed, and has had sufficient basic condition exploitation view-based access control model to know The industrialization one-dimensional bar code information of other technology reads algorithm.
Existing one-dimensional bar code recognizer in the prior art, some cell phone application applications can also be in alignment levels one One-dimensional bar code is identified under the premise of dimension code.But one-dimension code pastes angle random and non-horizontal in logistics goods, but also needs Meet the condition that single cargo only identifies unique barcode, it is corresponding merely to identify that bar code does not play the role of examining. At present still lack judge single cargo correspond to unique barcode number method, existing visual identity bar code function it is complete Property, practicability do not meet logistic industry requirement.
In conclusion problem of the existing technology is:
(1) existing logistics also needs to meet the condition that single cargo only identifies unique barcode, if there is cargo is omitted Put up bar coded sticker, i.e., there is a situation where on assembly line cargo discovery can not correspond to a unique barcode, and system does not have It checks that this kind of situation gives a warning, eventually causes one to enter sorting line without information encapsulation.If can carry out Anticipation and alarm can and alarm omission the case where putting up label and remind operator to handle.
(2) upper bar code pastes angle random and non-horizontal in existing logistics goods, and recognizer such as ZBar at present, needs Bar code to be identified, which is in a horizontal position, just can be carried out correct identification.When bar code has biggish level angle in the picture When deviation, the correct coding that can not read bar code will lead to.And can occur multiple bar codes in the visual field of video camera simultaneously, When there is the case where multiple bar codes exist jointly, it is difficult to find a fixed direction of rotation for all bar code return water Straight angle degree is read out.So must accomplish to rotate all bar codes in the visual field in this technology to angle can be read and carry out It reads, to guarantee correctly to read bar code number and not omit.
Solve the difficulty and meaning of above-mentioned technical problem:
(1) how to judge how many cargo and bar code in camera fields of view, and could judge goods under what circumstances Bar coded sticker is not puted up on object.Solve the problems, such as the case where this can be found that on cargo without pasting bar coded sticker.
(2) number represented by the bar coded sticker pasted on cargo how is decoded, and the bar coded sticker decodes Digit length have to comply with actual bar code number format.Solve the problems, such as that this can prevent from misreading not meeting correct coding side The bar code of formula.
(3) certain fault tolerant mechanism need to be designed, identification case occurs in a certain frame or a few frame images as noise jamming will lead to Son reads label in generation quantity and precision mistake in short-term, but not issues wrong report.Due to image taking noise jamming etc. Reason, program cannot be guaranteed that the accuracy and resolution ratio, the reading accuracy of bar code of object in every frame picture reach 100%, Solve the problems, such as that this can prevent sensibility and report an error.
Summary of the invention
In view of the problems of the existing technology, the present invention provides a kind of logistics bar code detection method of view-based access control model, Computer program.
The invention is realized in this way a kind of logistics bar code detection method of view-based access control model, specifically includes the following steps:
Step 1: picture capture: high definition high speed camera is fixed on a certain height and position right above conveyer belt, it is ensured that the visual field The interior conveyer belt comprising certain length and clearly cargo profile and label picture can be taken under the premise of cargo movement.If After having set photographing mode, camera starts to shoot high definition picture, while picture is converted into from cv::Mat format by program;
Step 2: identification and positioning cargo location: what a YOLO target detection model of pre-arranged, to the figure in step 1 Piece is calculated, and obtains all kind of object (cargo, label) and their coordinate position (object in captured picture Xy coordinate value in picture), bounding box size (length of shared picture pixels);In this step, what be will test is all kinds of Object is saved into different data types, wherein save each object coordinate position, bounding box size, and existed with bounding box The picture intercepted out in original image;
Step 3: identification and positioning barcode position: after saving all kinds of object identifications in receiving step two, program is first First " label " type objects are handled.The interception picture that " label " type objects save carries out region by bar code processing routine Screening with return just, the bar code picture in available horizontal direction.
Step 4: it reads bar code: identifying bar code using Zbar method, handle, obtain horizontal by above step The barcode size or text field picture, to the picture using being identified in Zbar program, the number of you can get it bar code;
Step 5: error correction alarm: " cargo " type objects identified in camera fields of view and " label " class picture are decoded Number corresponded to.If when discovery has " cargo class " object to lack corresponding label number, issuing report in continuous multiple frames picture It warns and operator is notified to handle.
Further, in step 1, the screening-mode of high definition high speed camera is set, light can be installed before camera fields of view position The settable triggering mode of screening-mode is triggered grating, order camera is continuously clapped when there is cargo that will enter coverage by grid According to a period of time;It can also set screening-mode to continuously to take pictures, no matter whether there is or not cargos on conveyer belt, all in accordance between certain time It takes pictures every continuously.
Further, in step 2, the kind of object that need to detect identification is divided into " cargo class " (hexahedron chest or packed packet Wrap up in), " tag class " (bar coded sticker), orient place center (coordinate) and bounding box size of the object in photo (width, height under Picture Coordinate system);Used method is the YOLO algorithm of target detection in deep learning, arithmetic speed energy Enough achieve the effect that real-time detection, meets target call;Specific step is as follows:
(1) what a reliable object detection model of the invention by pre-training, and model algorithm is deployed in program, it should Model is a large amount of actual picture data of acquisition, and is trained the maturity model formed after operation;When camera has shot a figure After piece, which will carry out target detection to the cargo in picture;
(2) target detection model will handle shooting picture one by one, obtain kind of object present in captured picture, a Several and its bounding box information;It will appear multiple objects due to estimated in the same visual field, detection model need to detect own " cargo " Class and " label " type objects, and format is designed to them, kind of object (chest, packed package, mark are saved wherein Label), coordinate position (xy coordinate value of the object in picture), the information such as bounding box size (length of shared picture pixels), together When the rectangle frame occupied by them is saved into data format from being cut into subgraph in original image, be sent to one-dimensional in next step It is calculated in the program of barcode detection;As there is not cargo in the visual field, then this is cut and continued to execute without image Step.Design data format is as follows.
Cargo class:
Name variable record be box or package, center_position variable records object coordinates, bounding Variable records rectangle frame range, and arean matrix stores the rectangle frame subgraph intercepted from original image, and link_code variable indicates should Whether fritter is corresponding with a bar code number.
Tag class:
Center_position variable records tag coordinate, and arean stores the rectangle frame subgraph intercepted from original image, Num_type represents its bar code type decoded, and num_code represents digital content.Link_packegebox_num is indicated " cargo " the type objects number that the label is pasted.
Further, in step 3, in the horizontal direction and when pixel is more visible, irrelevant is less just due to one-dimension code picture It is easy to be read by reading code program, the identification bar code algorithm in the present invention is utilized that one-dimensional bar code image profile is obvious, image The consistent feature of gradient is found the consistent region in change of gradient direction in the interception picture of " label " type objects identified and is made For one-dimension code region that may be present, process is implemented are as follows:
(1) the picture P0 of " label " type objects intercepted out in step 2 (intercepting sub-pictures from original image) is subjected to gray processing Processing is converted into gray level image, and by the noise in Gaussian Blur removal image, obtains gray level image P1;
(2) gradient value of each pixel both direction in image P1, i.e. two image arrays are calculated using Cany operator Gx and Gy;Image array Gx is added with Gy, the available one visually apparent image array P2 of contour feature;In P2 The profile of bar code can be recognized clearly, and the main gradient of each profile point can be calculated according to the gradient value in XY both direction Value and direction, calculation formula are as follows:
D=sqrt (x (I) ^2+y (I) ^2)
(3) image P2 will be divided into M fritter, the data structure of each fritter with the rectangle of m*m size are as follows:
The data structure class can be reserved for fritter pixel coverage in the picture, fall into the fritter in all contour images P2 The quantity of the point in region and the main gradient direction of point.
(4) Screening Treatment is done, rejects and does not include profile point and the image fritter very few comprising profile point, only retain profile point Fritter (anchor_block) of the number in m/2 or more;
(5) the main gradient direction of remaining image fritter is calculated.Every 20 degree of increase is divided into one kind since 0 degree, has 1-9 totally 9 angular ranges, and according to the θ value of each profile point gradient direction determine belonging to number class number, i.e. anchor_ Belong_angle value in block data structure class.When the quantity for having profile point in a certain angular range accounts for all profiles When putting 60% or more of quantity, it is determined that the angular range is the main angle direction of this fritter.If not provided, indicating this Gradient is more chaotic in fritter, which is deleted.
(6) connection processing is done to the identical fritter of each gradient direction.Pixel distance is within d and main gradient direction one The fritter Cluster merging of cause is at a region, and using the gradient direction as the gradient direction in " region " after merging;The step It is middle can weed out distance farther out, the fritter that can not cluster of number rareness.
(7) judge that all merging rear region areas whether more than threshold value S, if it is, retaining, otherwise reject the block area Domain;
(8) it can show that remaining region is bar code position by above step, and the region is obtained in (6) Gradient direction θ is bar code level angle deviation, is rotated clockwise θ degree and obtains identifiable one-dimensional bar code picture.
Further, in step 4, which is open source program, is easy the information of reading horizontal one-dimensional bar code, Output result is a certain length numeric string.Bar code be generally UPCUPC code, EANEAN code, 39 yards of Code, in 128 yards of Code One kind the type of target bar can be exported together if identified successfully.
Further, in step 5, the step logical design are as follows:, can be by just by each after step 1 to step 4 " tag class " object encoded really is distinguished out, if respective coordinates shaft position is located at the rectangle frame model of " cargo " type objects In enclosing, then judge that it can be somebody's turn to do " cargo " type objects and be labeled coding.When there are " cargo " objects not to be labeled for discovery When, illustrate that corresponding " tag class " object is not detected in detection model, program record does not correspond to number once.It is such as continuous more The generation of frame picture does not correspond to situation, then not corresponding to number can continue to increase, and can then issue alarm higher than certain certain numerical value, remind behaviour The case where not putting up bar code on cargo has occurred as personnel.If all " cargo " class objects detected in period frame picture Body can correspond to a number, then do not correspond to number clearing.Simultaneously, it is contemplated that can occur to have recognized when object has just enter into the visual field Not the case where " cargo " and label not can enter the visual field out, when " cargo " type objects are in visual field boundary position and corresponding coding When, it not will increase and do not correspond to number.Above procedure can interfere the hair for leading to sensitive alarm situation to avoid individual uncertain factors Raw, only determining has object that can just alarm in the case where can not all reading label number in multiframe picture.
The bar code of logistics selection recognition is generally UPCUPC code, EANEAN code, 39 yards of Code, one in Code128 code Kind, if the numeric type that may detect bar code in step 4 is not Selective type, cannot be gone with this number pair Answer " cargo " object.
In conclusion advantages of the present invention and good effect are as follows:
The detection network structure source code of freight detection of the present invention is write by C/C++ language, and prototype is YOLO target detection net Network structure changes its input layer, output layer structure in the present invention, and voluntarily acquisition data carry out the training of network model, Stable algorithm structure is formed;Source code, network configuration and network parameter in the protection present invention.By testing 543 pictures In include 853 cargos and label, can correctly identify wherein 827 object types, Classification and Identification accuracy reaches 96.96%, the accuracy of Area computing reaches 90.42%;
The method that the present invention finds one-dimensional bar code using gradient, source code are independently write using C Plus Plus, and principle is Detect the gradient direction of profile point and profile point, thus filter out gradient reversely most consistent region as one-dimension code location Domain;Used computer vision library (OPENCV), be added oriented except making an uproar means one-dimensional code position under complex background and its Angle is rotated, and horizontal one-dimension code picture can be intercepted out.
The control test method and source code of cargo and label of the present invention can ensure that each cargo only corresponds to a label, and It joined discovery mechanism of the cargo without label alarm, while in view of when cargo is not completely into the visual field, possible bar shaped Code does not enter the visual field and reads wrong situation, avoids false alarm.It is tested in 319 cargos on assembly line and is contaminated with 38 The cargo of non-adhesive label removes, except 2 cargos are not by addition to not alarming, remaining, which is able to detect, pastes bar code information and alarm.
The method that deep learning of the present invention is combined with several picture processing, is extracted each using the method for deep learning Then the segmented image of cargo handles segmented image using geometry method, avoids the operation of irrelevant data in picture, mention High arithmetic speed, can be realized real-time detection.Test single picture target identification time-consuming be averaged 0.04s, and bar code recognition is put down Time-consuming 0.05, every frame picture calculate average used time 0.09s, FPS 11.
The present invention realizes that fixed height installs high definition camera above assembly line, knows while assembly line is transported and wrapped up Logistics parcel location within the scope of other camera fields of view positions the one-dimension code picture pasted on cargo and is decoded reading, and then complete Replace traditional assembly line either scans entirely;It has the advantage that
(1) recognition speed precision can satisfy delivery industry requirement, not omit detection substantially within the scope of conveyor belt speed Bar code;
(2) within the scope of camera fields of view, can identify and be only capable of identification be pasted onto the one-dimensional bar code label that logistics superscribes (being usually located at express packaging bag, express delivery box surface), can initiative alarming when finding that logistics package does not paste bar code;
(3) one-dimension code label position can be accurately positioned, if one-dimension code has horizontal departure angle, can be asked by algorithm Its angular dimension is solved, and is rotated automatically to just;
(4) it can be read, decode one-dimension code encoded information and be converted to digital number, and can check number format whether just Really, and the nonsignificant digit read out is abandoned.
Detailed description of the invention
Fig. 1 is the logistics bar code detection method flow chart of view-based access control model provided in an embodiment of the present invention.
Fig. 2 is the logistics bar code detection method Technology Roadmap of view-based access control model provided in an embodiment of the present invention.
Fig. 3 is freight detection flow chart provided in an embodiment of the present invention.
Fig. 4 is that barcode detection provided in an embodiment of the present invention reads flow chart.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to embodiments, to the present invention It is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not used to Limit the present invention.
Application principle of the invention is further elaborated with reference to the accompanying drawing;
As shown in Figure 1, the logistics bar code detection method of view-based access control model provided in an embodiment of the present invention, specifically includes following Step:
S101: picture capture: high definition high speed camera is fixed on a certain height and position right above conveyer belt, it is ensured that in the visual field Conveyer belt comprising certain length and clearly cargo profile and label picture can be taken under the premise of cargo movement;
S102: using the YOLO algorithm of target detection in deep learning, judge all types of merchandize in captured picture, Label position, bounding box size;Save the data type for forming freight all kinds and label;
S103: the interception picture saved in tag class data in processing step S102 through noise reduction and is rotated to level, is obtained It is easy to the one-dimensional bar code picture read, and make cargo class data spatially to correspond to a tag class data;
S104: it reads bar code: identifying bar code using Zbar method, handled by above step, obtain one-dimension code figure The horizontal picture of piece obtains the data of bar code using identifying in Zbar program;
S105: meeting reminding alarm, when necessary artificial error correction when error situation error correction alarm: occurs.
In step S101, high definition high speed camera provided in an embodiment of the present invention can install grating before camera fields of view position, By the settable triggering mode of screening-mode, when there is cargo that will enter coverage, grating is triggered, order camera continuously takes pictures one The section time;It can also set screening-mode to continuously to take pictures, no matter whether there is or not cargos on conveyer belt, all in accordance with certain time interval company It is continuous to take pictures.
In step S102, logistics goods type provided in an embodiment of the present invention is divided into hexahedron chest and packed package, Orient place center (coordinate) and bounding box size (width, height Picture Coordinate system under) of the cargo in photo;Simultaneously Center and bounding box size where also identifying that label, the subgraph for intercepting outgoing label and cargo are analyzed for lower step;Institute For the method used for the YOLO algorithm of target detection in deep learning, arithmetic speed can achieve the effect that real-time detection, symbol Close target call;Specific step is as follows:
(1) what a reliable object detection model of the invention by pre-training, and model algorithm is deployed in program;When After camera has shot a picture, program will be to the cargo and label progress target detection in picture;
(2) target detection model will handle shooting picture one by one, obtain the center of cargo and label in shooting picture And its bounding box information;Will appear multiple objects due to estimated in the same visual field, detection model need to detect all objects and according to It is secondary to be cut into subgraph, it is sent in the program of next step one-dimensional bar code detection and is calculated;As do not occurred in the visual field Label or cargo then cut without image and continue to execute this step.
In step S103, just it is easy when one-dimension code picture provided in an embodiment of the present invention is in the horizontal direction and pixel is more visible It being read by reading code program, the feature that one-dimensional bar code image profile is obvious, image gradient is consistent is utilized in identification bar code algorithm, The characteristic will be judged to meet in image and pixel region that region is concentrated is for one-dimension code, and by the gradient direction in these regions work For the rotation angle of one-dimension code;Specific implementation process are as follows:
(1) by each label sub-image gray processing, and Gaussian Blur, noise reduction process are carried out;
(2) gradient direction of the profile point and profile point in image is calculated using Cany operator;
(3) cargo subgraph will be drawn with the rectangle of m*m (numerical value of m is adjusted according to actual effect, generally takes 5-10) size It is divided into several fritters, is recorded in the gradient direction of the profile point and profile point that in each fritter include;
(4) Screening Treatment is done, rejects and does not include profile point and the image fritter very few comprising profile point;
(5) the main gradient direction for calculating remaining image fritter, i.e., most concentrated with the gradient direction of profile point in fritter Direction be main gradient direction;If the more dispersed confusion of gradient direction, is rejected in fritter;
(6) connection processing, the fritter Cluster merging that closely located, density is concentrated are done to the identical fritter of each gradient direction At a region, and using the gradient direction as the gradient direction for merging rear region;Reject distance farther out, number rareness can not The fritter of cluster;
(7) judge to merge rear region area whether more than a certain threshold value, if it is, retaining, otherwise reject;
(8) it can show that remaining region is one-dimension code position by above step, and can be obtained according to gradient direction The level angle deviation of the one-dimensional bar code obtains identifiable one-dimensional bar code through rotation.
In step S104, the identification method provided in an embodiment of the present invention is open source program, is easy the one-dimensional item of reading horizontal The information of shape code, output result are a certain length numeric string.
In step S105, when generation following error situation provided in an embodiment of the present invention can reminding alarm, when necessary manually Error correction:
(1) feelings that can not be read when bar code is not pasted, is pasted onto camera fields of view dead range, bar code badly broken Condition;When the item that discovery cargo has completely passed into the visual field, and can be read to step 4 processing without discovery by step 1 Code issues alarm;
(2) due to label printing issues, two pieces or more the barcode size or text field may be detected in step 4;If it find that It is inconsistent that two pieces of bar codes interpret number, or interprets number and have length violation typical problem, issues alarm;
(3) since photo opporunity is shorter, in fact it could happen that identical goods appear in continuous multiple pictures, and the present invention is by basis Conveyor belt speed estimates that the tolerable time span for repeating serial number of the same race permits after reading a new bar code Perhaps the bar code of this same sequence number repeats to be read within certain a period of time later;If exceeded the time, conveyer belt is indicated Cargo advance is not transmitted, issues alarm.
As shown in Fig. 2, the logistics bar code detection method Technology Roadmap of view-based access control model provided in an embodiment of the present invention.
As shown in figure 3, freight detection flow chart provided in an embodiment of the present invention.
As shown in figure 4, barcode detection provided in an embodiment of the present invention reads flow chart.
Application principle of the invention is further elaborated combined with specific embodiments below;
Interception is belonged to the bounding box of cargo by the present invention within sweep of the eye first, forms the subgraph of each cargo, then The processing and merger that profile and gradient direction are done in these subgraphs, finally extract the pixel coverage for belonging to one-dimensional barcode. After the one-dimension code picture rotation to level finally extracted, one-dimension code sequence is read out using decoding program.
Detailed process of the present invention is as follows:
(1) start process flow, photographing mode is set, it is ensured that each cargo and its label image can clearly be shot;
(2) position and the rectangle size of each cargo and label are identified, and intercepts out all cargos and label sub-image;
(3) the one-dimensional code position in each label sub-image is found, one-dimension code picture is extracted;
(4) digital coding of identification one-dimension code is read;
(5) if mistake occurs, alarm;Otherwise next picture is continued with since (2).
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real It is existing.When using entirely or partly realizing in the form of a computer program product, the computer program product include one or Multiple computer instructions.When loading on computers or executing the computer program instructions, entirely or partly generate according to Process described in the embodiment of the present invention or function.The computer can be general purpose computer, special purpose computer, computer network Network or other programmable devices.The computer instruction may be stored in a computer readable storage medium, or from one Computer readable storage medium is transmitted to another computer readable storage medium, for example, the computer instruction can be from one A web-site, computer, server or data center pass through wired (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL) Or wireless (such as infrared, wireless, microwave etc.) mode is carried out to another web-site, computer, server or data center Transmission).The computer-readable storage medium can be any usable medium or include one that computer can access The data storage devices such as a or multiple usable mediums integrated server, data center.The usable medium can be magnetic Jie Matter, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk Solid State Disk (SSD)) etc..
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within mind and principle.

Claims (9)

1. a kind of logistics bar code detection method of view-based access control model, which is characterized in that the logistics bar code of the view-based access control model Detection method, specifically includes the following steps:
Step 1: high definition high speed camera is fixed on a certain height and position right above conveyer belt, it is ensured that include a fixed length in the visual field The conveyer belt of degree and clearly cargo profile and label picture can be taken under the premise of cargo movement;
Step 2: using the YOLO algorithm of target detection in deep learning, judge all types of merchandize, mark in captured picture Sign position, bounding box size;Save the data type for forming freight all kinds and label;
Step 3: the interception picture saved in tag class data in processing step two through noise reduction and rotates to level, obtains and be easy to The one-dimensional bar code picture of reading, and make cargo class data spatially and can correspond to a tag class data;
Step 4: identifying bar code using Zbar method, handle by above step, obtain the horizontal picture of one-dimension code picture, Using identifying in Zbar program, the data of bar code are obtained;
Step 5: meeting reminding alarm, when necessary artificial error correction when error situation occurs.
2. the logistics bar code detection method of view-based access control model as described in claim 1, which is characterized in that in the step 1, High definition high speed camera can install grating before camera fields of view position, by the settable triggering mode of screening-mode, when there is the cargo will Into coverage, grating is triggered, order camera is continuously taken pictures a period of time;Screening-mode can also be set to continuously to take pictures, No matter whether there is or not cargos on conveyer belt, continuously take pictures all in accordance with certain time interval.
3. the logistics bar code detection method of view-based access control model as described in claim 1, which is characterized in that in the step 2, Logistics goods type is divided into hexahedron chest and packed package, orients place center and boundary of the cargo in photo The place center and bounding box size of frame size, label in photo;Since label exists only in cargo surfaces, therefore can cut The subgraph of label is taken out, and is saved into tag class data and is analyzed for lower step;YOLO algorithm of target detection in deep learning; Specific step is as follows:
(1) what a reliable object detection model by pre-training, and model algorithm is deployed in program;When camera has been shot After one picture, program will carry out target detection to the cargo in picture;
(2) target detection model will handle shooting picture one by one, obtain shooting picture in the number of cargo and label, position and its Bounding box information;It will appear multiple objects due to estimated in the same visual field, detection model need to detect all objects and successively cut It is cut into subgraph, saves into corresponding class data and be sent into the program of next step one-dimensional bar code detection and calculated;The visual field In as there is not cargo or label, then cut without image and continue to execute this step.
4. the logistics bar code detection method of view-based access control model as described in claim 1, which is characterized in that in the step 3, It is just easy to be read by reading code program when one-dimension code picture is in the horizontal direction and pixel is more visible, identification bar code algorithm is utilized one The dimension feature that bar code image profile is obvious, image gradient is consistent will judge the picture for meeting the characteristic in image and region is concentrated Plain region is one-dimension code, and using the gradient direction in region as the rotation angle of one-dimension code;Specific implementation process are as follows:
(1) by the subgraph gray processing of tag class data, and Gaussian Blur, noise reduction process are carried out;
(2) gradient direction of the profile point and profile point in image is calculated using Cany operator;
(3) cargo subgraph will be divided into several fritters with the rectangle of m*m size, is recorded in the profile in each fritter included The gradient direction of point and profile point;
(4) Screening Treatment is done, rejects and does not include profile point and the image fritter very few comprising profile point;
(5) the main gradient direction of remaining image fritter, i.e., the side most concentrated with the gradient direction of profile point in fritter are calculated Xiang Weizhu gradient direction;If the more dispersed confusion of gradient direction, is rejected in fritter;
(6) connection processing is done to the identical fritter of each gradient direction, the fritter Cluster merging that closely located, density is concentrated is at one A region, and using the gradient direction as the gradient direction for merging rear region;Reject distance farther out, number rareness can not cluster Fritter;
(7) judge to merge rear region area whether more than a certain threshold value, if it is, retaining, otherwise reject;
(8) can show that remaining region is one-dimension code position by above step, and can be obtained according to gradient direction this one The level angle deviation for tieing up bar code obtains identifiable one-dimensional bar code through rotation.
5. the logistics bar code detection method of view-based access control model as described in claim 1, which is characterized in that in the step 4, The identification method is open source program, is easy the information of reading horizontal one-dimensional bar code, and output result is a certain length numeric string.
6. the logistics bar code detection method of view-based access control model as described in claim 1, which is characterized in that in the step 5, Meeting reminding alarm when following error situation occurs, artificial error correction when necessary:
(1) the case where can not being read when bar code is not pasted, is pasted onto camera fields of view dead range, bar code badly broken; When discovery cargo has completely passed into the visual field, and by step 1 to step 4 processing without the bar code that can be read of discovery, Issue alarm;
(2) due to label printing issues, two pieces or more the barcode size or text field may be detected in step 4;If it find that two pieces It is inconsistent that bar code interprets number, or interprets number and have a length violation typical problem, issues alarm;
(3) since photo opporunity is shorter, in fact it could happen that identical goods appear in continuous multiple pictures, and the present invention will be according to transmission Tape speed estimates that the tolerable time span for repeating serial number of the same race allows this after reading a new bar code The bar code of a same sequence number repeats to be read within certain a period of time later;If exceeded the time, indicate that conveyer belt does not pass Delivery object advances, and issues alarm.
7. a kind of computer journey for the logistics bar code detection method for realizing view-based access control model described in claim 1~6 any one Sequence.
8. a kind of information data for the logistics bar code detection method for realizing view-based access control model described in claim 1~6 any one Processing terminal.
9. a kind of computer readable storage medium, including instruction, when run on a computer, so that computer is executed as weighed Benefit requires the logistics bar code detection method of view-based access control model described in 1-6 any one.
CN201811443403.8A 2018-11-29 2018-11-29 Vision-based logistics barcode detection method and readable storage medium Active CN109583535B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811443403.8A CN109583535B (en) 2018-11-29 2018-11-29 Vision-based logistics barcode detection method and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811443403.8A CN109583535B (en) 2018-11-29 2018-11-29 Vision-based logistics barcode detection method and readable storage medium

Publications (2)

Publication Number Publication Date
CN109583535A true CN109583535A (en) 2019-04-05
CN109583535B CN109583535B (en) 2023-04-18

Family

ID=65925299

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811443403.8A Active CN109583535B (en) 2018-11-29 2018-11-29 Vision-based logistics barcode detection method and readable storage medium

Country Status (1)

Country Link
CN (1) CN109583535B (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110322199A (en) * 2019-06-28 2019-10-11 成都诚至诚商务物流有限责任公司 The safe outbound device systems and method of image recognition
CN110659706A (en) * 2019-10-15 2020-01-07 广东燕塘乳业股份有限公司 Two-dimensional code identification method based on stacking
CN111553914A (en) * 2020-05-08 2020-08-18 深圳前海微众银行股份有限公司 Vision-based goods detection method and device, terminal and readable storage medium
CN111770263A (en) * 2020-05-22 2020-10-13 盟立自动化(昆山)有限公司 Visual method for accurately capturing image of flowing product at specific visual angle
CN111914579A (en) * 2020-07-01 2020-11-10 上海视界纵横智能科技有限公司 Industrial scanning device and method for self-learning beat recognition
CN112507747A (en) * 2020-12-10 2021-03-16 北京爱创科技股份有限公司 Tracing code scanning device and method
CN112800796A (en) * 2019-11-14 2021-05-14 杭州海康机器人技术有限公司 Code reading method and device and logistics system
CN112818720A (en) * 2021-01-26 2021-05-18 深圳市微目腾科技术有限公司 Two-dimensional code detection method, detection device and storage medium
CN113114877A (en) * 2021-02-23 2021-07-13 广州弥特智能科技有限公司 Multi-bottle rotary acquisition and identification method and equipment
CN113449532A (en) * 2020-03-25 2021-09-28 杭州海康机器人技术有限公司 Method, device, computing equipment, logistics system and storage medium for detecting packages
CN114330407A (en) * 2021-12-30 2022-04-12 深圳创维-Rgb电子有限公司 Method, device, equipment and storage medium for detecting and identifying bar code
CN115081467A (en) * 2022-07-22 2022-09-20 深圳市成为信息股份有限公司 Method for collecting original image by handset, handset and storage medium
WO2022227879A1 (en) * 2021-04-30 2022-11-03 南方科技大学 Logistics management method and system based on qr code, and server and storage medium
CN116882432A (en) * 2023-07-11 2023-10-13 深圳市裕源欣电子科技有限公司 Method and system for scanning multiple materials, readable storage medium and computer equipment
CN117764094A (en) * 2024-02-21 2024-03-26 博诚经纬软件科技有限公司 Intelligent warehouse management system and method for customs

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103810454A (en) * 2012-11-14 2014-05-21 苏州工业园区高泰电子有限公司 Automatic scanner
CN104281931A (en) * 2014-10-22 2015-01-14 天津慧博科技发展有限公司 Goods checking and classifying system
CN204399926U (en) * 2015-01-01 2015-06-17 广州市嘉诚国际物流股份有限公司 Intelligent cargo cabinet enters goods system
CN107633192A (en) * 2017-08-22 2018-01-26 电子科技大学 Bar code segmentation and reading method under a kind of complex background based on machine vision
CN108647553A (en) * 2018-05-10 2018-10-12 上海扩博智能技术有限公司 Rapid expansion method, system, equipment and the storage medium of model training image

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103810454A (en) * 2012-11-14 2014-05-21 苏州工业园区高泰电子有限公司 Automatic scanner
CN104281931A (en) * 2014-10-22 2015-01-14 天津慧博科技发展有限公司 Goods checking and classifying system
CN204399926U (en) * 2015-01-01 2015-06-17 广州市嘉诚国际物流股份有限公司 Intelligent cargo cabinet enters goods system
CN107633192A (en) * 2017-08-22 2018-01-26 电子科技大学 Bar code segmentation and reading method under a kind of complex background based on machine vision
CN108647553A (en) * 2018-05-10 2018-10-12 上海扩博智能技术有限公司 Rapid expansion method, system, equipment and the storage medium of model training image

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110322199B (en) * 2019-06-28 2024-05-14 四川省烟草公司成都市公司 Safe ex-warehouse equipment system and method for image recognition
CN110322199A (en) * 2019-06-28 2019-10-11 成都诚至诚商务物流有限责任公司 The safe outbound device systems and method of image recognition
CN110659706A (en) * 2019-10-15 2020-01-07 广东燕塘乳业股份有限公司 Two-dimensional code identification method based on stacking
CN112800796B (en) * 2019-11-14 2023-05-26 杭州海康机器人股份有限公司 Code reading method, code reading device and logistics system
CN112800796A (en) * 2019-11-14 2021-05-14 杭州海康机器人技术有限公司 Code reading method and device and logistics system
CN113449532A (en) * 2020-03-25 2021-09-28 杭州海康机器人技术有限公司 Method, device, computing equipment, logistics system and storage medium for detecting packages
CN113449532B (en) * 2020-03-25 2022-04-19 杭州海康机器人技术有限公司 Method, device, computing equipment, logistics system and storage medium for detecting packages
CN111553914A (en) * 2020-05-08 2020-08-18 深圳前海微众银行股份有限公司 Vision-based goods detection method and device, terminal and readable storage medium
CN111553914B (en) * 2020-05-08 2021-11-12 深圳前海微众银行股份有限公司 Vision-based goods detection method and device, terminal and readable storage medium
CN111770263A (en) * 2020-05-22 2020-10-13 盟立自动化(昆山)有限公司 Visual method for accurately capturing image of flowing product at specific visual angle
CN111914579A (en) * 2020-07-01 2020-11-10 上海视界纵横智能科技有限公司 Industrial scanning device and method for self-learning beat recognition
CN111914579B (en) * 2020-07-01 2021-03-12 上海视界纵横智能科技有限公司 Industrial scanning device and method for self-learning beat recognition
CN112507747A (en) * 2020-12-10 2021-03-16 北京爱创科技股份有限公司 Tracing code scanning device and method
CN112507747B (en) * 2020-12-10 2024-04-19 北京爱创科技股份有限公司 Device and method for scanning traceability codes
CN112818720A (en) * 2021-01-26 2021-05-18 深圳市微目腾科技术有限公司 Two-dimensional code detection method, detection device and storage medium
CN113114877A (en) * 2021-02-23 2021-07-13 广州弥特智能科技有限公司 Multi-bottle rotary acquisition and identification method and equipment
WO2022227879A1 (en) * 2021-04-30 2022-11-03 南方科技大学 Logistics management method and system based on qr code, and server and storage medium
US11631261B2 (en) 2021-04-30 2023-04-18 Southern University Of Science And Technology Method, system, server, and storage medium for logistics management based on QR code
CN114330407A (en) * 2021-12-30 2022-04-12 深圳创维-Rgb电子有限公司 Method, device, equipment and storage medium for detecting and identifying bar code
CN115081467A (en) * 2022-07-22 2022-09-20 深圳市成为信息股份有限公司 Method for collecting original image by handset, handset and storage medium
CN116882432B (en) * 2023-07-11 2024-03-22 深圳市裕源欣电子科技有限公司 Method and system for scanning multiple materials, readable storage medium and computer equipment
CN116882432A (en) * 2023-07-11 2023-10-13 深圳市裕源欣电子科技有限公司 Method and system for scanning multiple materials, readable storage medium and computer equipment
CN117764094A (en) * 2024-02-21 2024-03-26 博诚经纬软件科技有限公司 Intelligent warehouse management system and method for customs
CN117764094B (en) * 2024-02-21 2024-05-10 博诚经纬软件科技有限公司 Intelligent warehouse management system and method for customs

Also Published As

Publication number Publication date
CN109583535B (en) 2023-04-18

Similar Documents

Publication Publication Date Title
CN109583535A (en) A kind of logistics bar code detection method, the computer program of view-based access control model
Laroca et al. An efficient and layout‐independent automatic license plate recognition system based on the YOLO detector
US9830704B1 (en) Predicting performance metrics for algorithms
CN107617573B (en) Logistics code identification and sorting method based on multitask deep learning
US11443133B2 (en) Computer vision system for industrial equipment gauge digitization and alarms
EP3899508A1 (en) Automated inspection system and associated method for assessing the condition of shipping containers
US20140153779A1 (en) Object Segmentation at a Self-Checkout
CN109815863B (en) Smoke and fire detection method and system based on deep learning and image recognition
CN109635797B (en) Steel coil sequence accurate positioning method based on multi-carrier identification technology
CN106355367A (en) Warehouse monitoring management device
CN111223260A (en) Method and system for intelligently monitoring goods theft prevention in warehousing management
CN110348293B (en) Commodity identification method and system
CN111597857B (en) Logistics package detection method, device, equipment and readable storage medium
CN113962274A (en) Abnormity identification method and device, electronic equipment and storage medium
CN115880260A (en) Method, device and equipment for detecting base station construction and computer readable storage medium
Mi et al. Research on a Fast Human‐Detection Algorithm for Unmanned Surveillance Area in Bulk Ports
CN111680680B (en) Target code positioning method and device, electronic equipment and storage medium
CN107784625B (en) Electronic device, virtual sample generation method and storage medium
CN106033526A (en) Method of positioning bar code area based on gradient direction characteristic matching algorithm
Noceti et al. A multi-camera system for damage and tampering detection in a postal security framework
CN114491648A (en) Block chain data privacy protection method for video live broadcast social big data
CN110942008A (en) Method and system for positioning waybill information based on deep learning
Wang Recognition and Positioning of Container Lock Holes for Intelligent Handling Terminal Based on Convolutional Neural Network.
CN114596102B (en) Block chain-based anti-counterfeiting traceability federated learning training method and device
US20230057340A1 (en) Systems, methods, and devices for automated meter reading for smart field patrol

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20220704

Address after: 410073 Hunan province Changsha Kaifu District, Deya Road No. 109

Applicant after: National University of Defense Technology

Address before: Room 1505, building 2, Xincheng Science Park, 588 Yuelu West Avenue, Changsha hi tech Development Zone, Hunan 410000

Applicant before: HUNAN SPEEDBOT ROBOT Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant