WO2018024024A1 - 一种物流包裹图片处理方法、装置及系统 - Google Patents

一种物流包裹图片处理方法、装置及系统 Download PDF

Info

Publication number
WO2018024024A1
WO2018024024A1 PCT/CN2017/086598 CN2017086598W WO2018024024A1 WO 2018024024 A1 WO2018024024 A1 WO 2018024024A1 CN 2017086598 W CN2017086598 W CN 2017086598W WO 2018024024 A1 WO2018024024 A1 WO 2018024024A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture
barcode
information
relative
package
Prior art date
Application number
PCT/CN2017/086598
Other languages
English (en)
French (fr)
Inventor
万其明
施行
朱明凌
Original Assignee
杭州海康威视数字技术股份有限公司
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 杭州海康威视数字技术股份有限公司 filed Critical 杭州海康威视数字技术股份有限公司
Priority to US16/321,959 priority Critical patent/US10860877B2/en
Priority to EP17836207.5A priority patent/EP3493099B1/en
Publication of WO2018024024A1 publication Critical patent/WO2018024024A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/083Shipping
    • G06Q10/0833Tracking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06018Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking one-dimensional coding
    • G06K19/06028Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking one-dimensional coding using bar codes
    • 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
    • G06K7/10861Methods 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 sensing of data fields affixed to objects or articles, e.g. coded labels
    • 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/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14131D bar codes
    • 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/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1439Methods for optical code recognition including a method step for retrieval of the optical code
    • G06K7/1443Methods for optical code recognition including a method step for retrieval of the optical code locating of the code in an image
    • 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/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/146Methods for optical code recognition the method including quality enhancement steps
    • G06K7/1465Methods for optical code recognition the method including quality enhancement steps using several successive scans of the optical code

