CN110210488A - The recognition methods of bar code and cell-phone number and device on a kind of express waybill - Google Patents
The recognition methods of bar code and cell-phone number and device on a kind of express waybill Download PDFInfo
- Publication number
- CN110210488A CN110210488A CN201910513623.1A CN201910513623A CN110210488A CN 110210488 A CN110210488 A CN 110210488A CN 201910513623 A CN201910513623 A CN 201910513623A CN 110210488 A CN110210488 A CN 110210488A
- Authority
- CN
- China
- Prior art keywords
- cell
- phone number
- picture
- addressee
- bar code
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods 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/1404—Methods for optical code recognition
- G06K7/1408—Methods for optical code recognition the method being specifically adapted for the type of code
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/26—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
- G06V10/267—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/14—Image acquisition
- G06V30/148—Segmentation of character regions
- G06V30/153—Segmentation of character regions using recognition of characters or words
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
Abstract
The present invention relates to the recognition methods of bar code and cell-phone number on a kind of express waybill, comprising: obtains picture to be processed, picture to be processed includes express waybill image;Express waybill image is identified from picture to be processed;Express waybill image is obtained from picture to be processed by cutting figure correction;It is based respectively on addressee's cell-phone number provincial characteristics and bar code area characteristic of field, cutting is carried out to express waybill image and obtains addressee's cell-phone number picture and bar code picture;Corresponding identifier is sent by addressee's cell-phone number picture and bar code picture to identify;If identifying and getting addressee's cell-phone number and Air Way Bill No. simultaneously, the addressee's cell-phone number and Air Way Bill No. successfully identified is shown.The invention has the benefit that eliminating the operation that business personnel needs switching express delivery face list bar code scan interface back and forth and cell-phone number identification interface reaches two kinds of information of acquisition, operating efficiency is substantially increased, it can Air Way Bill No. and cell-phone number in the more express waybills of identification of rapid batch.
Description
Technical field
The invention belongs to express delivery face list identification technology fields, and in particular to bar code and cell-phone number on a kind of express waybill
Recognition methods and device.
Background technique
In existing delivery industry, in the end that express delivery is delivered when being accessed and being delivered to express mail, it usually needs
Business personnel's handheld terminal extracts the odd numbers and cell-phone number on express delivery list, and when obtaining these information, it usually needs scanning is fast
It passs bar code on list and obtains the telephone number inputted on express delivery list again manually after odd numbers corresponding short massage notice client just can be transmitted and take
Part, since more and complex steps cause efficiency especially low in needing business personnel to be manually operated and inputting.
And terminal can obtain hand by scanning cell-phone number on express delivery list and bar code respectively in existing solution
The information such as machine number and as soon as possible odd numbers, but need for business personnel switching express delivery face list bar code scan interface and mobile phone back and forth
Number identification interface simultaneously finds corresponding region and is scanned can be only achieved and obtain two kinds of information, compared to original by being manually entered
Mode facilitate many, but more operation is carried out there is still a need for business personnel, efficiency is not also high.
Summary of the invention
Cumbersome, the low problem of operating efficiency is identified in order to solve express delivery odd numbers and cell-phone number of the existing technology,
The present invention provides the recognition methods and system of bar code on a kind of express waybill and cell-phone number, with it is high-efficient, can be quick
The features such as Air Way Bill No. and cell-phone number of batch identified in more express waybills.
The recognition methods of bar code and cell-phone number on a kind of express waybill of specific embodiment according to the present invention, packet
It includes:
Picture to be processed is obtained, the picture to be processed includes express waybill image;
The express waybill image is identified from the picture to be processed;
The express waybill image is obtained from the picture to be processed by cutting figure correction;
It is based respectively on addressee's cell-phone number provincial characteristics and bar code area characteristic of field, the express waybill image is cut
Get addressee's cell-phone number picture and bar code picture;
Corresponding identifier is sent by addressee's cell-phone number picture and the bar code picture to identify;
If identifying and getting addressee's cell-phone number and Air Way Bill No. simultaneously, the addressee manpower successfully identified is shown
Machine number and the Air Way Bill No..
Further, addressee's cell-phone number picture and the corresponding identifier of bar code picture are respectively as follows:
Tesseract OCR identification facility and ZBar bar code resolver.
Further, if addressee's cell-phone number and the Air Way Bill No. identify not successfully, again described in execution
Picture and subsequent step to be processed are obtained, until getting addressee's cell-phone number and the Air Way Bill No..
Further, if only successfully identifying one in addressee's cell-phone number and the Air Way Bill No., exist and do not know
Other item, then the method also includes:
Store the addressee's cell-phone number or the Air Way Bill No. successfully identified;
Determine that unidentified item information, the unidentified item information are identified comprising unidentified item;
The picture to be processed is obtained again;
The express waybill image is identified from the picture to be processed obtained again;
The express waybill image is obtained from the picture to be processed by cutting figure correction;
Based on the unidentified item information, addressee's cell-phone number provincial characteristics and bar code area characteristic of field, to the express delivery
Waybill image carries out cutting and obtains the corresponding addressee's cell-phone number picture of unidentified item mark or bar code picture;
The unidentified item is identified into corresponding addressee's cell-phone number picture or bar code picture is sent to corresponding identification
Device is identified;
If identifying and getting the unidentified item and identify corresponding addressee's cell-phone number or the Air Way Bill No., show
It is shown as the addressee's cell-phone number or Air Way Bill No. that function identifies.
Further, cutting carried out to the express waybill image obtain the process of addressee's cell-phone number picture include:
Each pixel in the express waybill image is traversed, the interference of red or blue marking pen is removed;
After successively carrying out binaryzation, dilation erosion to the express waybill image after traversal, it is based on addressee's cell-phone number
The Aspect Ratio feature in region is truncated to addressee's cell-phone number picture.
Further, the process of Tesseract OCR identification facility identification addressee's cell-phone number includes:
Carrying out text identification judgement to the addressee's cell-phone number picture being truncated to based on the feature of cell-phone number is
No includes cell-phone number;
If comprising cell-phone number, obtain described in addressee's cell-phone number picture for being truncated to each number it is accurate
Degree and coordinate;
The coordinate of each number is integrated, the precise region of whole mobile phone number in picture is obtained;
Confirm that cell-phone number identifies successfully if the accuracy of each number is both greater than 70.
Further, on express waybill bar code and cell-phone number recognition methods further include: if existing in cell-phone number many
It is not more than 70 precise regions based on obtained whole mobile phone number again to the interception in the accuracy of one number
The addressee's cell-phone number picture arrived carries out the interception of cell-phone number precise region, and sends the picture intercepted again to
Tesseract OCR server is identified, if two recognition results that Tesseract OCR server returns are identical, or is returned
At least one in two recognition results returned identical then assert that cell-phone number identifies successfully with Tesseract OCR identification facility
Corresponding cell-phone number is provided to express delivery person.
Further, cutting carried out to the express waybill image obtain the process of bar code picture include:
Eliminate the figure of non-bar code in the express waybill image;
Determine the boundary of the barcode size or text field;
Extract the barcode size or text field.
Further, the figure for eliminating non-bar code in the express waybill image, determines the boundary of the barcode size or text field
Process includes: successively to carry out gray proces, gaussian filtering process, the processing of Sobel x-y difference, mean value to the express waybill image
Filtering processing, binary conversion treatment, closed operation processing and corrosion expansion.
According to the present invention on a kind of express waybill of specific embodiment bar code and cell-phone number identification device, comprising:
Picture preprocessing module identifies the express waybill from the picture to be processed for obtaining picture to be processed
Image obtains the express waybill image by cutting figure correction from the picture to be processed, and the picture to be processed includes fast
Pass waybill image;
Picture cutting module, is based respectively on addressee's cell-phone number provincial characteristics and bar code area characteristic of field, to the express delivery
Waybill image carries out cutting and obtains addressee's cell-phone number picture and bar code picture;And
Information sending module, for sending corresponding knowledge for addressee's cell-phone number picture and the bar code picture
Other device is identified, if identifying and getting addressee's cell-phone number and Air Way Bill No. simultaneously, shows the receipts successfully identified
Part people cell-phone number and the Air Way Bill No..
The invention has the benefit that by once extracting the picture comprising complete express waybill, it can be simultaneously in waybill
Bar code and the cell-phone number of addressee identify, used for express delivery person, eliminate business personnel and need switching back and forth
Express delivery face list bar code scan interface and cell-phone number identification interface reach the operation for obtaining two kinds of information, substantially increase operation effect
Rate, can Air Way Bill No. and cell-phone number in the more express waybills of identification of rapid batch.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is the process of the recognition methods of bar code and cell-phone number on the express waybill provided according to an exemplary embodiment
Figure;
Fig. 2 is the another of the recognition methods of bar code and cell-phone number on the express waybill provided according to an exemplary embodiment
Flow chart;
Fig. 3 is the another of the recognition methods of bar code and cell-phone number on the express waybill provided according to an exemplary embodiment
Flow chart;
Fig. 4 is the flow chart of the cell-phone number identification provided according to an exemplary embodiment;
Fig. 5 is the interception flow chart of the barcode size or text field provided according to an exemplary embodiment;
Fig. 6 is the effect picture of the express waybill image provided according to an exemplary embodiment cut after figure;
Fig. 7 is the administrative division map of the addressee's cell-phone number and bar code that are provided according to an exemplary embodiment;
Fig. 8 is the picture of the addressee's cell-phone number and bar code that intercept out that are provided according to an exemplary embodiment.
Appended drawing reference
1- addressee's cell-phone number region;2- the barcode size or text field.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, technical solution of the present invention will be carried out below
Detailed description.Obviously, described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Base
Embodiment in the present invention, those of ordinary skill in the art are obtained all without making creative work
Other embodiment belongs to the range that the present invention is protected.
Shown in referring to Fig.1, the embodiment provides the identification sides of bar code and cell-phone number on a kind of express waybill
Method comprising following steps:
101, picture to be processed is obtained, picture to be processed includes express waybill image;
102, express waybill image is identified from picture to be processed;
103, cut figure correction and obtain from picture to be processed by Opencv only includes express waybill image;
104, it is based respectively on addressee's cell-phone number provincial characteristics and bar code area characteristic of field, express waybill image is cut
Get addressee's cell-phone number picture and bar code picture;
105, corresponding identifier is sent by addressee's cell-phone number picture and bar code picture to identify;
If 106, identifying and getting addressee's cell-phone number and Air Way Bill No. simultaneously, the addressee manpower successfully identified is shown
Machine number and Air Way Bill No..
As the specific implementation process of above-described embodiment, the one specific of method provided by the present invention is shown referring to Fig. 6
In implementation process the express waybill image of acquisition cut by Opencv obtain after figure only comprising express waybill image
Picture;It is shown the specific location of addressee's cell-phone number region 1 and the barcode size or text field 2 in express waybill referring to Fig. 7, based on each
From feature carry out interception to obtain the picture of corresponding region for respective identifier and be identified, for example, for addressee
Picture minimum pixel area can be used in cell-phone number region 1 and the mode of Aspect Ratio limitation determines addressee's cell-phone number region 1,
Because there is apparent distinguishing characteristics compared with other figures in picture from figure it can also be seen that addressee's cell-phone number region 1, together
The distinguishing characteristics of reason the barcode size or text field 2 is then more obviously easier to intercept;Addressee's cell-phone number after intercepting is shown referring to Fig. 8
The image in region 1 and the barcode size or text field 2 respectively sends it to the addressee that corresponding identifier is identified, and be will identify that
People's cell-phone number and Air Way Bill No. are shown to express delivery personnel use, in this way by once extracting the figure comprising complete express waybill
Piece can simultaneously identify the cell-phone number of bar code and addressee in waybill, use for express delivery person, eliminate business
Member needs switching express delivery face list bar code scan interface back and forth and cell-phone number identification interface to reach the operation of two kinds of information of acquisition, greatly
Operating efficiency is improved greatly, it can Air Way Bill No. and cell-phone number in the more express waybills of identification of rapid batch.
As the feasible implementation of above-described embodiment, addressee's cell-phone number picture and the corresponding identifier of bar code picture
Can be respectively adopted: Tesseract OCR identification facility and ZBar bar code resolver, Tesseract OCR (pass through training pattern
To identify the technology of text and number) it is a open source OCR (Optical safeguarded by HP development in laboratory by Google
Character Recognition, optical character identification) engine, the library that can constantly train makes the energy of image converting text
Power constantly enhances;Because be open source can be downloaded use when needed, to identify the mobile phone in addressee's cell-phone number picture
Number;ZBar is an open source library, and for scanning, reading two dimensional code and bar code, it is direct can to directly download corresponding exploitation environment
Identification and reading that bar code picture carries out Air Way Bill No. are inputted, it is very convenient to use.
To advanced optimize the technical solution, referring to shown in Fig. 2, in a specific embodiment of the invention, express waybill
The recognition methods of upper bar code and cell-phone number the following steps are included:
201, picture to be processed is obtained, picture to be processed includes express waybill image;
202, express waybill image is identified from picture to be processed;
203, cut figure correction and obtain from picture to be processed by Opencv only includes express waybill image;
204, it is based respectively on addressee's cell-phone number provincial characteristics and bar code area characteristic of field, express waybill image is cut
Get addressee's cell-phone number picture and bar code picture;
205, corresponding identifier is sent by addressee's cell-phone number picture and bar code picture to identify;
If 206, identifying and getting addressee's cell-phone number and Air Way Bill No. simultaneously, the addressee manpower successfully identified is shown
Machine number and Air Way Bill No.;
If 207, addressee's cell-phone number and Air Way Bill No. identify not successfully, the step for obtaining picture to be processed is executed again
Rapid 201 and subsequent step, until getting addressee's cell-phone number and Air Way Bill No..
Express waybill figure is reacquired by taking when identifying corresponding addressee's cell-phone number and Air Way Bill No. not successfully
Identification process as executing addressee's cell-phone number and bar code again, since the process entirely identified can recognize in several seconds
At when successfully identifying addressee's cell-phone number and Air Way Bill No., then the operation for reacquiring image being directly entered, compared to allowing industry
Business person goes to re-start the operation chosen and reacquire image, can save the time that business personnel need to re-operate, and further shortens
The time for needing business personnel to operate, improve the efficiency entirely identified.
To advanced optimize the technical solution, referring to shown in Fig. 3, in another embodiment of the present invention, if only at
Function identifies one in addressee's cell-phone number and Air Way Bill No., and there are unidentified items, then bar code and cell-phone number on express waybill
Recognition methods it is further comprising the steps of:
301, the addressee's cell-phone number or Air Way Bill No. successfully identified is stored;
302, determine that unidentified item information, unidentified item information are identified comprising unidentified item;
303, picture to be processed is obtained again;
304, express waybill image is identified from the picture to be processed obtained again;
305, express waybill image is obtained from picture to be processed by cutting figure correction;
306, it is based on unidentified item information, addressee's cell-phone number provincial characteristics and bar code area characteristic of field, to express waybill
Image carries out cutting and obtains the corresponding addressee's cell-phone number picture of unidentified item mark or bar code picture;
307, unidentified item is identified into corresponding addressee's cell-phone number picture or bar code picture is sent to corresponding identification
Device is identified
If 308, identifying and getting unidentified item and identify corresponding addressee's cell-phone number or Air Way Bill No., shows and successfully know
Not Chu addressee's cell-phone number or Air Way Bill No..
Based on the above embodiment, it is deposited accordingly by using after only recognizing addressee's cell-phone number or Air Way Bill No.
Storage, and unidentified item is marked or is stored accordingly, it, can be only in this way when acquisition express waybill image is identified again
Identification interception picture is carried out for the unidentified item of mark and is identified, without again to the express waybill image entirely obtained
It is identified, further saves the time of identification, improve recognition efficiency.
It is illustrated for the identification process further to addressee's cell-phone number of the present invention, referring to shown in Fig. 4, gives
The overall process for having gone out the identification of addressee's cell-phone number, can be based on the existing end of scan with camera used of express delivery person
Carry out specifically includes the following steps:
Camera focusing mode is set as: AVCaptureFocusModeContinuousAutofocus;
It is UIImage by CMSampleBufferRef data type conversion;
Size coordinate based on surface sweeping frame carries out coordinate conversion and cuts out express delivery single image;
Lateral picture is rotated by 90 ° and is ajusted;
Each pixel of express delivery single image is traversed, the interference of the red or blue marking pen of removal;
After carrying out binaryzation to image, dilation erosion is carried out by opencv, and the interception of the provincial characteristics based on cell-phone number
To cell-phone number region;
Tesseract OCR is sent by the picture being truncated to identify;
If not including cell-phone number in the text identified, this end of identification carries out the identification of lower picture;
If in the text identified including cell-phone number, method is carried using Tesseract OCR:
RecognizedBlockByIteratorLevel:G8P IteratorLevelSymbol obtains each number in cell-phone number
Accuracy and coordinate;
The coordinate of each number is integrated, the precise region of whole mobile phone number is obtained;
If the accuracy of the bits per inch word of cell-phone number is both greater than 70, it is considered as cell-phone number identification correctly, returns to correct hand
Machine number;
Hand is intercepted by the precise region obtained again if the accuracy of the bits per inch word of cell-phone number is not both greater than 70
The picture of machine precise region, and upload to the identification of OCR server;
If two recognition results that Tesseract OCR server returns are identical, or in two recognition results returned extremely
Rare one with Tesseract OCR identification facility identical then assert cell-phone number identify successfully provided to express delivery person it is corresponding
Cell-phone number.
As the feasible implementation of above-described embodiment, can be carried out based on the library OCR in the platform tess-two of Android whole
The process of a identification:
The data for the frame that camera is got are switched into picture, are then rotated by 90 °, then according to scan box on interface
Position, cut out the region of needs, material is thus formed an identification regions in the right direction, binaryzation is carried out to it, will
Picture becomes black-and-white two color, improve discrimination (because to traverse all pixels, in order to save the time, while binaryzation,
It can synchronize and carry out void content filtering);
Pixel is traversed, traversal line by line is carried out to express waybill image, in first time traversal, the row of available number
Number: when traversing the pixel of certain a line, as long as one black picture element of discovery, illustrates that this line is not null, that is just recorded
There is text to account for one-row pixels, if next line still finds black picture element, that just adds the text of current record here
One-row pixels height, until certain a line is entirely white pixel, such a line text finishes, even if there is black picture element again below
It is the second row text.
Each row text record end all compares with lastrow text, and the feature choosing height according to addressee's cell-phone number is higher
A line text leave, others are skipped, until traversal terminate thus just obtain understand analysis object lower edges, also just cut
Addressee's cell-phone number region has been taken out, can be sent directly to download to the offline Tesseract OCR identification in terminal,
Tesseract OCR software can carry out judging whether it is cell-phone number to the text identified first (can be according to the digit of cell-phone number
For 11 and number feature, after being determined as digital text first, then judge whether it is cell-phone number), in identifying picture
Content be cell-phone number after, then using Tesseract OCR carry: recognizedBlockByIteratorLevel:G8P
IteratorLevelSymbol recognition methods obtains the accuracy and coordinate of each number in cell-phone number;
The coordinate of each number is integrated, the precise region of whole mobile phone number is obtained;
If the accuracy of the bits per inch word of cell-phone number is both greater than 70, it is considered as cell-phone number identification correctly, returns to correct hand
Machine number;
Hand is intercepted by the precise region obtained again if the accuracy of the bits per inch word of cell-phone number is not both greater than 70
The picture of machine precise region, and upload to the identification of OCR server;
If two recognition results that Tesseract OCR server returns are identical, or in two recognition results returned extremely
Rare one with Tesseract OCR identification facility identical then assert cell-phone number identify successfully provided to express delivery person it is corresponding
Cell-phone number.
The cell-phone number number identified by using Tesseract OCR server as off-line state OCR identification facility
It in the case that accuracy is low, is intercepted on the basis of the coordinate of precise region again, cell-phone number region after being updated
Picture is sent to OCR server end and is identified, can guarantee the accuracy of the cell-phone number identified in this way, mentions for express delivery person
For relatively reliable recognition result, mistake is avoided the occurrence of.
As another feasible implementation of above-described embodiment, the mistake realizing the training of Tesseract OCR and using
Journey can carry out in a computer, be carried out in portable and intelligent terminal after the completion of training using specifically may include following mistake
Journey:
JTessBoxEditor- > acquisition sample file -> Merge sample file -> generation BOX file -> defined word is installed
Symbol configuration file -> character is corrected -> executes the autoexec -> traineddata of generation is put into tessdata;
It obtains sample file: after jTessBoxEditor is installed, the digital text of drafting or the picture of number can be used;
Merge sample file: above-mentioned file is merged and saves as the file of .GIF;
It generates BOX file: being .box file by the file generated of .GIF;
Definition character configuration file: the text file of an entitled font_properties is generated in file;
Character correction: the file for opening .GIF is corrected text;
Execution is first wanted to create font_properties file under catalogue before changing batch processing;
Finally by generation last, that num.trainddata copied to tessdata file in Tesseract-OCR is complete
At training can carry out using.
For further to bar code of the present invention processing and identification process be illustrated, referring to Figure 5, give
Gone out the overall process that bar code picture is handled and identified, successively the following steps are included:
It is successively carried out at gray proces -> gaussian filtering process -> Sobel x-y difference to the express waybill image after figure is cut
Reason -> mean filter processing -> binary conversion treatment -> closed operation processing -> corrosion expands -> obtains the barcode size or text field.
Specifically, carrying out the interference that gray proces eliminate color:
Mat MyClass::getGray(Mat image,bool show)
{Mat cimage;
cvtColor(image,cimage,CV_RGBA2GRAY);
if(show)
Imshow (" grayscale image ", cimage);
return cimage;}
Gaussian filtering process eliminates Gaussian noise:
The processing of Sobel x-y difference can only be judged by the form in x-axis accordingly according to the characteristic of bar code.
The size of bar code is determined by the width of x-axis, y-axis is distinguished according to actual extracting:
Mat MyClass::getSobel(Mat image,bool show)
{
Mat cimageX16s,cimageY16s,imageSobelX,imageSobelY,out;
Sobel(image,cimageX16s,CV_16S,1,0,3,1,0,4);
Sobel(image,cimageY16s,CV_16S,0,1,3,1,0,4);
convertScaleAbs(cimageX16s,imageSobelX,1,0);
convertScaleAbs(cimageY16s,imageSobelY,1,0);
Out=imageSobelX-imageSobelY;
if(show)
Imshow (" Sobelx-y difference figure ", out);
return out;
}
Mean filter processing is for eliminating high-frequency noise:
Mat MyClass::getBlur(Mat image,bool show)
{
Mat cimage;
blur(image,cimage,Size(3,3));
if(show)
Imshow (" mean filter figure ", cimage);
return cimage;
}
Binary conversion treatment reduces the data volume in image, highlights the profile of bar code:
Corrosion expansion is for eliminating noise spot, merging bar code region:
Finally it can be sent to Zbar according to the region of treated feature interception bar code and be parsed to obtain bar shaped
The Air Way Bill No. that code is included.
The embodiments of the present invention also provide the identification devices of bar code and cell-phone number on a kind of express waybill, comprising:
Picture preprocessing module identifies the express waybill image for obtaining picture to be processed from picture to be processed,
Express waybill image is obtained from picture to be processed by cutting figure correction, picture to be processed includes express waybill image;
Picture cutting module, is based respectively on addressee's cell-phone number provincial characteristics and bar code area characteristic of field, to express waybill
Image carries out cutting and obtains addressee's cell-phone number picture and bar code picture;And
Information sending module is carried out for sending corresponding identifier for addressee's cell-phone number picture and bar code picture
Identification, if identifying and getting addressee's cell-phone number and Air Way Bill No. simultaneously, show addressee's cell-phone number for successfully identifying with
Air Way Bill No..
As the feasible implementation of above-described embodiment, bar code and cell-phone number on express waybill provided by the above embodiment
Identification device can be the intelligent terminal with camera, picture preprocessing module is based on Opencv technology respectively to passing through camera
The picture to be processed of shooting carries out cutting figure and correction, obtains express waybill image, and picture cutting module is based on addressee's cell-phone number
With feature of the bar code in express waybill, carries out cutting and obtain corresponding picture, be sent to accordingly by information sending module
Identifier identified.
Wherein, for carrying out cutting figure and correction to the picture to be processed shot by camera respectively using Opencv technology
Successively following steps can be taken to be handled: picture gray processing -> threshold binarization -> detection profile -> searching profile encirclement square
Battle array, and obtain angle -> rotational correction is carried out according to angle -> and contours extract -> in profile is carried out to postrotational image
Image-region, which plucks out, to be come, and an independent image is become, and used program can be set according to actual use situation, herein not
It repeats again.
The recognition methods of bar code and cell-phone number and device on express waybill provided in an embodiment of the present invention, by once mentioning
The picture comprising complete express waybill is taken, the cell-phone number of bar code and addressee in waybill can be identified simultaneously, for fast
Business personnel's use is passed, business personnel is eliminated and switching express delivery face list bar code scan interface back and forth and cell-phone number identification interface is needed to reach
To the operation for obtaining two kinds of information, operating efficiency is substantially increased, it can fortune in the more express waybills of identification of rapid batch
Odd numbers and cell-phone number.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain
Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.
It should also be appreciated by one skilled in the art that various illustrative logical boxs, mould in conjunction with the embodiments herein description
Electronic hardware, computer software or combinations thereof may be implemented into block, circuit and algorithm steps.In order to clearly demonstrate hardware and
Interchangeability between software surrounds its function to various illustrative components, frame, module, circuit and step above and carries out
It is generally described.Hardware is implemented as this function and is also implemented as software, depends on specific application and to entire
The design constraint that system is applied.Those skilled in the art can be directed to each specific application, be realized in a manner of flexible
Described function, still, this realization decision should not be construed as a departure from the scope of protection of this disclosure.
Description above includes the citing of one or more embodiments.Certainly, in order to describe above-described embodiment and description portion
The all possible combination of part or method is impossible, but it will be appreciated by one of ordinary skill in the art that each implementation
Example can do further combinations and permutations.Therefore, embodiment described herein is intended to cover fall into the appended claims
Protection scope in all such changes, modifications and variations.In addition, with regard to term used in specification or claims
The mode that covers of "comprising", the word is similar to term " includes ", just as " including " solved in the claims as transitional word
As releasing.In addition, the use of any one of specification in claims term "or" being to indicate " non-exclusionism
Or ".
Claims (10)
1. the recognition methods of bar code and cell-phone number on a kind of express waybill characterized by comprising
Picture to be processed is obtained, the picture to be processed includes express waybill image;
The express waybill image is identified from the picture to be processed;
The express waybill image is obtained from the picture to be processed by cutting figure correction;
It is based respectively on addressee's cell-phone number provincial characteristics and bar code area characteristic of field, cutting is carried out to the express waybill image and is obtained
To addressee's cell-phone number picture and bar code picture;
Corresponding identifier is sent by addressee's cell-phone number picture and the bar code picture to identify;
If identifying and getting addressee's cell-phone number and Air Way Bill No. simultaneously, the addressee's cell-phone number successfully identified is shown
With the Air Way Bill No..
2. the method according to claim 1, wherein addressee's cell-phone number picture and the bar code picture
Corresponding identifier is respectively as follows: Tesseract OCR identification facility and ZBar bar code resolver.
3. according to the method described in claim 2, it is characterized in that, if addressee's cell-phone number and the Air Way Bill No. not at
Function identifies, then execute again it is described obtain picture and subsequent step to be processed, until get addressee's cell-phone number and
The Air Way Bill No..
4. according to the method described in claim 2, it is characterized in that, if only successfully identifying addressee's cell-phone number and described
One in Air Way Bill No., there are unidentified items, then the method also includes:
Store the addressee's cell-phone number or the Air Way Bill No. successfully identified;
Determine that unidentified item information, the unidentified item information are identified comprising unidentified item;
The picture to be processed is obtained again;
The express waybill image is identified from the picture to be processed obtained again;
The express waybill image is obtained from the picture to be processed by cutting figure correction;
Based on the unidentified item information, addressee's cell-phone number provincial characteristics and bar code area characteristic of field, to the express waybill
Image carries out cutting and obtains the corresponding addressee's cell-phone number picture of unidentified item mark or bar code picture;
By the unidentified item identify corresponding addressee's cell-phone number picture or bar code picture be sent to corresponding identifier into
Row identification;
If identifying and getting the unidentified item and identify corresponding addressee's cell-phone number or the Air Way Bill No., it is shown as
The addressee's cell-phone number or Air Way Bill No. that function identifies.
5. according to the method described in claim 2, it is characterized in that, carrying out cutting to the express waybill image obtains addressee
The process of cell-phone number picture includes:
Each pixel in the express waybill image is traversed, the interference of red or blue marking pen is removed;
After successively carrying out binaryzation, dilation erosion to the express waybill image after traversal, it is based on addressee's cell-phone number region
Aspect Ratio feature be truncated to addressee's cell-phone number picture.
6. according to the method described in claim 5, it is characterized in that, the Tesseract OCR identification facility identifies addressee
The process of cell-phone number includes:
Text identification is carried out to the addressee's cell-phone number picture being truncated to based on the feature of cell-phone number to judge whether to wrap
Containing cell-phone number;
If comprising cell-phone number, obtain described in addressee's cell-phone number picture for being truncated to accuracy of each number and
Coordinate;
The coordinate of each number is integrated, the precise region of whole mobile phone number in picture is obtained;
Confirm that cell-phone number identifies successfully if the accuracy of each number is both greater than 70.
7. according to the method described in claim 6, it is characterized by further comprising: if there is no less than one number in cell-phone number
The accuracy of word is no more than 70 precise regions based on obtained whole mobile phone number again to the receipts being truncated to
Part people's cell-phone number picture carries out the interception of cell-phone number precise region, and sends Tesseract OCR for the picture intercepted again
Server is identified, if two recognition results that Tesseract OCR server returns are identical, or the two identifications knot returned
At least one in fruit and Tesseract OCR identification facility identical then assert cell-phone number to identify successfully to mention to express delivery person
For corresponding cell-phone number.
8. according to the method described in claim 2, it is characterized in that, carrying out cutting to the express waybill image obtains bar code
The process of picture includes:
Eliminate the figure of non-bar code in the express waybill image;
Determine the boundary of the barcode size or text field;
Extract the barcode size or text field.
9. according to the method described in claim 8, it is characterized in that, eliminating the figure of non-bar code in the express waybill image
Shape determines that the process on the boundary of the barcode size or text field includes: successively to carry out gray proces, gaussian filtering to the express waybill image
Processing, the processing of Sobel x-y difference, mean filter processing, binary conversion treatment, closed operation processing and corrosion expansion.
10. the identification device of bar code and cell-phone number on a kind of express waybill characterized by comprising
Picture preprocessing module identifies the express waybill image for obtaining picture to be processed from the picture to be processed,
The express waybill image is obtained from the picture to be processed by cutting figure correction, the picture to be processed includes express waybill
Image;
Picture cutting module, is based respectively on addressee's cell-phone number provincial characteristics and bar code area characteristic of field, to the express waybill
Image carries out cutting and obtains addressee's cell-phone number picture and bar code picture;And
Information sending module, for sending corresponding identifier for addressee's cell-phone number picture and the bar code picture
It is identified, if identifying and getting addressee's cell-phone number and Air Way Bill No. simultaneously, shows the addressee successfully identified
Cell-phone number and the Air Way Bill No..
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910513623.1A CN110210488A (en) | 2019-06-14 | 2019-06-14 | The recognition methods of bar code and cell-phone number and device on a kind of express waybill |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910513623.1A CN110210488A (en) | 2019-06-14 | 2019-06-14 | The recognition methods of bar code and cell-phone number and device on a kind of express waybill |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110210488A true CN110210488A (en) | 2019-09-06 |
Family
ID=67792516
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910513623.1A Pending CN110210488A (en) | 2019-06-14 | 2019-06-14 | The recognition methods of bar code and cell-phone number and device on a kind of express waybill |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110210488A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111144336A (en) * | 2019-12-30 | 2020-05-12 | 贵州近邻宝科技有限公司 | Automatic identification method for mobile phone number and invoice number of addressee facing to express bill |
CN111143091A (en) * | 2019-12-30 | 2020-05-12 | 贵州近邻宝科技有限公司 | Logistics distribution terminal process information synchronization system and device |
CN111476528A (en) * | 2020-04-27 | 2020-07-31 | 上海东普信息科技有限公司 | Data processing method, device and equipment based on express delivery and storage medium |
CN113159086A (en) * | 2020-12-31 | 2021-07-23 | 南京太司德智能电气有限公司 | Efficient power signal description model training method |
CN113378843A (en) * | 2021-05-26 | 2021-09-10 | 递易(上海)智能科技有限公司 | Express waybill mobile phone number identification result calibration method, device and storage medium |
EP4131100A4 (en) * | 2020-03-30 | 2024-04-17 | Beijing Wodong Tianjun Information Technology Co Ltd | Method and apparatus for positioning express parcel |
CN113159086B (en) * | 2020-12-31 | 2024-04-30 | 南京太司德智能电气有限公司 | Efficient electric power signal description model training method |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120083294A1 (en) * | 2010-09-30 | 2012-04-05 | Apple Inc. | Integrated image detection and contextual commands |
CN102629351A (en) * | 2012-03-12 | 2012-08-08 | 中兴通讯股份有限公司 | Automatic communication method based on express waybill and terminal |
CN103595861A (en) * | 2013-10-23 | 2014-02-19 | 南京邮电大学 | Method for enabling terminal to identify phone number and automatically dial or send text message |
CN105809158A (en) * | 2014-12-29 | 2016-07-27 | 张继锋 | Parcel form, parcel form information identification method and parcel form information identification system |
CN106022330A (en) * | 2016-05-20 | 2016-10-12 | 广东海辰科技股份有限公司 | Information collection method and terminal of identity document |
CN107609813A (en) * | 2017-08-31 | 2018-01-19 | 中科富创(北京)科技有限公司 | A kind of express delivery automatic identification sorting system |
CN107622247A (en) * | 2017-09-26 | 2018-01-23 | 华东师范大学 | A kind of positioning of express waybill and extracting method |
WO2018120764A1 (en) * | 2016-12-31 | 2018-07-05 | 深圳有麦科技有限公司 | Method and system for querying express order by scanning code during dialling process |
CN109272266A (en) * | 2018-08-13 | 2019-01-25 | 宁波轩马信息科技有限公司 | A kind of express delivery management system and method |
-
2019
- 2019-06-14 CN CN201910513623.1A patent/CN110210488A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120083294A1 (en) * | 2010-09-30 | 2012-04-05 | Apple Inc. | Integrated image detection and contextual commands |
CN102629351A (en) * | 2012-03-12 | 2012-08-08 | 中兴通讯股份有限公司 | Automatic communication method based on express waybill and terminal |
CN103595861A (en) * | 2013-10-23 | 2014-02-19 | 南京邮电大学 | Method for enabling terminal to identify phone number and automatically dial or send text message |
CN105809158A (en) * | 2014-12-29 | 2016-07-27 | 张继锋 | Parcel form, parcel form information identification method and parcel form information identification system |
CN106022330A (en) * | 2016-05-20 | 2016-10-12 | 广东海辰科技股份有限公司 | Information collection method and terminal of identity document |
WO2018120764A1 (en) * | 2016-12-31 | 2018-07-05 | 深圳有麦科技有限公司 | Method and system for querying express order by scanning code during dialling process |
CN107609813A (en) * | 2017-08-31 | 2018-01-19 | 中科富创(北京)科技有限公司 | A kind of express delivery automatic identification sorting system |
CN107622247A (en) * | 2017-09-26 | 2018-01-23 | 华东师范大学 | A kind of positioning of express waybill and extracting method |
CN109272266A (en) * | 2018-08-13 | 2019-01-25 | 宁波轩马信息科技有限公司 | A kind of express delivery management system and method |
Non-Patent Citations (3)
Title |
---|
SAMU VOUTILAINEN: "API Examples", 《HTTPS://GITHUB.COM/TESSERACT-OCR/TESSERACT/WIKI/APIEXAMPLE》 * |
杨航: "身份证号码识别算法与研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
黑马程序员: "《解析Python网络爬虫核心技术、Scrapy框架、分布式爬虫》", 31 August 2018 * |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111144336A (en) * | 2019-12-30 | 2020-05-12 | 贵州近邻宝科技有限公司 | Automatic identification method for mobile phone number and invoice number of addressee facing to express bill |
CN111143091A (en) * | 2019-12-30 | 2020-05-12 | 贵州近邻宝科技有限公司 | Logistics distribution terminal process information synchronization system and device |
EP4131100A4 (en) * | 2020-03-30 | 2024-04-17 | Beijing Wodong Tianjun Information Technology Co Ltd | Method and apparatus for positioning express parcel |
CN111476528A (en) * | 2020-04-27 | 2020-07-31 | 上海东普信息科技有限公司 | Data processing method, device and equipment based on express delivery and storage medium |
CN111476528B (en) * | 2020-04-27 | 2023-07-11 | 上海东普信息科技有限公司 | Data processing method, device, equipment and storage medium based on express delivery library |
CN113159086A (en) * | 2020-12-31 | 2021-07-23 | 南京太司德智能电气有限公司 | Efficient power signal description model training method |
CN113159086B (en) * | 2020-12-31 | 2024-04-30 | 南京太司德智能电气有限公司 | Efficient electric power signal description model training method |
CN113378843A (en) * | 2021-05-26 | 2021-09-10 | 递易(上海)智能科技有限公司 | Express waybill mobile phone number identification result calibration method, device and storage medium |
CN113378843B (en) * | 2021-05-26 | 2024-04-19 | 递易(上海)智能科技有限公司 | Method, device and storage medium for calibrating identification result of express bill mobile phone number |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110210488A (en) | The recognition methods of bar code and cell-phone number and device on a kind of express waybill | |
JP2940936B2 (en) | Tablespace identification method | |
Gu et al. | QR code recognition based on image processing | |
US20140097246A1 (en) | Method and device for batch scanning 2d barcodes | |
US6014450A (en) | Method and apparatus for address block location | |
US6327388B1 (en) | Identification of logos from document images | |
EP2973226A1 (en) | Classifying objects in digital images captured using mobile devices | |
KR101606469B1 (en) | Method for image analysis, especially for mobile stations | |
US11151402B2 (en) | Method of character recognition in written document | |
CN109815762B (en) | Method and storage medium for remotely identifying two-dimensional code | |
WO2009094446A1 (en) | Method and apparatus for cropping images | |
US20200302135A1 (en) | Method and apparatus for localization of one-dimensional barcodes | |
US20190354756A1 (en) | Character recognition method | |
AU8746691A (en) | Character recognition methods and apparatus for locating and extracting predetermined data from a document | |
KR20010015046A (en) | Automatic Recognition of Characters on Structured Background by Combination of the Models of the Background and of the Characters | |
CN109635729B (en) | Form identification method and terminal | |
JP2004280334A (en) | Image reading device | |
CN109359497A (en) | A kind of positioning and recognition methods in VAT invoice two-dimensional image code region | |
Rahmat et al. | Android-based text recognition on receipt bill for tax sampling system | |
CN110147785A (en) | Image-recognizing method, relevant apparatus and equipment | |
Siddique et al. | Development of an automatic vehicle license plate detection and recognition system for Bangladesh | |
US6009194A (en) | Methods, systems and computer program products for analyzing information in forms using cell adjacency relationships | |
Jia et al. | Grayscale-projection based optimal character segmentation for camera-captured faint text recognition | |
CN109389000B (en) | Bar code identification method and computer applying same | |
CN112861843A (en) | Method and device for analyzing selection frame based on feature image recognition |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190906 |
|
RJ01 | Rejection of invention patent application after publication |