Definitions

  • the present application relates to the field of logistics picture processing technology, and in particular, to a logistics package picture processing method, device and system.
  • the collection of logistics package information is usually obtained by identifying the barcode on the surface of the logistics package.
  • the type of barcode can be a one-dimensional code (also known as a barcode) or a two-dimensional code (also known as a two-dimensional barcode).
  • the barcode is a graphic identifier for expressing a set of information by arranging a plurality of black bars and spaces of different widths according to a certain coding rule.
  • a common bar code is a parallel line pattern in which black bars (abbreviated as bars) and white bars (abbreviated as empty) having a large difference in reflectance are arranged.
  • a two-dimensional code is a black-and-white inter-pattern that is distributed in a plane (two-dimensional direction) by a certain geometric pattern according to a certain rule. It can "encode” related information of text, image, audio, video, etc. into an image. This information is displayed when these images are taken with specific software.
  • the process of identifying the barcode of the surface of the logistics package is usually by directly scanning and identifying the barcode by using a barcode scanner, or first capturing a picture of the surface of the package by using a camera, identifying a barcode area from the captured image, and then The barcode in the barcode area is identified.
  • the relevant logistics package image processing method can only obtain the recognition result of the barcode, and cannot obtain the captured image in which the barcode is in a proper position.
  • the capture picture with the barcode in the proper position has great application in saving logistics package information and providing logistics evidence.
  • the embodiment of the present application provides a method, a device, and a system for processing a logistics package image, so as to solve the problem that a snapshot image of a barcode in a suitable position cannot be obtained in the related logistics package image processing. problem.
  • an embodiment of the present application provides a method for processing a logistics package image, including:
  • N is a natural number
  • Identifying the barcode in the Nth picture acquiring the information of the barcode, and adding the information of the barcode to the queue; wherein the information of the barcode includes the barcode relative to the Nth The relative position of the picture;
  • the information of the bar code in the (N+1)th picture includes the Nth a relative position of the barcode in the +1 picture with respect to the (N+1)th picture;
  • the screen is selected from all the pictures captured by the package. The best picture.
  • the relative position of a bar code in any of the pictures relative to the picture comprises: a relative position of the circumscribed polygon vertices of the bar code in the picture.
  • the determining, by the relative position of the barcode in the (N+1)th picture, the predicted position Matching comprising: determining whether a distance difference between a center point of a relative position of the barcode in the (N+1)th picture relative to the N+1th picture and a center point of the predicted position satisfies a predetermined threshold It is required that if a predetermined threshold requirement is met, determining a relative position of the barcode in the (N+1)th picture relative to the (N+1)th picture matches the predicted position.
  • the bar code is based on a preset The best relative position and the information of the barcode added to the queue, the best picture is selected from all the pictures captured by the package, including: after the package leaves the field of view, according to the obtained barcode In the corresponding position in the corresponding picture, respectively calculate the center of the barcode in each captured picture; in each captured picture, select the picture whose center distance is closest to the center of the picture as the best picture; or in each capture In the picture, the picture closest to the center of the preset area is selected as the best picture.
  • the method for processing a logistics package image further includes: outputting the filtered best image.
  • the information of the barcode further includes a recognition result of the barcode
  • the processing method further includes:
  • the recognition result of the barcode is analyzed bit by bit, and the character with the highest frequency appearing in the same bit is used as the recognition result of the bit to obtain the final recognition result of the barcode.
  • the method for processing a logistics package image further comprises: superimposing the final recognition result of the barcode on the best selected screening In the picture.
  • a seventh implementation manner of the first aspect if the relative position of the barcode in the (N+1)th picture relative to the (N+1)th picture does not match the predicted position, And adding the information of the barcode in the (N+1)th picture to another queue.
  • the pair of the Nth map The barcode in the slice is identified, the information of the barcode is obtained, and the information of the barcode is added to the queue, including: identifying a barcode in the Nth image, acquiring information of multiple barcodes, and The information of each bar code is respectively added to different queues; wherein the information of each bar code includes the relative position of the bar code with respect to the Nth picture.
  • determining a relative position of the barcode in the (N+1)th picture relative to the (N+1)th picture, Whether the predicted positions match; if they match, the information of the barcode in the (N+1)th picture is added to the queue including:
  • the information of the barcode added to the queue is used to select the best picture from all the pictures captured by the package, including:
  • the relative positions of each bar code in the picture relative to the picture are respectively obtained from a plurality of queues, and a common center of the plurality of bar codes in the picture is calculated;
  • a picture in which the common center of the plurality of barcodes is closest to the center of the preset area is selected as the best picture.
  • the embodiment of the present application provides a logistics package image processing apparatus, including:
  • a first photographing module configured to capture a Nth picture of a package moving in a field of view; wherein N is a natural number;
  • a first identification module configured to identify a barcode in the Nth picture, obtain information about the barcode, and add information of the barcode to a queue; where the barcode information includes the barcode Relative position relative to the Nth picture;
  • a prediction module configured to predict a position of the barcode in the Nth picture in the N+1th snapshot image
  • a second photographing module configured to capture the N+1th picture of the package
  • a second identification module configured to identify a barcode in the (N+1)th picture, and obtain information about a barcode in the (N+1)th picture; wherein the barcode in the (N+1)th picture The information includes a relative position of the barcode in the (N+1)th picture relative to the (N+1)th picture;
  • a matching module configured to determine whether a relative position of the barcode in the (N+1)th picture relative to the (N+1)th picture matches a predicted position; if matched, the N+th The information of the barcode in one picture is added to the queue;
  • a screening module configured to capture all the pictures captured from the package according to the optimal relative position of the preset barcode relative to the picture and the information of the barcode added to the queue after the package leaves the field of view Filter out the best pictures.
  • a relative position of a bar code in the picture relative to the picture includes: a relative position of the circumscribed polygon vertex of the bar code in the picture.
  • the matching module includes:
  • a first determining submodule configured to determine a center point of a relative position of the barcode in the (N+1)th picture relative to the (N+1)th picture, and determine a center point of the predicted position
  • a determining submodule configured to determine whether a distance difference between a center point of a relative position of the bar code in the (N+1)th picture relative to the N+1th picture and a center point of the predicted position satisfies a predetermined a threshold requirement; if a predetermined threshold requirement is met, determining a barcode phase in the (N+1)th picture The relative position of the (N+1)th picture is matched with the predicted position.
  • the screening module includes:
  • a second determining submodule configured to calculate, according to the relative position of the obtained barcode in the corresponding picture, the center of the barcode in each captured picture after the package leaves the field of view;
  • the screening sub-module is configured to select, in each of the captured pictures, a picture whose center distance is closest to the center of the picture as the best picture, or for selecting a center distance of the bar code in each captured picture. The most recent picture of the regional center, as the best picture.
  • the logistics package image processing apparatus further includes: a picture output module, configured to output the best picture filtered by the screening module.
  • the information of the barcode further includes a recognition result of the barcode
  • the processing device further includes:
  • a character fusion module configured to classify the recognition result of the barcode in all captured images according to the number of characters in the recognition result of the same barcode after the package leaves the field of view; and select the inclusion result from the classification result The class with the largest number of class members; in the selected class, the recognition result of the same bar code is analyzed bit by bit, and the character with the highest frequency appears in the same bit as the recognition result of the bit to obtain the same bar code The final recognition result.
  • the logistics package image processing apparatus further includes: a superimposing module, configured to superimpose the final recognition result of the barcode Filter out the best pictures.
  • the matching module is further configured to: if a relative position of the barcode in the (N+1)th picture relative to the (N+1)th picture If the predicted position does not match, the information of the barcode in the (N+1)th picture is added to another queue.
  • the first identifying module is configured to identify a barcode in the Nth picture, obtain information about multiple barcodes, and The bar code information is respectively added to different queues; wherein the information of each bar code includes the relative position of the bar code relative to the Nth picture.
  • the matching module is configured to determine, for each barcode in the (N+1)th picture, the barcode Whether a distance difference between a center point of the relative position of the (N+1)th picture and a center point of the predicted position of the bar code in the (N+1)th snap shot satisfies a predetermined threshold requirement, and if a predetermined threshold requirement is met, And determining a relative position of the barcode relative to the (N+1)th picture, matching a predicted position of the barcode in the N+1th snapshot, and comparing a relative position in the (N+1)th picture.
  • the information of each barcode that matches the predicted position is added to a different queue.
  • the screening module is specifically configured to: after the package leaves the field of view, for each captured picture, The respective positions of each bar code in the picture relative to the picture are obtained, and the common centers of the plurality of bar codes in the picture are calculated; in each captured picture, the common center distance of the plurality of bar codes is selected to correspond to the center of the picture. The most recent picture is taken as the best picture; or in each captured picture, the picture with the common center of the plurality of barcodes closest to the center of the preset area is selected as the best picture.
  • the embodiment of the present invention provides a logistics package image processing system, comprising: a conveyor belt and the logistics package image processing device according to any of the foregoing embodiments;
  • the conveyor belt is used to convey the package
  • the logistics package image processing device is configured to take a picture and process the taken picture when the package placed on the conveyor enters the field of view.
  • an embodiment of the present application provides an electronic device, which is suitable for processing a logistics package image.
  • the electronic device includes:
  • the circuit board is disposed in the housing Inside the enclosed space, the processor and the memory are disposed on the circuit board; the power circuit is used to supply power to each circuit or device of the electronic device; the memory is used to store executable program code; and the processor reads the memory stored in the memory Execute the program code to run the program corresponding to the executable program code for performing the following steps:
  • N is a natural number
  • Identifying the barcode in the Nth picture acquiring the information of the barcode, and adding the information of the barcode to the queue; wherein the information of the barcode includes the barcode relative to the Nth The relative position of the picture;
  • the information of the bar code in the (N+1)th picture includes the Nth a relative position of the barcode in the +1 picture with respect to the (N+1)th picture;
  • the best image is selected from all the pictures captured by the package. image.
  • an embodiment of the present application provides an application program, where the application is used to execute a logistics package image processing method provided by an embodiment of the present application.
  • the method includes:
  • N is a natural number
  • Identifying the barcode in the Nth picture acquiring the information of the barcode, and adding the information of the barcode to the queue; wherein the information of the barcode includes the barcode relative to the Nth The relative position of the picture;
  • the information of the bar code in the (N+1)th picture includes the Nth a relative position of the barcode in the +1 picture with respect to the (N+1)th picture;
  • the best image is selected from all the pictures captured by the package. image.
  • the embodiment of the present application provides a storage medium for storing executable code, where the executable code is used to execute the logistics package image processing method provided by the embodiment of the present application.
  • the method includes:
  • N is a natural number
  • Identifying the barcode in the Nth picture acquiring the information of the barcode, and adding the information of the barcode to the queue; wherein the information of the barcode includes the barcode relative to the Nth The relative position of the picture;
  • the information of the bar code in the (N+1)th picture includes the Nth a relative position of the barcode in the +1 picture with respect to the (N+1)th picture;
  • the best phase relative to the picture For the location and the information of the barcodes added to the queue, the best picture is filtered from all the pictures captured for the package.
  • the method, device and system for processing a logistics package image by capturing an Nth picture of a package moving in a field of view, identifying a barcode in the Nth picture, and acquiring the barcode Information about a relative position of the Nth picture; predicting a position of the bar code in the Nth picture in the N+1th snapshot image, and identifying a barcode in the N+1th picture captured Obtaining a relative position of the barcode with respect to the (N+1)th picture; determining a relative position of the barcode in the (N+1)th picture relative to the (N+1)th picture, and whether the predicted position is Matching, if matched, adding information of the barcode in the (N+1)th picture to the queue; after the package leaves the field of view, according to the preset barcode, the most relative to the picture a good relative position and the information of the barcode added to the queue, and the best picture is selected from all the pictures captured by the package, so that the bar code can be identified and tracked through
  • Embodiment 1 is a schematic flow chart of Embodiment 1 of a method for processing a picture of a logistics package according to the present application;
  • FIG. 2 is a schematic diagram of a sequence of pictures of a parcel obtained in the embodiment from entering the field of view to leaving the field of view;
  • FIG. 3 is a schematic diagram of a center of a picture and a region set by a user in a picture in the first embodiment of the method for processing a stream parcel image of the present application;
  • FIG. 4 is a schematic flow chart of character fusion in the first embodiment of the method for processing a stream package image in the present application
  • FIG. 5 is a schematic structural diagram of character fusion in the first embodiment of the present invention.
  • Embodiment 6 is a schematic flowchart of Embodiment 2 of a method for processing a picture of a logistics package according to the present application;
  • FIG. 7 is a schematic structural diagram of Embodiment 1 of a stream parcel image processing apparatus according to the present application.
  • Embodiment 1 is a schematic flow chart of Embodiment 1 of a method for processing a picture of a logistics package according to the present application.
  • the embodiment is applicable to the collection of the package information during a transmission process on a conveyor belt.
  • the method in this embodiment may include:
  • Step 101 Capture the Nth picture of the package moving in the field of view.
  • the N is a natural number.
  • the package may be a package or a package, and the barcode is provided on the surface of the package.
  • the barcode may be one or more.
  • the barcode may be a one-dimensional code (also called a barcode). It can also be a QR code. In this embodiment, the number of the barcodes is taken as an example for description.
  • FIG. 2 is a schematic diagram of a picture sequence of the package obtained from entering the field of view to leaving the field of view.
  • the signal that the package enters the field of view can be acquired according to the laser trigger signal.
  • Step 102 Identify a barcode in the Nth picture, obtain information about the barcode, and add the information of the barcode to a queue.
  • the information of the barcode includes a relative position of the barcode relative to the Nth picture.
  • the relative position included in the information of the barcode is a relative position of a circumscribed polygon vertex of the barcode, such as a vertex of the circumscribed rectangle, in the image.
  • the barcode identification algorithm may be called in real time to obtain the identification information of the barcode in the current captured image, and obtain the relative position of the barcode relative to the Nth image.
  • an initial queue may be established, and the barcode information obtained for the first time is added to the initial queue.
  • the result information of the relative position of the new picture and the bar code in the new picture appears, firstly matching with the predicted position of the previous code, when the position coincidence degree meets the threshold requirement, the bar code of the new picture is considered to be One code is the same barcode, and the barcode information of the new image is added to the queue corresponding to the previous code.
  • the predicted position of the previous code can be implemented according to the method described in step 103.
  • Step 103 Predict the position of the barcode in the Nth picture in the N+1th snapshot.
  • a tracking algorithm can be used to predict the position of the barcode in the current picture, and the predicted position is used to evaluate the movement of the barcode in the X and Y directions. Speed and predict the approximate location of its next occurrence.
  • the tracking algorithm that can be utilized in this embodiment includes, but is not limited to, Kalman Filter, Particle Filter, etc., real-time prediction of the barcode in the Nth picture at the N+1th capture The position in the figure.
  • the position of the barcode in the N+1th snapshot image may also be predicted according to the relative position of the barcode in the Nth picture, the moving speed of the package, and the capture period of the camera.
  • Step 104 Capture the N+1th picture to the package.
  • the N+1th picture is captured on the package.
  • Step 105 Identify a barcode in the (N+1)th picture, and obtain information about a barcode in the (N+1)th picture.
  • the information about the barcode in the (N+1)th picture includes the relative position of the barcode in the (N+1)th picture relative to the (N+1)th picture.
  • the relative position included in the information of the barcode is a relative position of a circumscribed polygon vertex of the barcode, such as a vertex of the circumscribed rectangle, in the image.
  • the bar code recognition algorithm may be called in real time to obtain the identification information of the bar code in the current captured picture, and obtain the relative position of the bar code relative to the N+1th picture.
  • Step 106 Determine whether a relative position of the barcode in the (N+1)th picture relative to the (N+1)th picture matches the predicted position.
  • the relative position of the barcode in the (N+1)th picture relative to the (N+1)th picture is determined by determining whether the edge of the barcode is consistent, and whether the predicted position matches .
  • a distance between a center point of a relative position of the barcode in the (N+1)th picture relative to the (N+1)th picture and a center point of the predicted position may be determined Whether the difference satisfies a predetermined threshold requirement to determine whether a relative position of the barcode in the (N+1)th picture relative to the (N+1)th picture matches the predicted position. It is determined that a distance difference between a center point of a relative position of the barcode in the (N+1)th picture relative to the N+1th picture and a center point of the predicted position satisfies a predetermined threshold requirement And determining a relative position of the barcode in the (N+1)th picture relative to the (N+1)th picture to match the predicted position.
  • step 107 if the relative position of the barcode in the (N+1)th picture relative to the (N+1)th picture matches the predicted position of the bar code in the (N+1)th capture picture, Then step 107 is performed.
  • Step 107 Add information of the barcode in the (N+1)th picture to the queue.
  • the N+1th piece may be determined.
  • the barcode in the picture is the same barcode as the barcode in the Nth picture, so the information of the same barcode is added to the same queue.
  • the barcode in the (N+1)th picture is Information is added to another queue. For example, the information of the bar code of the N+1th picture that does not match is added to the newly created queue.
  • Step 108 Filter out the best picture from all the pictures captured by the package.
  • the packet is captured from the package. Filter the best pictures in all the pictures.
  • the signal that the package leaves the field of view can be acquired according to the laser trigger signal.
  • the bar code in each captured picture may be separately calculated according to the relative position of the bar code added to the queue in the corresponding picture.
  • the preset area may be an area set by the user in the corresponding picture.
  • Figure 3 shows a schematic diagram of the center of the picture and the user's preset area in the picture.
  • the method for processing the logistics package image provided by the embodiment of the present application can identify and track the barcode by the above steps, and can filter out the best picture from all the pictures captured by the package.
  • the best picture selected in this embodiment can be saved as logistics evidence.
  • the logistics evidence of the picture can be found to determine the link.
  • the best pictures can also be stored as logistics package information for users to query, so that users can more intuitively see the package and make the logistics process more visible. Further, the barcodes in the picture are in a proper position, which can make the picture information more uniform, and the later management is more convenient, and the user experiences better when viewing the package information.
  • the logistics package image processing method may further include the step of: outputting the filtered best image.
  • the filtered best picture may be output to a database, such as a database output to a personal computer or a handheld terminal.
  • the information of the barcode further includes a recognition result of the barcode; and the processing method further includes the step of performing character fusion on the recognition result of the barcode.
  • the tracking number of the barcode is M. Due to factors such as external interference, the recognition result of the M times cannot be guaranteed to be identical, so character fusion is required, and the best identification is output. result.
  • FIG. 4 is a schematic flow chart of character fusion in the embodiment of the method for processing a stream parcel image according to the present application.
  • the step of performing character fusion on the identification result of the barcode includes:
  • the recognition result of the same barcode in all captured pictures is classified according to the number of characters in the recognition result of the same barcode. For example, the M recognition results of the same barcode in all captured pictures are classified into N categories.
  • the class contains class members (that is, the recognition result of the bar code).
  • Each class member in the same class contains the same number of characters.
  • the number of class members included in different classes is different.
  • the N+1th piece may be determined.
  • the barcode in the picture is the same barcode as the barcode in the Nth picture, so the information of the same barcode is added to the same queue; if the barcode in the (N+1)th picture is relative to the Nth If the relative position of the +1 picture does not match the predicted position, the bar code in the N+1th picture may be determined to be not the same bar code as the bar code in the Nth picture, so The information of different barcodes is added to another queue.
  • FIG. 5 is a schematic structural diagram of character fusion in the embodiment.
  • the first 6 lines of the string are the ones that have the largest number of class members (6) selected from the classification results, and the last one is the final recognition result after the characters are merged.
  • the recognition result of the barcode is analyzed bit by bit, and the character with the highest frequency appearing in the same bit is used as the recognition result of the bit to obtain the final of the barcode. Identify the results. As a specific embodiment, the final recognition result of the barcode is obtained. See the last line of the character string in FIG. 5.
  • the step of performing character fusion on the recognition result of the barcode may be performed before or after screening the best image.
  • the final recognition result of the barcode can be accurately determined, and the recognition result is more accurate.
  • the final recognition result of the barcode may be output.
  • the final recognition result of the barcode may be superimposed on the filtered best image.
  • the final recognition result of the barcode is added to the blank position of the best picture, or the final recognition result of the barcode is overlaid on the corresponding barcode of the best picture, or the final recognition result of the barcode is added to the best picture. Corresponding to the bottom of the bar code, etc.
  • FIG. 6 is a schematic flowchart of Embodiment 2 of a method for processing a picture of a logistics package according to the present application.
  • the embodiment is applicable to the collection of the package information during a transmission process on a conveyor belt.
  • the method in this embodiment may include:
  • Step 201 Capture the Nth picture of the package moving in the field of view.
  • N is a natural number.
  • the package may be a package or a package, and the barcode is provided on the surface of the package.
  • the barcode may be one or more.
  • the barcode may be a one-dimensional code (also called a barcode). It can also be a QR code. In this embodiment, the number of the barcodes is described as an example.
  • a moving package such as a parcel on a conveyor belt
  • a picture capturing device such as a camera
  • the picture capturing device moves in the field of view with a predetermined shooting period, such as every 0.3 seconds or 0.5 seconds.
  • the package captures a picture, and a sequence of pictures of the package from entering the field of view to leaving the field of view is obtained.
  • the package can be acquired into the field of view according to the laser trigger signal. signal.
  • Step 202 Identify a barcode in the Nth picture, obtain information about multiple barcodes, and add information of each barcode to a different queue.
  • the information of each barcode includes the barcode.
  • the barcode in the Nth picture may be identified, the information of the first barcode and the information of the second barcode are obtained, and the The information of the first code is added to the first queue, and the information of the second barcode is added to the second queue.
  • the information of the first barcode includes a relative position of the first barcode with respect to the Nth picture
  • the information of the second barcode includes a relative of the second barcode with respect to the Nth picture. position.
  • the Nth picture may include 3, 4 or more barcodes, which is not specifically limited in this embodiment.
  • the description is made by taking two barcodes in the Nth picture as an example.
  • the relative position of a bar code in any picture relative to the picture includes: a circumscribed polygon vertex of the bar code such as a relative position of a vertex of the circumscribed rectangle in the picture.
  • the bar code recognition algorithm may be called in real time to obtain the identification information of the bar code in the current captured picture, and obtain the relative positions of the first bar code and the second bar code with respect to the Nth picture, respectively.
  • an initial queue may be established, and the barcode information obtained for the first time is added to the initial queue.
  • the result information of the relative position of the new picture and the bar code in the new picture appears, firstly matching with the predicted position of the previous code, when the position coincidence degree meets the threshold requirement, the bar code of the new picture is considered to be One code is the same barcode, and the barcode information of the new picture is added to the queue.
  • the matching degree of the two positions does not meet the threshold requirement, if the bar code of the new picture is another code, the information of the bar code of the new picture is added to another queue.
  • the predicted position of the previous code can be implemented according to the method described in step 203.
  • Step 203 Predict a position of the plurality of barcodes in the Nth picture in the N+1th snapshot image.
  • each barcode can correspond to a predicted position.
  • a tracking algorithm can be used to predict the position of a code in the current picture, and the predicted position is used to evaluate the movement of the bar code in the X and Y directions. Speed and predict the approximate location of its next occurrence.
  • the tracking algorithm that can be utilized in this embodiment includes, but is not limited to, Kalman Filter, Particle Filter, etc., real-time prediction of the barcode in the Nth picture at the N+1th capture The position in the figure.
  • the position of the barcode in the N+1th snapshot image may also be predicted according to the relative position of the barcode in the Nth picture, the moving speed of the package, and the capture period of the camera.
  • Step 204 Capture the N+1th picture to the package.
  • the N+1th picture is captured on the package.
  • Step 205 Identify a plurality of barcodes in the (N+1)th picture, and acquire information about multiple barcodes in the (N+1)th picture.
  • the information of the first barcode in the (N+1)th picture includes the relative position of the first barcode in the (N+1)th picture relative to the (N+1)th picture, the N+th
  • the information of the second barcode in one picture includes the relative position of the second barcode relative to the (N+1)th picture.
  • the relative position included in the information of the first barcode is a relative position of a circumscribed polygon vertex of the first barcode, such as a vertex of a circumscribed rectangle, in the picture;
  • the second barcode The relative position included in the information is a relative position of a circumscribed polygon vertex of the second barcode, such as a vertex of the circumscribed rectangle, in the picture.
  • Step 206 Determine, for each bar code in the (N+1)th picture, whether a relative position of the bar code relative to the N+1th picture and a predicted position of the bar code in the N+1th snapshot image are Match.
  • step 207 for each bar code in the (N+1)th picture, determining a relative position of the bar code relative to the (N+1)th picture and a prediction of the bar code in the N+1th snapshot image Whether the positions match, if they match, step 207 is performed.
  • Step 207 Add information of each bar code that matches the relative position and the predicted position in the N+1th picture to different queues.
  • step 206 if it is determined by the above step 206, if it is determined by the above step 206, if the relative position of the first barcode in the (N+1)th picture relative to the (N+1)th picture, and the first barcode in the N+1th capture If the predicted positions in the figure match, the information of the first barcode in the (N+1)th picture is added to the first queue; if the second code in the (N+1)th picture is relative to And comparing, by the relative position of the (N+1)th picture, the predicted position of the second bar code in the N+1th snapshot image, the information of the second barcode in the (N+1)th picture Joined to the second queue.
  • Step 208 Filter out the best picture from all the pictures captured by the package.
  • the signal that the package leaves the field of view can be acquired according to the laser trigger signal.
  • the method for processing a logistics package image provided by the embodiment of the present application can separately identify and track the plurality of barcodes in the captured image by using the above steps, and can filter out the best image from all the images captured by the package.
  • the logistics package image processing method may further include the step of: outputting the filtered best image.
  • the filtered best picture may be output to a database, such as a database output to a personal computer or a handheld terminal.
  • the information of the barcode further includes a recognition result of the barcode; and the processing method further includes respectively identifying the barcodes The step of character fusion.
  • the final recognition results of the plurality of barcodes may be superimposed on the selected best image respectively.
  • the final recognition result of the first barcode is overlaid on the first barcode of the best picture
  • the final recognition result of the second barcode is overlaid on the second barcode of the best picture
  • the final recognition result of the m-th barcode Covering the mth bar code of the best picture, m is the number of bar codes on the logistics package.
  • the final recognition result of the first barcode may be added under the first barcode of the best image
  • the final recognition result of the second barcode may be added under the second barcode of the best image, ... the final of the m-th barcode
  • the recognition result is added below the mth barcode of the best picture, where m is the number of barcodes on the logistics package.
  • multiple barcodes in the captured image are separately identified and tracked by the above steps. Matching, the best picture can be selected from all the pictures captured by the package.
  • FIG. 7 is a schematic flow chart of Embodiment 1 of a logistics package image processing apparatus according to the present application.
  • the embodiment is applicable to collection of the package information during a transmission process on a conveyor belt.
  • the logistics package image processing apparatus of this embodiment may include: a first photographing module 11, a first identifying module 12, a predicting module 13, a second photographing module 14, a second identifying module 15, a matching module 16, Screening module 17; wherein
  • the first photographing module 11 is configured to capture the Nth picture of the package moving in the field of view; wherein N is a natural number;
  • a first identification module 12 configured to identify a barcode in the Nth picture, obtain information about the barcode, and add information of the barcode to a queue; wherein the information of the barcode includes the a relative position of the barcode relative to the Nth picture;
  • the prediction module 13 is configured to predict a position of the barcode in the Nth picture in the N+1th snapshot image
  • the second camera module 14 is configured to capture the N+1th picture of the package
  • a second identification module 15 configured to identify a barcode in the (N+1)th picture, and obtain information about a barcode in the (N+1)th picture; wherein, in the (N+1)th picture
  • the information of the barcode includes a relative position of the barcode in the (N+1)th picture relative to the (N+1)th picture;
  • the matching module 16 is configured to determine whether a relative position of the barcode in the (N+1)th picture relative to the N+1th picture matches the predicted position; if matched, the The information of the barcode in the N+1th picture is added to the queue;
  • the screening module 17 is configured to: after the package leaves the field of view, according to the optimal relative position of the preset barcode relative to the picture and the information of the barcode added to the queue, all the captured from the package The best picture is filtered out in the picture.
  • first camera module 11 and the second camera module 14 may be the same module, or may be two different modules, preferably the same module.
  • the first identification module 12 and the second identification module 15 may be the same module or two different modules. Selected as the same module.
  • the device in this embodiment may be used to implement the technical solution of the method embodiment shown in FIG. 1 , and the implementation principle and technical effects are similar, and details are not described herein again.
  • the relative position of a barcode in the image relative to the image includes: a relative position of the apex of the circumscribed polygon of the barcode in the image.
  • the matching module 16 may include:
  • a first determining submodule configured to determine a center point of a relative position of the barcode in the (N+1)th picture relative to the (N+1)th picture, and determine a center point of the predicted position
  • a determining submodule configured to determine whether a distance difference between a center point of a relative position of the barcode in the (N+1)th picture relative to the N+1th picture and a center point of the predicted position is satisfied a predetermined threshold requirement; if a predetermined threshold requirement is met, determining a relative position of the barcode in the (N+1)th picture relative to the (N+1)th picture, matching the predicted position.
  • the N+1th piece may be determined.
  • the barcode in the picture is the same barcode as the barcode in the Nth picture, so the information of the same barcode is added to the same queue; if the barcode in the (N+1)th picture is relative to the Nth If the relative position of the +1 picture does not match the predicted position, the bar code in the N+1th picture may be determined to be not the same bar code as the bar code in the Nth picture, so The information of different barcodes is added to another queue.
  • the screening module 17 may further include: a second determining sub-module and a filtering sub-module; wherein
  • a second determining submodule configured to calculate, according to the information of the barcode added to the queue, the center of the barcode in each captured picture after the package leaves the field of view;
  • the screening sub-module is used to select the center distance of the barcode corresponding to the image in each captured image.
  • the most recent picture in the center is taken as the best picture; or in each picture taken, the picture whose center is closest to the center of the preset area is selected as the best picture.
  • the logistics package image processing device may further include: a picture output module, configured to filter the best picture by the screening module. Output.
  • the filtered best picture may be output to a database, such as a database output to a personal computer or a handheld terminal.
  • the information of the barcode further includes a recognition result of the barcode.
  • the logistics package image processing device may further include: a character fusion module, configured to: after the package leaves the field of view, according to the number of characters in the recognition result of the same barcode, all captured images The recognition result of the bar code is classified; the class containing the largest number of class members is selected from the classification results; in the selected class, the recognition result of the same bar code is analyzed bit by bit, and the frequency appears in the same bit The highest character is used as the recognition result of the bit to obtain the final recognition result of the barcode.
  • the character recognition technology can accurately determine the final recognition result of the same barcode, so that the recognition result is more accurate.
  • the logistics package image processing device may further include: a superimposing module, configured to superimpose the final recognition result of the barcode on the most filtered Good picture.
  • the first identification module may be specifically configured to identify the barcode in the Nth image, and obtain information of multiple barcodes. And adding information of each bar code to different queues respectively; wherein the information of each bar code includes the relative position of the bar code relative to the Nth picture.
  • the matching module may be specifically configured to determine, for each bar code in the (N+1)th picture, a center point of a relative position of the bar code relative to the N+1th picture and the bar code is at the N+th 1 grab Whether the distance difference between the center points of the predicted positions in the map satisfies a predetermined threshold requirement, and if the predetermined threshold requirement is met, determining the relative position of the barcode relative to the (N+1)th picture, and the barcode is at the Nth.
  • the predicted positions in the +1 snapshot images are matched, and the information of each barcode matching the relative position and the predicted position in the (N+1)th picture is respectively added to different queues.
  • the screening module may be specifically configured to: after the parcel leaves the field of view, obtain a relative position of each bar code in the picture relative to the picture from the plurality of queues for each captured picture, and calculate the a common center of a plurality of barcodes in the picture; in each captured picture, select a common center of the plurality of barcodes to be the closest picture to the center of the corresponding picture as the best picture; or select multiple in each captured picture
  • the public picture of the barcode is the closest picture to the center of the preset area as the best picture.
  • the best image can be selected from all the images captured by the package.
  • the embodiment of the present application further provides a logistics package image processing system, comprising: a conveyor belt and the logistics package image processing device according to any of the preceding embodiments; wherein the conveyor belt is used for conveying the package; Processing means for taking a picture and processing the taken picture when the package placed on the conveyor enters the field of view.
  • the logistics package image processing system provided by the embodiment of the present application can be used to implement the technical solution of the method embodiment shown in FIG. 1 or FIG. 6.
  • the implementation principle and the technical effect are similar, and details are not described herein again.
  • the embodiment of the present application further provides an electronic device, which is suitable for processing a logistics package image, and the electronic device includes:
  • the circuit board is disposed inside the space enclosed by the housing, the processor and the memory are disposed on the circuit board; and the power supply circuit is used for each circuit of the electronic device or The device is powered;
  • the memory is for storing executable program code;
  • the processor runs the program corresponding to the executable program code by reading the executable program code stored in the memory for performing the following steps:
  • N is a natural number
  • Identifying the barcode in the Nth picture acquiring the information of the barcode, and adding the information of the barcode to the queue; wherein the information of the barcode includes the barcode relative to the Nth The relative position of the picture;
  • the information of the bar code in the (N+1)th picture includes the Nth a relative position of the barcode in the +1 picture with respect to the (N+1)th picture;
  • the best image is selected from all the pictures captured by the package. image.
  • the solution provided by this embodiment can select the best picture from all the pictures captured by the package by identifying and tracking the barcode.
  • the electronic device in the above embodiments may exist in various forms including, but not limited to:
  • Mobile communication devices These devices are characterized by mobile communication functions and are mainly aimed at providing voice and data communication.
  • Such terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.
  • Ultra-mobile personal computer equipment This type of equipment belongs to the category of personal computers, has computing and processing functions, and generally has mobile Internet access.
  • Such terminals include: PDAs, MIDs, and UMPC devices, such as the iPad.
  • Portable entertainment devices These devices can display and play multimedia content. Such devices include: audio, video players (such as iPod), handheld game consoles, e-books, and smart toys and portable car navigation devices.
  • the server consists of a processor, a hard disk, a memory, a system bus, etc.
  • the server is similar to a general-purpose computer architecture, but because of the need to provide highly reliable services, processing power and stability High reliability in terms of reliability, security, scalability, and manageability.
  • the embodiment of the present application provides an application program, which is used to execute the logistics package image processing method provided by the embodiment of the present application at runtime.
  • the method includes:
  • N is a natural number
  • Identifying the barcode in the Nth picture acquiring the information of the barcode, and adding the information of the barcode to the queue; wherein the information of the barcode includes the barcode relative to the Nth The relative position of the picture;
  • the information of the bar code in the (N+1)th picture includes the Nth a relative position of the barcode in the +1 picture with respect to the (N+1)th picture;
  • the best image is selected from all the pictures captured by the package. image.
  • the solution provided by this embodiment can select the best picture from all the pictures captured by the package by identifying and tracking the barcode.
  • the embodiment of the present application further provides a storage medium for storing executable code, which is used to execute the logistics package image processing method provided by the embodiment of the present application.
  • this method include:
  • N is a natural number
  • Identifying the barcode in the Nth picture acquiring the information of the barcode, and adding the information of the barcode to the queue; wherein the information of the barcode includes the barcode relative to the Nth The relative position of the picture;
  • the information of the bar code in the (N+1)th picture includes the Nth a relative position of the barcode in the +1 picture with respect to the (N+1)th picture;
  • the best image is selected from all the pictures captured by the package. image.
  • the solution provided by this embodiment can select the best picture from all the pictures captured by the package by identifying and tracking the barcode.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Health & Medical Sciences (AREA)
  • Business, Economics & Management (AREA)
  • Quality & Reliability (AREA)
  • Economics (AREA)
  • Software Systems (AREA)
  • Operations Research (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Development Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Tourism & Hospitality (AREA)
  • Strategic Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Multimedia (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本申请实施例公开一种物流包裹图片处理方法、装置及系统,能够获取到条码处于合适位置的抓拍图片。所述方法包括:对抓拍的第N张图片中的条码进行识别,获取条码相对于第N张图片的相对位置并加入到队列中;预测所述条码在第N+1张抓拍图中的位置;对抓拍的第N+1张图片中的条码进行识别,获取所述条码相对于所述第N+1张图片的相对位置;判断所述条码相对于第N+1张图片的相对位置,与预测的位置是否匹配;若匹配,则将第N+1张图片中的条码的信息加入到所述队列中;在包裹离开所述视场后,根据预先设置的条码相对于图片的最佳相对位置以及加入到所述队列中的所述条码的信息,从对所述包裹抓拍的所有图片中筛选出最佳图片。本申请适用于物流包裹信息采集。

Description

一种物流包裹图片处理方法、装置及系统
本申请要求于2016年08月01日提交中国专利局、申请号为201610615067.5、发明名称为“一种物流包裹图片处理方法、装置及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及物流图片处理技术领域,尤其涉及一种物流包裹图片处理方法、装置及系统。
背景技术
物流包裹信息的采集通常是通过对物流包裹表面的条码进行识别获得的。条码的类型可以是一维码(又称条形码),也可以是二维码(又称二维条码)。其中,条形码是将宽度不等的多个黑条和空白,按照一定的编码规则排列,用以表达一组信息的图形标识符。常见的条形码是由反射率相差很大的黑条(简称条)和白条(简称空)排成的平行线图案。二维码是用某种特定几何图形按一定规律在平面(二维方向上)分布的黑白相间图形,它能够把文字、图像、音频、视频等的相关信息“编码”成一个图像。当用特定软件拍摄这些图像时,这些信息就会显示出来。
相关技术中对物流包裹表面的条码进行识别的过程通常是利用条码扫描器直接对条码进行扫描和识别,或者是先利用相机抓拍包裹表面的图片,从抓拍图片中识别出条码区域,然后再对该条码区域内的条码进行识别。
在实现本申请的过程中,申请人发现相关的物流包裹图片处理方法仅能获得条码的识别结果,而无法获得条码处于合适位置的抓拍图片。而获得条码处于合适位置的抓拍图片在保存物流包裹信息、提供物流证据等方面有很大应用。
发明内容
有鉴于此,本申请实施例提供一种物流包裹图片处理方法、装置及系统,以解决相关的物流包裹图片处理中无法获得条码处于合适位置的抓拍图片的 问题。
第一方面,本申请实施例提供一种物流包裹图片处理方法,包括:
对在视场中移动的包裹抓拍第N张图片;其中,N为自然数;
对所述第N张图片中的条码进行识别,获取所述条码的信息,并将所述条码的信息加入到队列中;其中,所述条码的信息包括所述条码相对于所述第N张图片的相对位置;
预测所述第N张图片中的条码在第N+1张抓拍图中的位置;
对所述包裹抓拍第N+1张图片;
对所述第N+1张图片中的条码进行识别,获取所述第N+1张图片中的条码的信息;其中,所述第N+1张图片中的条码的信息包括所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置;
判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与预测的位置是否相匹配;
若相匹配,则将所述第N+1张图片中的条码的信息加入到所述队列中;
在所述包裹离开所述视场后,根据预先设置的条码相对于图片的最佳相对位置以及加入到所述队列中的所述条码的信息,从对所述包裹抓拍的所有图片中筛选出最佳图片。
结合第一方面,在第一方面的第一种实施方式中,任一图片中的一个条码相对于该图片的相对位置,包括:该条码的外接多边形顶点在该图片中的相对位置。
结合第一方面,在第一方面的第二种实施方式中,所述判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与预测的位置是否相匹配,包括:判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置的中心点与预测的位置的中心点之间的距离差是否满足预定的阈值要求,若满足预定的阈值要求,则确定所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与预测的位置相匹配。
结合第一方面或第一方面的第一种实施方式,在第一方面的第三种实施方式中,所述在所述包裹离开所述视场后,根据预先设置的条码相对于图片的最佳相对位置以及加入到所述队列中的所述条码的信息,从对所述包裹抓拍的所有图片中筛选出最佳图片,包括:在所述包裹离开所述视场后,根据获得的条码在对应图片中的相对位置,分别计算各抓拍的图片中条码的中心;在各抓拍的图片中,选择条码的中心距离对应图片的中心最近的图片,作为所述最佳图片;或者在各抓拍的图片中,选择条码的中心距离预设区域中心最近的图片,作为所述最佳图片。
结合第一方面的第三种实施方式,在第一方面的第四种实施方式中,所述的物流包裹图片处理方法,还包括:将筛选出的所述最佳图片输出。
结合第一方面至第一方面的第四种实施方式中的任一种实施方式,在第一方面的第五种实施方式中,所述条码的信息还包括所述条码的识别结果;
所述处理方法,还包括:
在所述包裹离开所述视场后,根据所述条码的识别结果中的字符数的多少,对所有抓拍的图片中条码的识别结果进行分类;
从分类结果中挑选出包含类成员数量最多的一类;
在挑选出的所述类中,对所述条码的识别结果进行逐位分析,将在同一位当中出现频率最高的字符作为该位的识别结果,以得到所述条码的最终识别结果。
结合第一方面的第五种实施方式,在第一方面的第六种实施方式中,所述的物流包裹图片处理方法,还包括:将所述条码的最终识别结果叠加在筛选出的最佳图片中。
结合第一方面,在第一方面的第七种实施方式中,若所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与预测的位置不相匹配,则将所述第N+1张图片中的条码的信息加入到另一队列中。
结合第一方面,在第一方面的第八种实施方式中,所述对所述第N张图 片中的条码进行识别,获取所述条码的信息,并将所述条码的信息加入到队列中,包括:对所述第N张图片中的条码进行识别,获取多个条码的信息,并将每个条码的信息分别加入到不同的队列中;其中,每个条码的信息包括该条码相对于所述第N张图片的相对位置。
结合第一方面的第八种实施方式,在第一方面的第九种实施方式中,判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与预测的位置是否相匹配;若相匹配,则将所述第N+1张图片中的条码的信息加入到所述队列中,包括:
针对所述第N+1张图片中的每个条码,判断该条码相对于所述第N+1张图片的相对位置的中心点与该条码在第N+1张抓拍图中的预测位置的中心点之间的距离差是否满足预定阈值要求,若满足预定阈值要求,则确定该条码相对于所述第N+1张图片的相对位置,与该条码在第N+1张抓拍图中的预测位置相匹配,将所述第N+1张图片中的相对位置和预测位置相匹配的每个条码的信息分别加入不同的队列。
结合第一方面的第八种实施方式,在第一方面的第十种实施方式中,所述在所述包裹离开所述视场后,根据预先设置的条码相对于图片的最佳相对位置以及加入到所述队列中的条码的信息,从对所述包裹抓拍的所有图片中筛选出最佳图片,包括:
在所述包裹离开所述视场后,针对各抓拍的图片,从多个队列中分别获取该图片中每个条码相对于该图片的相对位置,并计算该图片中多个条码的公共中心;
在各抓拍的图片中,选择多个条码的公共中心距离对应图片的中心最近的图片,作为所述最佳图片;或者
在各抓拍的图片中,选择多个条码的公共中心距离预设区域中心最近的图片,作为所述最佳图片。
第二方面,本申请实施例提供一种物流包裹图片处理装置,包括:
第一拍照模块,用于对在视场中移动的包裹抓拍第N张图片;其中,N为自然数;
第一识别模块,用于对所述第N张图片中的条码进行识别,获取所述条码的信息,并将所述条码的信息加入到队列中;其中,所述条码的信息包括所述条码相对于所述第N张图片的相对位置;
预测模块,用于预测所述第N张图片中的条码在第N+1张抓拍图中的位置;
第二拍照模块,用于对所述包裹抓拍第N+1张图片;
第二识别模块,用于对所述第N+1张图片中的条码进行识别,获取所述第N+1张图片中的条码的信息;其中,所述第N+1张图片中的条码的信息包括所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置;
匹配模块,用于判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与预测的位置是否相匹配;若相匹配,则将所述第N+1张图片中的条码的信息加入到所述队列中;
筛选模块,用于在所述包裹离开所述视场后,根据预先设置的条码相对于图片的最佳相对位置以及加入到所述队列中的条码的信息,从对所述包裹抓拍的所有图片中筛选出最佳图片。
结合第二方面,在第二方面的第一种实施方式中,任一图片中的一个条码相对于该图片的相对位置,包括:该条码的外接多边形顶点在该图片中的相对位置。
结合第二方面,在第二方面的第二种实施方式中,所述匹配模块,包括:
第一确定子模块,用于确定所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置的中心点,以及确定预测的位置的中心点;
判断子模块,用于判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置的中心点与预测的位置的中心点之间的距离差是否满足预定的阈值要求;若满足预定的阈值要求,则确定所述第N+1张图片中的条码相 对于所述第N+1张图片的相对位置,与预测的位置相匹配。
结合第二方面或第二方面的第一种实施方式,在第二方面的第三种实施方式中,所筛选模块,包括:
第二确定子模块,用于在所述包裹离开所述视场后,根据获得的条码在对应图片中的相对位置,分别计算各抓拍的图片中条码的中心;
筛选子模块,用于在各抓拍的图片中,选择条码的中心距离对应图片的中心最近的图片,作为所述最佳图片;或者用于在各抓拍的图片中,选择条码的中心距离预设区域中心最近的图片,作为所述最佳图片。
结合第二方面,在第二方面的第四种实施方式中,所述的物流包裹图片处理装置,还包括:图片输出模块,用于将所述筛选模块筛选出的所述最佳图片输出。
结合第二方面至第二方面的第四种实施方式中的任一种实施方式,在第二方面的第五种实施方式中,所述条码的信息还包括所述条码的识别结果;
所述处理装置,还包括:
字符融合模块,用于在所述包裹离开所述视场后,根据同一条码的识别结果中的字符数的多少,对所有抓拍的图片中条码的识别结果进行分类;从分类结果中挑选出包含类成员数量最多的一类;在挑选出的所述类中,对该同一条码的识别结果进行逐位分析,将在同一位当中出现频率最高的字符作为该位的识别结果,以得到同一条码的最终识别结果。
结合第二方面的第五种实施方式,在第二方面的第六种实施方式中,所述的物流包裹图片处理装置,还包括:叠加模块,用于将所述条码的最终识别结果叠加在筛选出的最佳图片中。
结合第二方面,在第二方面的第七种实施方式中,所述匹配模块,还用于若所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与预测的位置不相匹配,则将所述第N+1张图片中的条码的信息加入到另一队列中。
结合第二方面,在第二方面的第八种实施方式中,所述第一识别模块,具体用于对所述第N张图片中的条码进行识别,获取多个条码的信息,并将每个条码的信息分别加入到不同的队列中;其中,每个条码的信息包括该条码相对于所述第N张图片的相对位置。
结合第二方面的第八种实施方式,在第二方面的第九种实施方式中,所述匹配模块,具体用于针对所述第N+1张图片中的每个条码,判断该条码相对于所述第N+1张图片的相对位置的中心点与该条码在第N+1张抓拍图中的预测位置的中心点之间的距离差是否满足预定阈值要求,若满足预定阈值要求,则确定该条码相对于所述第N+1张图片的相对位置,与该条码在第N+1张抓拍图中的预测位置相匹配,将所述第N+1张图片中的相对位置和预测位置相匹配的每个条码的信息分别加入不同的队列。
结合第二方面的第八种实施方式,在第二方面的第十种实施方式中,所述筛选模块,具体用于在所述包裹离开所述视场后,针对各抓拍的图片,从多个队列中分别获取该图片中每个条码相对于该图片的相对位置,并计算该图片中多个条码的公共中心;在各抓拍的图片中,选择多个条码的公共中心距离对应图片的中心最近的图片,作为所述最佳图片;或者在各抓拍的图片中,选择多个条码的公共中心距离预设区域中心最近的图片,作为所述最佳图片。
第三方面,本申请实施例提供一种物流包裹图片处理系统,包括:传送带和如前述任一实施方式所述的物流包裹图片处理装置;其中,
所述传送带用于对包裹进行传送;
所述物流包裹图片处理装置,用于在放置在所述传送带上的包裹进入视场时,对其进行拍照和对所拍的图片进行处理。
第四方面,本申请实施例提供一种电子设备,适用于物流包裹图片处理,所述电子设备包括:
壳体、处理器、存储器、电路板和电源电路,其中,电路板安置在壳体 围成的空间内部,处理器和存储器设置在电路板上;电源电路,用于为电子设备的各个电路或器件供电;存储器用于存储可执行程序代码;处理器通过读取存储器中存储的可执行程序代码来运行与可执行程序代码对应的程序,以用于执行以下步骤:
对在视场中移动的包裹抓拍第N张图片;其中,N为自然数;
对所述第N张图片中的条码进行识别,获取所述条码的信息,并将所述条码的信息加入到队列中;其中,所述条码的信息包括所述条码相对于所述第N张图片的相对位置;
预测所述第N张图片中的条码在第N+1张抓拍图中的位置;
对所述包裹抓拍第N+1张图片;
对所述第N+1张图片中的条码进行识别,获取所述第N+1张图片中的条码的信息;其中,所述第N+1张图片中的条码的信息包括所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置;
判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与预测的位置是否相匹配;
若相匹配,则将所述第N+1张图片中的条码的信息加入到所述队列中;
在所述包裹离开所述视场后,根据预先设置的条码相对于图片的最佳相对位置以及加入到所述队列中的条码的信息,从对所述包裹抓拍的所有图片中筛选出最佳图片。
第五方面,本申请实施例提供一种应用程序,所述应用程序用于在运行时执行本申请实施例提供的物流包裹图片处理方法。该方法包括:
对在视场中移动的包裹抓拍第N张图片;其中,N为自然数;
对所述第N张图片中的条码进行识别,获取所述条码的信息,并将所述条码的信息加入到队列中;其中,所述条码的信息包括所述条码相对于所述第N张图片的相对位置;
预测所述第N张图片中的条码在第N+1张抓拍图中的位置;
对所述包裹抓拍第N+1张图片;
对所述第N+1张图片中的条码进行识别,获取所述第N+1张图片中的条码的信息;其中,所述第N+1张图片中的条码的信息包括所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置;
判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与预测的位置是否相匹配;
若相匹配,则将所述第N+1张图片中的条码的信息加入到所述队列中;
在所述包裹离开所述视场后,根据预先设置的条码相对于图片的最佳相对位置以及加入到所述队列中的条码的信息,从对所述包裹抓拍的所有图片中筛选出最佳图片。
第六方面,本申请实施例提供一种存储介质,用于存储可执行代码,所述可执行代码在运行时用于执行本申请实施例提供的物流包裹图片处理方法。该方法包括:
对在视场中移动的包裹抓拍第N张图片;其中,N为自然数;
对所述第N张图片中的条码进行识别,获取所述条码的信息,并将所述条码的信息加入到队列中;其中,所述条码的信息包括所述条码相对于所述第N张图片的相对位置;
预测所述第N张图片中的条码在第N+1张抓拍图中的位置;
对所述包裹抓拍第N+1张图片;
对所述第N+1张图片中的条码进行识别,获取所述第N+1张图片中的条码的信息;其中,所述第N+1张图片中的条码的信息包括所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置;
判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与预测的位置是否相匹配;
若相匹配,则将所述第N+1张图片中的条码的信息加入到所述队列中;
在所述包裹离开所述视场后,根据预先设置的条码相对于图片的最佳相 对位置以及加入到所述队列中的条码的信息,从对所述包裹抓拍的所有图片中筛选出最佳图片。
本申请实施例提供的一种物流包裹图片处理方法、装置及系统,通过对在视场中移动的包裹抓拍第N张图片,对所述第N张图片中的条码进行识别,获取包括所述条码相对于所述第N张图片的相对位置的信息;预测所述第N张图片中的条码在第N+1张抓拍图中的位置,对抓拍的第N+1张图片中的条码进行识别,获取所述条码相对于所述第N+1张图片的相对位置;判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与预测的位置是否相匹配,若相匹配,则将所述第N+1张图片中的条码的信息加入到所述队列中;在所述包裹离开所述视场后,根据预先设置的条码相对于图片的最佳相对位置以及加入到所述队列中的所述条码的信息,从对所述包裹抓拍的所有图片中筛选出最佳图片,这样通过上述步骤对条码进行识别及跟踪匹配,能够从对所述包裹抓拍的所有图片中筛选出最佳图片。
附图说明
为了更清楚地说明本申请实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为本申请物流包裹图片处理方法实施例一的流程示意图;
图2为本实施例中获得的包裹从进入视场到离开视场的一个图片序列的示意图;
图3为本申请物流包裹图片处理方法实施例一中图片的中心和用户在图片中所设定区域的示意图;
图4为本申请物流包裹图片处理方法实施例一中字符融合的流程示意图;
图5所示为本申请物流包裹图片处理方法实施例一中字符融合的结构示意图;
图6为本申请物流包裹图片处理方法实施例二的流程示意图;
图7为本申请物流包裹图片处理装置实施例一的结构示意图。
具体实施方式
下面结合附图对本申请实施例进行详细描述。
应当明确,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。
图1为本申请物流包裹图片处理方法实施例一的流程示意图,本实施例适用于包裹在传送带上传输过程中对所述包裹信息的采集。如图1所示,本实施例的方法可以包括:
步骤101、对在视场中移动的包裹抓拍第N张图片。
本实施例中,所述N为自然数。
所述包裹可以是包装盒或包装袋等物品,在所述包裹的表面设有条码,所述条码的数量可以是一个或多个,所述条码的类型可以是一维码(又称条形码),也可以是二维码。本实施例中以所述条码的数量为一个为例进行说明。
当移动的包裹,如在传送带上的包裹,逐渐移动进入图片拍摄设备如相机的视场内时,图片拍摄设备则以预定的拍摄周期,如每隔0.3秒或0.5秒等,对视场中移动的包裹进行图片的抓拍,可获得所述包裹从进入视场到离开视场的一个图片序列,图2为本实施例中获得的包裹从进入视场到离开视场的一个图片序列的示意图。
本实施例中,可根据激光触发信号获取包裹进入视场的信号。
步骤102、对所述第N张图片中的条码进行识别,获取所述条码的信息,并将所述条码的信息加入到队列中。
其中,所述条码的信息包括所述条码相对于所述第N张图片的相对位置。作为一可选实施方式,所述条码的信息中包括的所述相对位置,为所述条码的外接多边形顶点如外接矩形的顶点在图片中的相对位置。
本实施例中,可实时调用条码识别算法获取当前抓拍图片中的条码的识别信息,获取所述条码相对于所述第N张图片的相对位置。
本实施例中,当首次获得条码的信息时,可建立初始队列,并将首次获得的条码信息加入到该初始队列中。当新的图片及条码在该新的图片中的相对位置的结果信息出现时,首先与上一条码的预测位置进行匹配,当两者位置吻合度满足阈值要求,则认为新图片的条码与上一条码为同一条码,将新图片的条码的信息添加到上一条码对应的队列中。其中,上一条码的预测位置可根据步骤103所述的方法来实现。
步骤103、预测所述第N张图片中的条码在第N+1张抓拍图中的位置。
由于无法100%保证所有的条码每次都能被准确地识别出来,因此,可采用跟踪算法去预测该条码在当前图片中的位置,并利用该预测位置评估该条码在X,Y方向的移动速度,并预测其下次出现的大致位置。
本实施例中可利用的跟踪算法,包括但不限于卡尔曼滤波(Kalman Filter)、粒子滤波(PF:Particle Filter)等,实时预测所述第N张图片中的条码在第N+1张抓拍图中的位置。
本实施例中,也可根据所述条码在第N张图片中的相对位置,包裹的移动速度以及相机的抓拍周期来预测所述条码在第N+1张抓拍图中的位置。
步骤104、对所述包裹抓拍第N+1张图片。
本实施例中,在对所述包裹抓拍第N张图片后,在下一个抓拍周期到来时,对所述包裹抓拍第N+1张图片。
步骤105、对所述第N+1张图片中的条码进行识别,获取所述第N+1张图片中的条码的信息。
其中,所述第N+1张图片中的条码的信息包括所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置。作为一可选实施方式,所述条码的信息中包括的所述相对位置,为所述条码的外接多边形顶点如外接矩形的顶点在图片中的相对位置。
本实施例中,可实时调用条码识别算法获取当前抓拍图片中的条码的识别信息,获取所述条码相对于所述第N+1张图片的相对位置。
步骤106、判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与所述预测的位置是否相匹配。
本实施例中,可通过判断条码的边缘是否吻合,来判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与所述预测的位置是否相匹配。
作为一可选实施方式,可通过判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置的中心点与所述预测的位置的中心点之间的距离差是否满足预定的阈值要求,来判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与所述预测的位置是否相匹配。经过判断,若所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置的中心点与所述预测的位置的中心点之间的距离差满足预定的阈值要求,则可确定所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与所述预测的位置相匹配。
本实施例中,若所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与所述条码在第N+1张抓拍图中的预测位置相匹配,则执行步骤107。
步骤107、将所述第N+1张图片中的条码的信息加入到所述队列中。
本实施例中,若所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与所述预测的位置相匹配,则可确定所述第N+1张图片中的条码,与所述第N张图片中的所述条码是同一条码,因此将该同一条码的信息加入到同一队列中。若所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与所述预测的位置不相匹配,则将所述第N+1张图片中的条码的信息加入到另一队列中。例如,将不匹配的第N+1张图片的条码的信息加入新建的队列中。
步骤108、从对所述包裹抓拍的所有图片中筛选出最佳图片。
本实施例中,在所述包裹离开所述视场后,根据预先设置的条码相对于图片的最佳相对位置以及加入到所述队列中的所述条码的信息,从对所述包裹抓拍的所有图片中筛选出最佳图片。本实施例中,可根据激光触发信号获取包裹离开视场的信号。
本实施例中,作为一可选实施方式,在所述包裹离开所述视场后,可先根据加入到所述队列中的条码在对应图片中的相对位置,分别计算各抓拍的图片中条码的中心,可表示为center={center1,center2,....centern-1,centern};然后在各抓拍的图片中,选择条码的中心距离对应图片的中心最近的图片,作为所述最佳图片、或者在各抓拍的图片中,选择条码的中心距离预设区域中心最近的图片,作为所述最佳图片。
其中,预设区域可以为用户在对应图片中设置的区域。
图3所示为图片的中心和用户在图片中预设区域的示意图。
本申请实施例提供的物流包裹图片处理方法,通过上述步骤对条码进行识别及跟踪匹配,能够从对所述包裹抓拍的所有图片中筛选出最佳图片。
需要说明的是,本实施例中筛选出的最佳图片,可以作为物流证据保存起来,当出现丢件或损件等情况时,可以通过查找这种图片的物流证据来确定出现上述情况的环节。最佳图片也可以作为物流包裹信息存储起来,供用户查询,这样用户可以更直观地看到包裹的情况,使物流过程可视性更强。进一步的,图片中的条码均处于合适位置,能够使图片信息更统一,后期管理更方便,用户查看包裹信息时体验更好。
在前述物流包裹图片处理方法实施例一的基础上,作为一可选实施例,所述物流包裹图片处理方法,还可包括步骤:将筛选出的所述最佳图片输出。本实施例中,可将筛选出的所述最佳图片输出到数据库中,比如输出到个人计算机或手持终端的数据库中。
在前述物流包裹图片处理方法实施例一的基础上,作为另一可选实施例, 所述条码的信息还包括所述条码的识别结果;所述处理方法,还包括对所述条码的识别结果进行字符融合的步骤。
本实施例中,对于所述条码而言,假设该条码跟踪数为M,由于外界干扰等因素的影响,无法保障该M次的识别结果一模一样,因此就需要进行字符融合,输出最佳的识别结果。
图4为本申请物流包裹图片处理方法实施例中字符融合的流程示意图。参看图4,具体来讲,本实施例中,对所述条码的识别结果进行字符融合的步骤包括:
S11、对识别结果进行分类。
本实施例中,在所述包裹离开所述视场后,根据同一条码的识别结果中的字符数的多少,对所有抓拍的图片中同一条码的识别结果进行分类。比如,将所有抓拍的图片中同一条码的M个识别结果分为N类。
其中,类中包含类成员(即条码的识别结果)。同一类中的每个类成员包含相同的字符数。不同类中包含的类成员的数量不同。
本实施例中,若所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与所述预测的位置相匹配,则可确定所述第N+1张图片中的条码,与所述第N张图片中的条码是同一条码,因此将该同一条码的信息加入到同一队列中;若所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与所述预测的位置不相匹配,则可确定所述第N+1张图片中的条码,与所述第N张图片中的条码不是同一条码,因此将该不同的条码的信息分别加入到另一队列中。
S12、从分类结果中挑选出包含类成员数量最多的一类。
图5所示为本实施例中字符融合的结构示意图。图5中,前6行字符串为从分类结果中挑选出的包含类成员数量(6个)最多的一类,最后一行为字符融合后的最终识别结果。
S13、对识别结果进行逐位分析,得到所述条码的最终识别结果。
本实施例中,在挑选出的所述类中,对所述条码的识别结果进行逐位分析,将在同一位当中出现频率最高的字符作为该位的识别结果,以得到所述条码的最终识别结果。作为一具体实施例,得到所述条码的最终识别结果,可参见图5中的最后一行字符串。
上述对所述条码的识别结果进行字符融合的步骤,可以在对最佳图片进行筛选之前进行,也可在其之后进行。
通过上述步骤,能够准确地确定出所述条码的最终识别结果,使识别结果更加精确。
可选地,可将所述条码的最终识别结果进行输出。
作为一可选实施方式,可将所述条码的最终识别结果叠加在筛选出的最佳图片中。
例如,将条码的最终识别结果加在最佳图片的空白位置上,或,用条码的最终识别结果覆盖在最佳图片的对应条码上,或,将条码的最终识别结果加在最佳图片的对应条码的下方等。
图6为本申请物流包裹图片处理方法实施例二的流程示意图,本实施例适用于包裹在传送带上传输过程中对所述包裹信息的采集。如图6所示,本实施例的方法可以包括:
步骤201、对在视场中移动的包裹抓拍第N张图片。
本实施例中,N为自然数。
所述包裹可以是包装盒或包装袋等物品,在所述包裹的表面设有条码,所述条码的数量可以是一个或多个,所述条码的类型可以是一维码(又称条形码),也可以是二维码。本实施例中以所述条码的数量为多个为例进行说明。
当移动的包裹,如在传送带上的包裹,逐渐移动进入图片拍摄设备如相机的视场内时,图片拍摄设备则以预定的拍摄周期,如每隔0.3秒或0.5秒等,对视场中移动的包裹进行图片的抓拍,可获得所述包裹从进入视场到离开视场的一个图片序列。本实施例中,可根据激光触发信号获取包裹进入视场的 信号。
步骤202、对所述第N张图片中的条码进行识别,获取多个条码的信息,并将每个条码的信息分别加入到不同的队列中;其中,每个条码的信息包括该条码相对于所述第N张图片的相对位置。
比如,本实施例中,当第N张图片中包含2个条码时,可对所述第N张图片中的条码进行识别,获取第一条码的信息和第二条码的信息,并将所述第一条码的信息加入到第一队列中,将所述第二条码的信息加入到第二队列中。
其中,所述第一条码的信息包括所述第一条码相对于所述第N张图片的相对位置,所述第二条码的信息包括所述第二条码相对于所述第N张图片的相对位置。
当然,第N张图片中可以包含3个、4个或更多个条码,本实施例对此不做具体限定。在下面的描述中,以第N张图片中包含2个条码为例进行说明。
作为一可选实施方式,任一图片中的一个条码相对于该图片的相对位置,包括:该条码的外接多边形顶点如外接矩形的顶点在该图片中的相对位置。
本实施例中,可实时调用条码识别算法获取当前抓拍图片中的条码的识别信息,获取所述第一条码和第二条码分别相对于所述第N张图片的相对位置。
本实施例中,当首次获得条码的信息时,可建立初始队列,并将首次获得的条码信息加入到该初始队列中。当新的图片及条码在该新的图片中的相对位置的结果信息出现时,首先与上一条码的预测位置进行匹配,当两者位置吻合度满足阈值要求,则认为新图片的条码与上一条码为同一条码,将新图片的条码的信息添加到所述队列中。当两者位置吻合度不满足阈值要求,则认为新图片的条码为另一条码,则将新图片的条码的信息添加到另一队列中。其中,上一条码的预测位置可根据步骤203所述的方法来实现。
步骤203、预测所述第N张图片中的多个条码在第N+1张抓拍图中的位置。
在一张图片中有多个条码时,可以每个条码对应一个预测位置。
由于无法100%保证所有的条码每次都能被准确地识别出来,因此,可采用跟踪算法去预测一条码在当前图片中的位置,并利用该预测位置评估该条码在X,Y方向的移动速度,并预测其下次出现的大致位置。
本实施例中可利用的跟踪算法,包括但不限于卡尔曼滤波(Kalman Filter)、粒子滤波(PF:Particle Filter)等,实时预测所述第N张图片中的条码在第N+1张抓拍图中的位置。
本实施例中,也可根据所述条码在第N张图片中的相对位置,包裹的移动速度以及相机的抓拍周期来预测所述条码在第N+1张抓拍图中的位置。
步骤204、对所述包裹抓拍第N+1张图片。
本实施例中,在对所述包裹抓拍第N张图片后,在下一个抓拍周期到来时,对所述包裹抓拍第N+1张图片。
步骤205、对所述第N+1张图片中的多个条码进行识别,获取所述第N+1张图片中的多个条码的信息。
其中,所述第N+1张图片中的第一条码的信息包括所述第N+1张图片中的第一条码相对于所述第N+1张图片的相对位置,所述第N+1张图片中的第二条码的信息包括所述第二条码相对于所述第N+1张图片的相对位置。
作为一可选实施方式,所述第一条码的信息中包括的所述相对位置,为所述第一条码的外接多边形顶点如外接矩形的顶点在图片中的相对位置;所述第二条码的信息中包括的所述相对位置,为所述第二条码的外接多边形顶点如外接矩形的顶点在图片中的相对位置。
步骤206、针对所述第N+1张图片中的每个条码,判断该条码相对于所述第N+1张图片的相对位置与该条码在第N+1张抓拍图中的预测位置是否相匹配。
本实施例中,针对所述第N+1张图片中的每个条码,判断该条码相对于所述第N+1张图片的相对位置的中心点与该条码在第N+1张抓拍图中的预测位置的中心点之间的距离差是否满足预定阈值要求,若满足预定阈值要求,则确定该条码相对于所述第N+1张图片的相对位置,与该条码在第N+1张抓拍图中的预测位置相匹配,将所述第N+1张图片中的相对位置和预测位置相匹配的每个条码的信息分别加入不同的队列。
本实施例中,针对所述第N+1张图片中的每个条码,判断该条码相对于所述第N+1张图片的相对位置与该条码在第N+1张抓拍图中的预测位置是否相匹配的过程和方法,与上述方法实施例中的步骤106相似,在此不再赘述。
本实施例中,针对所述第N+1张图片中的每个条码,判断该条码相对于所述第N+1张图片的相对位置与该条码在第N+1张抓拍图中的预测位置是否相匹配,若相匹配,则执行步骤207。
步骤207、将所述第N+1张图片中的相对位置和预测位置相匹配的每个条码的信息分别加入不同的队列。
比如,经过上述步骤206的判断,若所述第N+1张图片中的第一条码相对于所述第N+1张图片的相对位置,与所述第一条码在第N+1张抓拍图中的预测位置相匹配,则将所述第N+1张图片中的第一条码的信息加入到所述第一队列中;若所述第N+1张图片中的第二条码相对于所述第N+1张图片的相对位置,与所述第二条码在第N+1张抓拍图中的预测位置相匹配,则将所述第N+1张图片中的第二条码的信息加入到所述第二队列中。
步骤208、从对所述包裹抓拍的所有图片中筛选出最佳图片。
本实施例中,在所述包裹离开所述视场后,根据预先设置的条码相对于图片的最佳相对位置以及加入到各队列中的条码的信息,从对所述包裹抓拍的所有图片中筛选出最佳图片。本实施例中,可根据激光触发信号获取包裹离开视场的信号。
本实施例中,作为一可选实施方式,在所述包裹离开所述视场后,根据 加入到第一队列中的第一条码的信息和加入到第二队列中的第二条码的信息,分别计算各抓拍的图片中第一条码和第二条码的公共中心;在各抓拍的图片中,选择第一条码和第二条码的公共中心距离对应图片的中心最近的图片,作为所述最佳图片;或者在各抓拍的图片中,选择第一条码和第二条码的公共中心距离预设区域的中心最近的图片,作为所述最佳图片。
本申请实施例提供的物流包裹图片处理方法,通过上述步骤对抓拍图片中的多个条码分别进行识别及跟踪匹配,能够从对所述包裹抓拍的所有图片中筛选出最佳图片。
在前述物流包裹图片处理方法实施例二的基础上,作为一可选实施例,所述物流包裹图片处理方法,还可包括步骤:将筛选出的所述最佳图片输出。本实施例中,可将筛选出的所述最佳图片输出到数据库中,比如输出到个人计算机或手持终端的数据库中。
在前述物流包裹图片处理方法实施例二的基础上,作为另一可选实施例,所述条码的信息还包括所述条码的识别结果;所述处理方法,还包括对各个条码的识别结果分别进行字符融合的步骤。
本实施例中,对多个条码中的其中一个条码的识别结果进行字符融合的过程和步骤与上述方法实施例中图4所示的步骤相似,在此不再赘述。
在前述物流包裹图片处理方法实施例二的基础上,作为另一可选实施例,还可将所述多个条码的最终识别结果分别叠加在筛选出的最佳图片中。
例如,将第1条码的最终识别结果覆盖在最佳图片的第1条码上,将第2条码的最终识别结果覆盖在最佳图片的第2条码上,……将第m条码的最终识别结果覆盖在最佳图片的第m条码上,m为物流包裹上的条码个数。
或者,也可以将第1条码的最终识别结果加在最佳图片的第1条码下方,将第2条码的最终识别结果加在最佳图片的第2条码下方,……将第m条码的最终识别结果加在最佳图片的第m条码下方,m为物流包裹上的条码个数。
本实施例,通过上述步骤对抓拍图片中的多个条码分别进行识别及跟踪 匹配,能够从对所述包裹抓拍的所有图片中筛选出最佳图片。
图7为本申请物流包裹图片处理装置实施例一的流程示意图,本实施例适用于包裹在传送带上传输过程中对所述包裹信息的采集。如图7所示,本实施例的物流包裹图片处理装置可以包括:第一拍照模块11、第一识别模块12、预测模块13、第二拍照模块14、第二识别模块15、匹配模块16、筛选模块17;其中,
第一拍照模块11,用于对在视场中移动的包裹抓拍第N张图片;其中,N为自然数;
第一识别模块12,用于对所述第N张图片中的条码进行识别,获取所述条码的信息,并将所述条码的信息加入到队列中;其中,所述条码的信息包括所述条码相对于所述第N张图片的相对位置;
预测模块13,用于预测所述第N张图片中的条码在第N+1张抓拍图中的位置;
第二拍照模块14,用于对所述包裹抓拍第N+1张图片;
第二识别模块15,用于对所述第N+1张图片中的条码进行识别,获取所述第N+1张图片中的条码的信息;其中,所述第N+1张图片中的条码的信息包括所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置;
匹配模块16,用于判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与所述预测的位置是否相匹配;若相匹配,则将所述第N+1张图片中的条码的信息加入到所述队列中;
筛选模块17,用于在所述包裹离开所述视场后,根据预先设置的条码相对于图片的最佳相对位置以及加入到所述队列中的条码的信息,从对所述包裹抓拍的所有图片中筛选出最佳图片。
本实施例中,所述第一拍照模块11和第二拍照模块14,可以是同一个模块,也可以是两个不同的模块,优选为同一个模块。同理,所述第一识别模块12和第二识别模块15可以是同一个模块,也可以是两个不同的模块,优 选为同一个模块。
本实施例的装置,可以用于执行图1所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。
在所述的物流包裹图片处理装置实施例一中,可选地,任一图片中的一个条码相对于该图片的相对位置,包括:该条码的外接多边形顶点在该图片中的相对位置。
在所述的物流包裹图片处理装置实施例一中,可选地,所述匹配模块16,可以包括:
第一确定子模块,用于确定所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置的中心点,以及确定所述预测的位置的中心点;
判断子模块,用于判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置的中心点与所述预测的位置的中心点之间的距离差是否满足预定的阈值要求;若满足预定的阈值要求,则确定所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与所述预测的位置相匹配。
本实施例中,若所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与所述预测的位置相匹配,则可确定所述第N+1张图片中的条码,与所述第N张图片中的条码是同一条码,因此将该同一条码的信息加入到同一队列中;若所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与所述预测的位置不相匹配,则可确定所述第N+1张图片中的条码,与所述第N张图片中的条码不是同一条码,因此将该不同的条码的信息分别加入到另一队列中。
在所述的物流包裹图片处理装置实施例一中,可选地,筛选模块17,可以包括:第二确定子模块和筛选子模块;其中,
第二确定子模块,用于在所述包裹离开所述视场后,根据加入到所述队列中的条码的信息,分别计算各抓拍的图片中条码的中心;
筛选子模块,用于在各抓拍的图片中,选择条码的中心距离对应图片的 中心最近的图片,作为所述最佳图片;或者在各抓拍的图片中,选择条码的中心距离预设区域的中心最近的图片,作为所述最佳图片。
在所述的物流包裹图片处理装置实施例一中,可选地,所述的物流包裹图片处理装置,还可包括:图片输出模块,用于将所述筛选模块筛选出的所述最佳图片输出。本实施例中,可将筛选出的所述最佳图片输出到数据库中,比如输出到个人计算机或手持终端的数据库中。
在所述的物流包裹图片处理装置实施例一中,可选地,所述条码的信息还包括所述条码的识别结果。相应地,所述物流包裹图片处理装置,还可包括:字符融合模块,用于在所述包裹离开所述视场后,根据同一条码的识别结果中的字符数的多少,对所有抓拍的图片中条码的识别结果进行分类;从分类结果中挑选出包含类成员数量最多的一类;在挑选出的所述类中,对同一条码的识别结果进行逐位分析,将在同一位当中出现频率最高的字符作为该位的识别结果,以得到所述条码的最终识别结果。
本实施例中字符融合模块对条码的识别结果进行字符融合的方法和过程与上述方法实施例一中的类似,在此不再赘述。
本实施例,通过上述字符融合技术,能够准确地确定出同一条码的最终识别结果,使识别结果更加精确。
在所述的物流包裹图片处理装置实施例一中,可选地,所述的物流包裹图片处理装置,还可包括:叠加模块,用于将所述条码的最终识别结果叠加在筛选出的最佳图片中。
作为一可选实施方式,在抓拍的图片中存在多个条码的情况下,所述第一识别模块,可具体用于对所述第N张图片中的条码进行识别,获取多个条码的信息,并将每个条码的信息分别加入到不同的队列中;其中,每个条码的信息包括该条码相对于所述第N张图片的相对位置。
所述匹配模块,可具体用于针对所述第N+1张图片中的每个条码,判断该条码相对于所述第N+1张图片的相对位置的中心点与该条码在第N+1张抓 拍图中的预测位置的中心点之间的距离差是否满足预定阈值要求,若满足预定阈值要求,则确定该条码相对于所述第N+1张图片的相对位置,与该条码在第N+1张抓拍图中的预测位置相匹配,将所述第N+1张图片中的相对位置和预测位置相匹配的每个条码的信息分别加入不同的队列。
所述筛选模块,可具体用于在所述包裹离开所述视场后,针对各抓拍的图片,从多个队列中分别获取该图片中每个条码相对于该图片的相对位置,并计算该图片中多个条码的公共中心;在各抓拍的图片中,选择多个条码的公共中心距离对应图片的中心最近的图片,作为所述最佳图片;或者在各抓拍的图片中,选择多个条码的公共中心距离预设区域中心最近的图片,作为所述最佳图片。
本实施例,通过对抓拍图片中的多个条码分别进行识别及跟踪匹配,能够从对所述包裹抓拍的所有图片中筛选出最佳图片。
本申请实施例还提供一种物流包裹图片处理系统,包括:传送带和如前述任一实施方式所述的物流包裹图片处理装置;其中,所述传送带用于对包裹进行传送;所述物流包裹图片处理装置,用于在放置在所述传送带上的包裹进入视场时,对其进行拍照和对所拍的图片进行处理。
本申请实施例提供的物流包裹图片处理系统,可以用于执行图1或图6所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。
本申请实施例还提供一种电子设备,适用于物流包裹图片处理,所述电子设备包括:
壳体、处理器、存储器、电路板和电源电路,其中,电路板安置在壳体围成的空间内部,处理器和存储器设置在电路板上;电源电路,用于为电子设备的各个电路或器件供电;存储器用于存储可执行程序代码;处理器通过读取存储器中存储的可执行程序代码来运行与可执行程序代码对应的程序,以用于执行以下步骤:
对在视场中移动的包裹抓拍第N张图片;其中,N为自然数;
对所述第N张图片中的条码进行识别,获取所述条码的信息,并将所述条码的信息加入到队列中;其中,所述条码的信息包括所述条码相对于所述第N张图片的相对位置;
预测所述第N张图片中的条码在第N+1张抓拍图中的位置;
对所述包裹抓拍第N+1张图片;
对所述第N+1张图片中的条码进行识别,获取所述第N+1张图片中的条码的信息;其中,所述第N+1张图片中的条码的信息包括所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置;
判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与预测的位置是否相匹配;
若相匹配,则将所述第N+1张图片中的条码的信息加入到所述队列中;
在所述包裹离开所述视场后,根据预先设置的条码相对于图片的最佳相对位置以及加入到所述队列中的条码的信息,从对所述包裹抓拍的所有图片中筛选出最佳图片。
本实施例提供的方案可以通过对条码进行识别及跟踪匹配,能够从对所述包裹抓拍的所有图片中筛选出最佳图片。
上述实施例中的电子设备可以以多种形式存在,包括但不限于:
(1)移动通信设备:这类设备的特点是具备移动通信功能,并且以提供话音、数据通信为主要目标。这类终端包括:智能手机(例如iPhone)、多媒体手机、功能性手机以及低端手机等。
(2)超移动个人计算机设备:这类设备属于个人计算机的范畴,有计算和处理功能,一般也具备移动上网特性。这类终端包括:PDA、MID和UMPC设备等,例如iPad。
(3)便携式娱乐设备:这类设备可以显示和播放多媒体内容。该类设备包括:音频、视频播放器(例如iPod),掌上游戏机,电子书,以及智能玩具和便携式车载导航设备。
(4)服务器:提供计算服务的设备,服务器的构成包括处理器、硬盘、内存、系统总线等,服务器和通用的计算机架构类似,但是由于需要提供高可靠的服务,因此在处理能力、稳定性、可靠性、安全性、可扩展性、可管理性等方面要求较高。
(5)其他具有数据交互功能的电子装置。
本申请实施例提供一种应用程序,所述应用程序用于在运行时执行本申请实施例提供的物流包裹图片处理方法。该方法包括:
对在视场中移动的包裹抓拍第N张图片;其中,N为自然数;
对所述第N张图片中的条码进行识别,获取所述条码的信息,并将所述条码的信息加入到队列中;其中,所述条码的信息包括所述条码相对于所述第N张图片的相对位置;
预测所述第N张图片中的条码在第N+1张抓拍图中的位置;
对所述包裹抓拍第N+1张图片;
对所述第N+1张图片中的条码进行识别,获取所述第N+1张图片中的条码的信息;其中,所述第N+1张图片中的条码的信息包括所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置;
判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与预测的位置是否相匹配;
若相匹配,则将所述第N+1张图片中的条码的信息加入到所述队列中;
在所述包裹离开所述视场后,根据预先设置的条码相对于图片的最佳相对位置以及加入到所述队列中的条码的信息,从对所述包裹抓拍的所有图片中筛选出最佳图片。
本实施例提供的方案可以通过对条码进行识别及跟踪匹配,能够从对所述包裹抓拍的所有图片中筛选出最佳图片。
本申请实施例还提供一种存储介质,用于存储可执行代码,所述可执行代码在运行时用于执行本申请实施例提供的物流包裹图片处理方法。该方法 包括:
对在视场中移动的包裹抓拍第N张图片;其中,N为自然数;
对所述第N张图片中的条码进行识别,获取所述条码的信息,并将所述条码的信息加入到队列中;其中,所述条码的信息包括所述条码相对于所述第N张图片的相对位置;
预测所述第N张图片中的条码在第N+1张抓拍图中的位置;
对所述包裹抓拍第N+1张图片;
对所述第N+1张图片中的条码进行识别,获取所述第N+1张图片中的条码的信息;其中,所述第N+1张图片中的条码的信息包括所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置;
判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与预测的位置是否相匹配;
若相匹配,则将所述第N+1张图片中的条码的信息加入到所述队列中;
在所述包裹离开所述视场后,根据预先设置的条码相对于图片的最佳相对位置以及加入到所述队列中的条码的信息,从对所述包裹抓拍的所有图片中筛选出最佳图片。
本实施例提供的方案可以通过对条码进行识别及跟踪匹配,能够从对所述包裹抓拍的所有图片中筛选出最佳图片。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同 要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。
尤其,对于装置实施例和系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (26)

  1. 一种物流包裹图片处理方法,其特征在于,所述方法包括:
    对在视场中移动的包裹抓拍第N张图片;其中,N为自然数;
    对所述第N张图片中的条码进行识别,获取所述条码的信息,并将所述条码的信息加入到队列中;其中,所述条码的信息包括所述条码相对于所述第N张图片的相对位置;
    预测所述第N张图片中的条码在第N+1张抓拍图中的位置;
    对所述包裹抓拍第N+1张图片;
    对所述第N+1张图片中的条码进行识别,获取所述第N+1张图片中的条码的信息;其中,所述第N+1张图片中的条码的信息包括所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置;
    判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与预测的位置是否相匹配;
    若相匹配,则将所述第N+1张图片中的条码的信息加入到所述队列中;
    在所述包裹离开所述视场后,根据预先设置的条码相对于图片的最佳相对位置以及加入到所述队列中的条码的信息,从对所述包裹抓拍的所有图片中筛选出最佳图片。
  2. 根据权利要求1所述的物流包裹图片处理方法,其特征在于,任一图片中的一个条码相对于该图片的相对位置,包括:该条码的外接多边形顶点在该图片中的相对位置。
  3. 根据权利要求1所述的物流包裹图片处理方法,其特征在于,所述判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与预测的位置是否相匹配,包括:
    判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置的中心点与预测的位置的中心点之间的距离差是否满足预定的阈值要求,若满足预定的阈值要求,则确定所述第N+1张图片中的条码相对于所述第N+1张 图片的相对位置,与预测的位置相匹配。
  4. 根据权利要求1或2所述的物流包裹图片处理方法,其特征在于,所述在所述包裹离开所述视场后,根据预先设置的条码相对于图片的最佳相对位置以及加入到所述队列中的所述条码的信息,从对所述包裹抓拍的所有图片中筛选出最佳图片,包括:
    在所述包裹离开所述视场后,根据加入到所述队列中的所述条码的信息,分别计算各抓拍的图片中条码的中心;
    在各抓拍的图片中,选择条码的中心距离对应图片的中心最近的图片,作为所述最佳图片;或者
    在各抓拍的图片中,选择条码的中心距离预设区域中心最近的图片,作为所述最佳图片。
  5. 根据权利要求1所述的物流包裹图片处理方法,其特征在于,还包括:
    将筛选出的所述最佳图片输出。
  6. 根据权利要求1-5任一项所述的物流包裹图片处理方法,其特征在于,所述条码的信息还包括所述条码的识别结果;
    所述处理方法,还包括:
    在所述包裹离开所述视场后,根据同一条码的识别结果中的字符数,对所有抓拍的图片中的该同一条码的识别结果进行分类;
    从分类结果中挑选出包含类成员数量最多的一类;
    在挑选出的所述类中,对该同一条码的识别结果进行逐位分析,将在同一位当中出现频率最高的字符作为该位的识别结果,以得到该同一条码的最终识别结果。
  7. 根据权利要求6所述的物流包裹图片处理方法,其特征在于,还包括:
    将所述条码的最终识别结果叠加在筛选出的最佳图片中。
  8. 根据权利要求1所述的物流包裹图片处理方法,其特征在于,若所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与所述预测的 位置不相匹配,则将所述第N+1张图片中的条码的信息加入到另一队列中。
  9. 根据权利要求1所述的物流包裹图片处理方法,其特征在于,所述对所述第N张图片中的条码进行识别,获取所述条码的信息,并将所述条码的信息加入到队列中,包括:
    对所述第N张图片中的条码进行识别,获取多个条码的信息,并将每个条码的信息分别加入到不同的队列中;其中,每个条码的信息包括该条码相对于所述第N张图片的相对位置。
  10. 根据权利要求9所述的物流包裹图片处理方法,其特征在于,判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与预测的位置是否相匹配;若相匹配,则将所述第N+1张图片中的条码的信息加入到所述队列中,包括:
    针对所述第N+1张图片中的每个条码,判断该条码相对于所述第N+1张图片的相对位置的中心点与该条码在第N+1张抓拍图中的预测位置的中心点之间的距离差是否满足预定阈值要求,若满足预定阈值要求,则确定该条码相对于所述第N+1张图片的相对位置,与该条码在第N+1张抓拍图中的预测位置相匹配,将所述第N+1张图片中的相对位置和预测位置相匹配的每个条码的信息分别加入不同的队列。
  11. 根据权利要求9所述的物流包裹图片处理方法,其特征在于,所述在所述包裹离开所述视场后,根据预先设置的条码相对于图片的最佳相对位置以及加入到所述队列中的条码的信息,从对所述包裹抓拍的所有图片中筛选出最佳图片,包括:
    在所述包裹离开所述视场后,针对各抓拍的图片,从多个队列中分别获取该图片中每个条码相对于该图片的相对位置,并计算该图片中多个条码的公共中心;
    在各抓拍的图片中,选择多个条码的公共中心距离对应图片的中心最近的图片,作为所述最佳图片;或者
    在各抓拍的图片中,选择多个条码的公共中心距离预设区域中心最近的图片,作为所述最佳图片。
  12. 一种物流包裹图片处理装置,其特征在于,所述装置包括:
    第一拍照模块,用于对在视场中移动的包裹抓拍第N张图片;其中,N为自然数;
    第一识别模块,用于对所述第N张图片中的条码进行识别,获取所述条码的信息,并将所述条码的信息加入到队列中;其中,所述条码的信息包括所述条码相对于所述第N张图片的相对位置;
    预测模块,用于预测所述第N张图片中的条码在第N+1张抓拍图中的位置;
    第二拍照模块,用于对所述包裹抓拍第N+1张图片;
    第二识别模块,用于对所述第N+1张图片中的条码进行识别,获取所述第N+1张图片中的条码的信息;其中,所述第N+1张图片中的条码的信息包括所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置;
    匹配模块,用于判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与预测的位置是否相匹配;若相匹配,则将所述第N+1张图片中的条码的信息加入到所述队列中;
    筛选模块,用于在所述包裹离开所述视场后,根据预先设置的条码相对于图片的最佳相对位置以及加入到所述队列中的条码的信息,从对所述包裹抓拍的所有图片中筛选出最佳图片。
  13. 根据权利要求12所述的物流包裹图片处理装置,其特征在于,任一图片中的一个条码相对于该图片的相对位置,包括:该条码的外接多边形顶点在该图片中的相对位置。
  14. 根据权利要求12所述的物流包裹图片处理装置,其特征在于,所述匹配模块,包括:
    第一确定子模块,用于确定所述第N+1张图片中的条码相对于所述第N+1 张图片的相对位置的中心点,以及确定预测的位置的中心点;
    判断子模块,用于判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置的中心点与预测的位置的中心点之间的距离差是否满足预定的阈值要求;若满足预定的阈值要求,则确定所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与预测的位置相匹配。
  15. 根据权利要求12或13所述的物流包裹图片处理装置,其特征在于,所筛选模块,包括:
    第二确定子模块,用于在所述包裹离开所述视场后,根据加入到所述队列中的条码在对应图片中的相对位置,分别计算各抓拍的图片中条码的中心;
    筛选子模块,用于在各抓拍的图片中,选择条码的中心距离对应图片的中心最近的图片,作为所述最佳图片;或者用于在各抓拍的图片中,选择条码的中心距离预设区域中心最近的图片,作为所述最佳图片。
  16. 根据权利要求12所述的物流包裹图片处理装置,其特征在于,还包括:
    图片输出模块,用于将所述筛选模块筛选出的所述最佳图片输出。
  17. 根据权利要求12-16任一项所述的物流包裹图片处理装置,其特征在于,所述条码的信息还包括所述条码的识别结果;
    所述处理装置,还包括:
    字符融合模块,用于在所述包裹离开所述视场后,根据同一条码的识别结果中的字符数的多少,对所有抓拍的图片中条码的识别结果进行分类;从分类结果中挑选出包含类成员数量最多的一类;在挑选出的所述类中,对该同一条码的识别结果进行逐位分析,将在同一位当中出现频率最高的字符作为该位的识别结果,以得到同一条码的最终识别结果。
  18. 根据权利要求17所述的物流包裹图片处理装置,其特征在于,还包括:叠加模块,用于将所述条码的最终识别结果叠加在筛选出的最佳图片中。
  19. 根据权利要求12所述的物流包裹图片处理装置,其特征在于,
    所述匹配模块,还用于若所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与所述预测的位置不相匹配,则将所述第N+1张图片中的条码的信息加入到另一队列中。
  20. 根据权利要求12所述的物流包裹图片处理装置,其特征在于,所述第一识别模块,具体用于对所述第N张图片中的条码进行识别,获取多个条码的信息,并将每个条码的信息分别加入到不同的队列中;其中,每个条码的信息包括该条码相对于所述第N张图片的相对位置。
  21. 根据权利要求20所述的物流包裹图片处理装置,其特征在于,所述匹配模块,具体用于针对所述第N+1张图片中的每个条码,判断该条码相对于所述第N+1张图片的相对位置的中心点与该条码在第N+1张抓拍图中的预测位置的中心点之间的距离差是否满足预定阈值要求,若满足预定阈值要求,则确定该条码相对于所述第N+1张图片的相对位置,与该条码在第N+1张抓拍图中的预测位置相匹配,将所述第N+1张图片中的相对位置和预测位置相匹配的每个条码的信息分别加入不同的队列。
  22. 根据权利要求20所述的物流包裹图片处理装置,其特征在于,所述筛选模块,具体用于在所述包裹离开所述视场后,针对各抓拍的图片,从多个队列中分别获取该图片中每个条码相对于该图片的相对位置,并计算该图片中多个条码的公共中心;在各抓拍的图片中,选择多个条码的公共中心距离对应图片的中心最近的图片,作为所述最佳图片;或者在各抓拍的图片中,选择多个条码的公共中心距离预设区域中心最近的图片,作为所述最佳图片。
  23. 一种物流包裹图片处理系统,其特征在于,包括:
    传送带和如权利要求12-22任一项所述的物流包裹图片处理装置;其中,
    所述传送带用于对包裹进行传送;
    所述物流包裹图片处理装置,用于在放置在所述传送带上的包裹进入视场时,对其进行拍照和对所拍的图片进行处理。
  24. 一种电子设备,其特征在于,适用于物流包裹图片处理,所述电子 设备包括:
    壳体、处理器、存储器、电路板和电源电路,其中,电路板安置在壳体围成的空间内部,处理器和存储器设置在电路板上;电源电路,用于为电子设备的各个电路或器件供电;存储器用于存储可执行程序代码;处理器通过读取存储器中存储的可执行程序代码来运行与可执行程序代码对应的程序,以用于执行以下步骤:
    对在视场中移动的包裹抓拍第N张图片;其中,N为自然数;
    对所述第N张图片中的条码进行识别,获取所述条码的信息,并将所述条码的信息加入到队列中;其中,所述条码的信息包括所述条码相对于所述第N张图片的相对位置;
    预测所述第N张图片中的条码在第N+1张抓拍图中的位置;
    对所述包裹抓拍第N+1张图片;
    对所述第N+1张图片中的条码进行识别,获取所述第N+1张图片中的条码的信息;其中,所述第N+1张图片中的条码的信息包括所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置;
    判断所述第N+1张图片中的条码相对于所述第N+1张图片的相对位置,与预测的位置是否相匹配;
    若相匹配,则将所述第N+1张图片中的条码的信息加入到所述队列中;
    在所述包裹离开所述视场后,根据预先设置的条码相对于图片的最佳相对位置以及加入到所述队列中的条码的信息,从对所述包裹抓拍的所有图片中筛选出最佳图片。
  25. 一种应用程序,其特征在于,所述应用程序用于在运行时执行权利要求1-11任一项所述的物流包裹图片处理方法。
  26. 一种存储介质,其特征在于,用于存储可执行代码,所述可执行代码在运行时用于执行权利要求1-11任一项所述的物流包裹图片处理方法。
PCT/CN2017/086598 2016-08-01 2017-05-31 一种物流包裹图片处理方法、装置及系统 WO2018024024A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US16/321,959 US10860877B2 (en) 2016-08-01 2017-05-31 Logistics parcel picture processing method, device and system
EP17836207.5A EP3493099B1 (en) 2016-08-01 2017-05-31 Logistics parcel picture processing method, device and system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610615067.5A CN107679529B (zh) 2016-08-01 2016-08-01 一种物流包裹图片处理方法、装置及系统
CN201610615067.5 2016-08-01

Publications (1)

Publication Number Publication Date
WO2018024024A1 true WO2018024024A1 (zh) 2018-02-08

Family

ID=61073227

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/086598 WO2018024024A1 (zh) 2016-08-01 2017-05-31 一种物流包裹图片处理方法、装置及系统

Country Status (4)

Country Link
US (1) US10860877B2 (zh)
EP (1) EP3493099B1 (zh)
CN (1) CN107679529B (zh)
WO (1) WO2018024024A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112183148A (zh) * 2020-09-18 2021-01-05 内江师范学院 一种批量条码定位方法及识别系统

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111860025B (zh) * 2019-04-30 2022-08-02 杭州海康机器人技术有限公司 二维码感兴趣区域定位方法及装置
CN110516664A (zh) * 2019-08-16 2019-11-29 咪咕数字传媒有限公司 票据识别方法、装置、电子设备及存储介质
CN112749573B (zh) * 2020-12-29 2023-04-28 杭州海康机器人股份有限公司 条码匹配方法、装置、电子设备及条码匹配系统
CN113191469A (zh) * 2021-04-30 2021-07-30 南方科技大学 基于二维码的物流管理方法、系统、服务器和存储介质
US11507245B1 (en) * 2021-04-30 2022-11-22 Zebra Technologies Corporation Systems and methods for enhancing image content captured by a machine vision camera
US11928550B2 (en) * 2022-01-28 2024-03-12 Zebra Technologies Corporation Methods and apparatus to locate and decode an arranged plurality of barcodes in an image

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2138982A (en) * 1983-04-27 1984-10-31 British Hovercraft Corp Ltd Method and apparatus for reading bar codes
CN101281597A (zh) * 2008-04-25 2008-10-08 北京工业大学 一种产品包装图形标识信息在线实时采集识别装置及方法
CN103020759A (zh) * 2012-12-03 2013-04-03 黄敏 基于二维码识别技术的服装信息追溯方法
CN103413156A (zh) * 2013-07-22 2013-11-27 深圳市辰卓科技有限公司 一种信息处理方法及装置
CN104966043A (zh) * 2015-07-14 2015-10-07 赵忠义 包裹条码智能识别方法及装置

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ATE320047T1 (de) * 1996-12-30 2006-03-15 Datalogic Spa Verfahren und vorrichtung zum lesen und zuordnen von optischen codes
US6590999B1 (en) * 2000-02-14 2003-07-08 Siemens Corporate Research, Inc. Real-time tracking of non-rigid objects using mean shift
JP2002358523A (ja) * 2001-05-31 2002-12-13 Canon Inc パターン認識処理装置及びその方法、画像入力装置
US7474781B2 (en) * 2001-09-20 2009-01-06 International Business Machines Corporation Image based bar-code reading and robotic registration apparatus for use in automated tape library systems
US20030086596A1 (en) * 2001-11-07 2003-05-08 Medical Metrics, Inc. Method, computer software, and system for tracking, stabilizing, and reporting motion between vertebrae
US20030118245A1 (en) * 2001-12-21 2003-06-26 Leonid Yaroslavsky Automatic focusing of an imaging system
JP4724802B1 (ja) 2010-07-30 2011-07-13 株式会社シフト 二次元コードリーダおよびプログラム
US8740081B2 (en) 2011-11-03 2014-06-03 Cognex Corporation Method and apparatus for ordering code candidates in image for decoding attempts
FR3003065B1 (fr) * 2013-03-05 2015-02-27 Commissariat Energie Atomique Procede de suivi d'une cible dans une sequence d'images avec prise en compte de la dynamique de la cible
WO2015045233A1 (ja) * 2013-09-26 2015-04-02 日本電気株式会社 情報処理システム
US9836635B2 (en) 2014-10-09 2017-12-05 Cognex Corporation Systems and methods for tracking optical codes
CN108027972B (zh) * 2015-07-30 2022-03-15 北京市商汤科技开发有限公司 用于对象跟踪的系统和方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2138982A (en) * 1983-04-27 1984-10-31 British Hovercraft Corp Ltd Method and apparatus for reading bar codes
CN101281597A (zh) * 2008-04-25 2008-10-08 北京工业大学 一种产品包装图形标识信息在线实时采集识别装置及方法
CN103020759A (zh) * 2012-12-03 2013-04-03 黄敏 基于二维码识别技术的服装信息追溯方法
CN103413156A (zh) * 2013-07-22 2013-11-27 深圳市辰卓科技有限公司 一种信息处理方法及装置
CN104966043A (zh) * 2015-07-14 2015-10-07 赵忠义 包裹条码智能识别方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3493099A4 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112183148A (zh) * 2020-09-18 2021-01-05 内江师范学院 一种批量条码定位方法及识别系统

Also Published As

Publication number Publication date
US20190164001A1 (en) 2019-05-30
EP3493099A4 (en) 2019-08-21
CN107679529B (zh) 2019-12-24
EP3493099B1 (en) 2021-02-24
EP3493099A1 (en) 2019-06-05
US10860877B2 (en) 2020-12-08
CN107679529A (zh) 2018-02-09

Similar Documents

Publication Publication Date Title
WO2018024024A1 (zh) 一种物流包裹图片处理方法、装置及系统
CN109858371B (zh) 人脸识别的方法及装置
US10133951B1 (en) Fusion of bounding regions
US9098888B1 (en) Collaborative text detection and recognition
CN105659286B (zh) 自动化图像裁剪和分享
US9633479B2 (en) Time constrained augmented reality
KR102087882B1 (ko) 시각적 이미지 매칭을 기반으로 한 미디어 스트림 식별 장치 및 방법
CN108875542B (zh) 一种人脸识别方法、装置、系统及计算机存储介质
US20120008836A1 (en) Sequential event detection from video
US20130170760A1 (en) Method and System for Video Composition
KR20110096500A (ko) 위치 기반의 통신 방법 및 시스템
CN109783680B (zh) 图像推送方法、图像获取方法、装置及图像处理系统
US9818012B2 (en) Method for barcode detection, barcode detection system, and program therefor
CN108037830B (zh) 一种增强现实的实现方法
US20140233854A1 (en) Real time object scanning using a mobile phone and cloud-based visual search engine
CN110135889A (zh) 智能推荐书单的方法、服务器及存储介质
US10354161B2 (en) Detecting font size in a digital image
CN113111838A (zh) 行为识别方法及装置、设备和存储介质
CN111428743B (zh) 商品识别方法、商品处理方法、装置及电子设备
CN109213397B (zh) 数据处理方法、装置和用户端
KR20190104260A (ko) 형태 검출
JP2013195725A (ja) 画像表示システム
KR20210084447A (ko) 목표 추적 방법, 장치, 전자 디바이스 및 기록 매체
KR20210084444A (ko) 제스처 인식 방법 및 장치, 전자 디바이스 및 기록 매체
CN115004245A (zh) 目标检测方法、装置、电子设备和计算机存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17836207

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2017836207

Country of ref document: EP

Effective date: 20190301