Automatic sorting method for logistics express based on barcode recognition

Through automated barcode recognition technology, the use of imaging systems and deep image processing solves the problems of slow manual recognition and damaged orders in logistics express sorting, achieving efficient and accurate logistics sorting, and reducing labor costs and error rates. .

CN118321184BActive Publication Date: 2024-10-22深圳市希购科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410668008.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2024-10-22
Estimated Expiration
2044-05-28

AI Technical Summary

Technical Problem

Existing logistics express sorting technology relies on manual identification of barcodes, which is slow and inefficient, and the receipts are easily damaged, leading to identification errors and affecting sorting efficiency.

Method used

Adopt an automated sorting method for logistics express delivery based on barcode recognition, use the imaging system to collect express delivery images, and perform image processing through central processor analysis and in-depth processing, combined with HSV color space, Sobel operator, and Otsu algorithm to determine the delivery address and reduce manual dependence. and error rate.

Benefits of technology

It improves the speed and accuracy of logistics processing, reduces labor costs and error rates, improves customer satisfaction and system efficiency, and enhances the reliability of data analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118321184B_ABST
    Figure CN118321184B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of logistics express sorting, and relates to an automated logistics express sorting method based on barcode recognition. The imaging system in a conveying device is used to collect images of each express corresponding to a target batch, and the acquired images are transmitted to a central processing unit. The central processing unit performs image analysis on each express corresponding to the target batch, and determines the transmission signal of each express corresponding to the target batch based on the analysis result, thereby determining each express corresponding to the target batch to be fed into a normal conveying device, and performing deep processing on each target express corresponding to the target batch, thereby determining the final delivery address corresponding to each target express in the target batch to correspond to a branch conveying device, which can greatly reduce the dependence on manual operation, speed up logistics processing, reduce error rate, improve customer satisfaction, and also improve the ability of the automated system to handle a large number of packages, helping enterprises cope with logistics pressure during peak periods and maintain competitiveness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of logistics express sorting, and relates to an automated logistics express sorting method based on barcode recognition. Background Art

[0002] With the vigorous development of the logistics industry, barcodes are widely used in the transmission, identification, and recording of express logistics products. The old barcode identification relies more on manual labor, and is limited by old recognition technology, its own speed and other factors. The recognition speed is too slow and the work efficiency is too low.

[0003] Nowadays, most express delivery services are cross-regional express delivery, and parcels inevitably flow through multiple distribution centers, which can easily lead to the damage of the express delivery barcode and make it impossible to identify it, thus affecting normal sorting.

[0004] The traditional digital image processing method is easily affected by the environment when detecting and identifying the waybill information. At the same time, when the package circulates through multiple logistics centers, it is easy for the waybill to be damaged or corroded, which directly leads to the inability to correctly identify the sorting information. Summary of the invention

[0005] In view of the above problems existing in the prior art, the present invention provides an automated sorting method for logistics express based on barcode recognition, which is used to solve the above technical problems.

[0006] In order to achieve the above purpose and other purposes, the technical solution adopted by the present invention is as follows:

[0007] On the one hand, the present invention provides a logistics express automated sorting method based on barcode recognition, the method comprising the following steps:

[0008] Step 1: Use the imaging system in the conveying device to collect images of each express delivery corresponding to the target batch, transmit the acquired images to the central processor, and the central processor performs image analysis on each express delivery corresponding to the target batch;

[0009] Step 2: Determine the transmission signal of each express delivery corresponding to the target batch according to the analysis result, thereby determining each express delivery corresponding to the target batch to be imported into the normal conveying device, and marking it as each express delivery corresponding to the target batch;

[0010] Step 3: Perform in-depth processing on each target express delivery corresponding to the target batch, thereby determining the branch conveying device corresponding to the final delivery address of each target express delivery corresponding to the target batch.

[0011] Preferably, the image analysis is performed on each express delivery corresponding to the target batch, and the specific analysis process is as follows: S11, the image of each express delivery corresponding to the target batch is enlarged until the pixel point is displayed, and the RGB value of each pixel point in the image of each express delivery corresponding to the target batch is obtained, and the RGB value is converted to The converted RGB value of each pixel in the image of each express delivery of the target batch is obtained and recorded as , i represents the number of each express, i=1,2,...f, d represents the number of each pixel, d=1,2,...m;

[0012] S12: Obtain the maximum value of each pixel corresponding to each pixel in the image of each express delivery of the target batch Similarly, the minimum pixel value corresponding to each pixel in the image of each express delivery of the target batch is obtained ;

[0013] S13, converting the converted RGB value of each pixel in the image of each express delivery corresponding to the target batch into the HSV color space value, and the specific conversion formula is: , and obtain the brightness of each pixel in the image of each express delivery of the target batch ; Get the saturation of each pixel in the image of each express delivery of the target batch ; Get the hue of each pixel in the image of each express delivery corresponding to the target batch ;

[0014] S14, combining the brightness, saturation and hue of each pixel in the image of each express delivery corresponding to the target batch, thereby obtaining the HSV color space value of each pixel in the image of each express delivery corresponding to the target batch ;

[0015] S15. Flatten each pixel point in the image of each express delivery corresponding to the target batch, select the pixel point in the lower left corner as the origin of the rectangular coordinate system, and thereby obtain the coordinate point of each pixel point in the image of each express delivery corresponding to the target batch through the constructed rectangular coordinate system.

[0016] Preferably, based on the above scheme, the image analysis is performed on each express delivery corresponding to the target batch, and the specific analysis process further includes the following steps:

[0017] S21. Extract the lower limit value corresponding to the set HSV color space value from the encoding database and upper bound ;

[0018] S22, create a binary mask, and thereby calculate the binary mask value corresponding to each pixel in the image of each express delivery of the target batch ; The specific calculation process formula is as follows: ,in, The specific constraints are: , Indicates the mathematical symbol NOT;

[0019] The specific restrictions are: ;

[0020] The specific restrictions are: ;

[0021] The specific restrictions are: ;

[0022] in, Represents the coordinate point of the dth pixel in the image corresponding to the i-th express in the target batch, They represent the brightness, saturation and hue of the coordinate point corresponding to the d-th pixel in the image corresponding to the i-th express of the target batch;

[0023] S23, comparing the binary mask value corresponding to each pixel in the image of each express delivery corresponding to the target batch with a predefined threshold range, if the binary mask value corresponding to a pixel in the image of a certain express delivery corresponding to the target batch is within the predefined threshold range, then the pixel in the image of the express delivery corresponding to the target batch is marked as white, otherwise, the pixel in the image of the express delivery corresponding to the target batch is marked as black, thereby obtaining a grayscale image of each express delivery corresponding to the target batch;

[0024] S24. Extract the grayscale template of the three-segment code of the electronic waybill from the coding database, and use computer software to match the grayscale image of each express delivery corresponding to the target batch with the grayscale template of the three-segment code of the electronic waybill. If there is a successful matching area, the successful matching area is recorded as the reference template area of ​​each express delivery corresponding to the target batch.

[0025] Based on the above solution, it is preferred that the target batches to be merged into the normal conveying device in step 2 correspond to each express delivery, and the specific determination process is as follows:

[0026] Mark each express delivery corresponding to the target batch that has not been successfully matched with the three-segment grayscale template of the electronic waybill, and synchronously obtain the position of each express delivery corresponding to the target batch that has not been successfully matched with the three-segment grayscale template of the electronic waybill in the conveying device, send the corresponding abnormal transmission signal to the conveying device, and the conveying device will convey each express delivery corresponding to the target batch that has not been successfully matched with the three-segment grayscale template of the electronic waybill to the branch conveying device;

[0027] Each express delivery corresponding to the target batch that successfully matches the grayscale template of the three-segment code of the electronic waybill will send a corresponding normal transmission signal to the conveying device, and the conveying device will convey each express delivery corresponding to the target batch that successfully matches the grayscale template of the three-segment code of the electronic waybill to the normal conveying device, thereby determining each express delivery corresponding to the target batch to be imported into the normal conveying device.

[0028] Based on the above solution, in step 3, each target express corresponding to the target batch is subjected to in-depth processing, and the specific processing process is as follows:

[0029] The barcode area in the image of each target express corresponding to the target batch is obtained, and the edge line detection is performed on the barcode area in the image of each target express corresponding to the target batch based on the Sobel operator and the Otsu algorithm, and then the intersection points of the edge lines of the barcode area in the image of each target express corresponding to the target batch are obtained, which are , k represents the number of each target express, k=1,2,...n, and then the width and height of the barcode area in the distortion-corrected image corresponding to each target express of the target batch are determined by the vertex coordinates, as shown in the following formula: ;

[0030] ;

[0031] In the formula It represents the width and height of the barcode area in the distortion-corrected image of the kth target express in the target batch; the four vertices of the barcode area in the distortion-corrected image of each target express in the distortion-corrected target batch are derived from the original vertices. The specific derivation formula is: ; ; ; ; Thus, the coordinates of each vertex of the barcode area in the distortion-corrected image corresponding to each target express of the target batch are obtained, which are .

[0032] Preferably, based on the above scheme, the edge straight line detection is performed on the barcode area in the image corresponding to each target express of the target batch, and the specific processing process is as follows:

[0033] Extract the convolution kernel of the Sobel operator in the horizontal direction from the encoding database And the convolution kernel of the Sobel operator in the vertical direction ; Randomly select a pixel point from each pixel point in the barcode area of ​​the image corresponding to each target express of the target batch as a reference pixel point, thereby obtaining the reference pixel point of the barcode area in the image corresponding to each target express of the target batch , and obtain the grayscale value of the reference pixel point in the barcode area in the image corresponding to each target express of the target batch ;

[0034] The Sobel operator is used to calculate the gradients in the horizontal and vertical directions of the reference pixel points in the barcode area in the image corresponding to each target express delivery of the target batch;

[0035] ,in, , , , , , , , , ;

[0036] ,in , , , , , , , , ;

[0037] Thus, the horizontal and vertical gradients of the reference pixel points of the barcode area in the target batch corresponding to each target express in the image are obtained respectively. ;

[0038] Then, the gradient amplitude of the reference pixel point in the barcode area of ​​each target express image corresponding to the target batch is obtained. .

[0039] Preferably, based on the above scheme, the edge straight line detection is performed on the barcode area in the image corresponding to each target express of the target batch, and the specific processing process also includes the following steps:

[0040] Get the total number of pixels in the barcode area of ​​each target express image corresponding to the target batch , and then filter out the number and grayscale value of the foreground pixels and background pixels of the barcode area in the image corresponding to each target express of the target batch;

[0041] We further obtain the ratio of the foreground pixels and background pixels in the barcode area of ​​each target express image in the target batch to the total number of pixels, which are recorded as and ;

[0042] The grayscale values ​​of the foreground pixels in the barcode area in the corresponding images of each target express delivery of the target batch are summed and averaged to obtain the average grayscale value of the foreground pixels in the barcode area in the corresponding images of each target express delivery of the target batch. Similarly, the average grayscale value of the background pixels in the barcode area of ​​each target express image corresponding to the target batch can be obtained. ; Comprehensive analysis yields the maximum inter-class variance of the barcode area in the image corresponding to each target express delivery of the target batch ; And use the Otsu algorithm to perform binary processing on the barcode area in the image corresponding to each target express of the target batch. The specific processing formula is as follows: ,in, is the edge detection result of the barcode area in the image corresponding to the kth target express of the target batch, where the pixel with a value of 1 represents the edge and the pixel with a value of 0 represents the non-edge;

[0043] The edge detection results of each pixel point in the barcode area of ​​the image corresponding to each target express of the target batch are obtained by similar analysis, thereby detecting each edge straight line in the barcode area of ​​the image corresponding to each target express of the target batch.

[0044] Preferably, based on the above scheme, the final delivery address corresponding to each target express of the target batch corresponds to the branch conveying device, and the specific determination process is as follows:

[0045] The barcode information of each target express corresponding to the target batch is obtained from the barcode area in the distortion-corrected image of each target express corresponding to the target batch, and each code in the barcode area in the distortion-corrected image of each target express corresponding to the target batch is decoded through the coding table to determine the final delivery address of each target express corresponding to the target batch, and the final delivery address is compared with the final delivery address range corresponding to each branch conveying device to determine the branch conveying device corresponding to the final delivery address of each target express corresponding to the target batch.

[0046] Another aspect of the present invention provides a logistics express automated sorting device based on barcode recognition, characterized in that it includes an electronic device and a computer-readable storage medium;

[0047] The electronic device comprises a processor, a memory and a communication bus, wherein the memory stores a computer-readable program executable by the processor;

[0048] The communication bus realizes the connection and communication between the processor and the memory;

[0049] When the processor executes the computer-readable program, the steps in the above-mentioned automated sorting method for logistics and express delivery based on barcode recognition are implemented;

[0050] The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the above-mentioned barcode recognition-based logistics express automated sorting method.

[0051] As described above, the automated sorting method for logistics express based on barcode recognition provided by the present invention has at least the following beneficial effects:

[0052] The automated sorting method for logistics express based on barcode recognition provided by the present invention uses the imaging system in the conveying device to collect images of each express corresponding to the target batch, transmits the acquired images to the central processing unit, and the central processing unit performs image analysis on each express corresponding to the target batch, and determines the transmission signal of each express corresponding to the target batch based on the analysis result, thereby determining each express corresponding to the target batch to be fed into the normal conveying device, and performing deep processing on each target express corresponding to the target batch, thereby determining the final delivery address corresponding to each target express in the target batch to be the branch conveying device. On the one hand, it can greatly reduce the dependence on manual operation, speed up the logistics processing speed, reduce the error rate, and improve customer satisfaction. On the other hand, it can improve the ability of the automated system to handle a large number of parcels, help enterprises cope with the logistics pressure during peak periods, and maintain competitiveness. At the same time, it not only improves the efficiency and accuracy of the logistics system, reduces labor costs and error rates, but also enhances the reliability of data analysis and improves customer experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for describing the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0054] Figure 1 It is a schematic diagram of the connection of various modules of the system of the present invention.

[0055] Figure 2 It is a schematic diagram of the structure of the device shown in the present invention. DETAILED DESCRIPTION

[0056] The above contents in combination with the implementation of the present invention are merely examples and explanations of the concept of the present invention. The technical personnel in the relevant technical field may make various modifications or supplements to the specific embodiments described or replace them in a similar manner. As long as they do not deviate from the concept of the invention or exceed the scope defined by the claims, they shall all fall within the protection scope of the present invention. Example

[0057] See also Figure 1 As shown, a logistics express automated sorting method based on barcode recognition comprises the following steps:

[0058] Step 1: Use the imaging system in the conveying device to collect images of each express delivery corresponding to the target batch, transmit the acquired images to the central processor, and the central processor performs image analysis on each express delivery corresponding to the target batch;

[0059] In the preferred technical solution of the present application, the image analysis is performed on each express delivery corresponding to the target batch, and the specific analysis process is as follows:

[0060] S11, enlarge the image of each express delivery corresponding to the target batch until the pixel is displayed, and obtain the RGB value of each pixel in the image of each express delivery corresponding to the target batch, and convert it to The converted RGB value of each pixel in the image of each express delivery of the target batch is obtained and recorded as , i represents the number of each express, i=1,2,...f, d represents the number of each pixel, d=1,2,...m;

[0061] It should be added that the RGB value of each pixel in the image of each express delivery corresponding to the target batch is split into R value, G value and B value, and divided by 255 respectively to ensure that the converted RGB value of each pixel in the image of each express delivery corresponding to the target batch is within within the range.

[0062] S12: Obtain the maximum value of each pixel corresponding to each pixel in the image of each express delivery of the target batch Similarly, the minimum pixel value corresponding to each pixel in the image of each express delivery of the target batch is obtained ;

[0063] S13, converting the converted RGB value of each pixel in the image of each express delivery corresponding to the target batch into the HSV color space value, and the specific conversion formula is: , and obtain the brightness of each pixel in the image of each express delivery of the target batch ; Get the saturation of each pixel in the image of each express delivery of the target batch ; Get the color of each pixel in the image of each express delivery of the target batch ;

[0064] S14, combining the brightness, saturation and hue of each pixel in the image of each express delivery corresponding to the target batch, thereby obtaining the HSV color space value of each pixel in the image of each express delivery corresponding to the target batch ;

[0065] S15. Flatten each pixel point in the image of each express delivery corresponding to the target batch, select the pixel point in the lower left corner as the origin of the rectangular coordinate system, and thereby obtain the coordinate point of each pixel point in the image of each express delivery corresponding to the target batch through the constructed rectangular coordinate system.

[0066] In the preferred technical solution of the present application, the image analysis is performed on each express delivery corresponding to the target batch, and the specific analysis process also includes the following steps:

[0067] S21. Extract the lower limit value corresponding to the set HSV color space value from the encoding database and upper bound value and upper bound ;

[0068] S22, create a binary mask, and thereby calculate the binary mask value corresponding to each pixel in the image of each express delivery of the target batch , the specific calculation formula is as follows: ,in, The specific constraints are , Indicates the mathematical symbol NOT; The specific restrictions are: ;

[0069] The specific restrictions are: ;

[0070] The specific restrictions are: ;

[0071] in, Represents the coordinate point of the dth pixel in the image corresponding to the i-th express in the target batch, They represent the brightness, saturation and hue of the coordinate point corresponding to the d-th pixel in the image corresponding to the i-th express of the target batch;

[0072] S23, comparing the binary mask value corresponding to each pixel in the image of each express delivery corresponding to the target batch with a predefined threshold range, if the binary mask value corresponding to a pixel in the image of a certain express delivery corresponding to the target batch is within the predefined threshold range, then the pixel in the image of the express delivery corresponding to the target batch is marked as white, otherwise, the pixel in the image of the express delivery corresponding to the target batch is marked as black, thereby obtaining a grayscale image of each express delivery corresponding to the target batch;

[0073] S24. Extract the grayscale template of the three-segment code of the electronic waybill from the coding database, and use computer software to match the grayscale image of each express delivery corresponding to the target batch with the grayscale template of the three-segment code of the electronic waybill. If there is a successful matching area, the successful matching area is recorded as the reference template area of ​​each express delivery corresponding to the target batch.

[0074] It should be noted that the grayscale image of each express delivery corresponding to the target batch is matched with the grayscale template of the three-segment code of the electronic waybill using computer software. The specific operation code is as follows:

[0075] import cv2

[0076] import numpy as np

[0077] # Read the original image and template image

[0078] img = cv2.imread('image.jpg', 0) # 0 means loading as a grayscale image

[0079] template = cv2.imread('template.jpg', 0) # The template is also a grayscale image

[0080] # Get the width and height of the template

[0081] w, h = template.shape[::-1]

[0082] # Choose a matching method

[0083] method = cv2.TM_CCOEFF_NORMED

[0084] # Apply template matching

[0085] res = cv2.matchTemplate(img, template, method)

[0086] # Find the best matching position

[0087] min_val, max_val, min_loc, max_loc = cv2.minMaxLoc(res)

[0088] # If method is TM_SQDIFF or TM_SQDIFF_NORMED, the best match is the minimum value

[0089] if method in [cv2.TM_SQDIFF, cv2.TM_SQDIFF_NORMED]:

[0090] top_left = min_loc

[0091] else:

[0092] top_left = max_loc

[0093] # Calculate the lower right corner of the rectangle based on the template size

[0094] bottom_right = (top_left[0] + w, top_left[1]+ h)

[0095] # Draw a rectangle on the original image

[0096] cv2.rectangle(img, top_left, bottom_right, 255, 2)

[0097] # Display results

[0098] cv2.imshow('Matched Result', img)

[0099] cv2.imshow('Template', template)

[0100] cv2.waitKey(0)

[0101] cv2.destroyAllWindows()

[0102] Step 2: Determine the transmission signal of each express delivery corresponding to the target batch according to the analysis result, thereby determining each express delivery corresponding to the target batch to be imported into the normal conveying device, and marking it as each express delivery corresponding to the target batch;

[0103] In the preferred technical solution of the present application, the target batches to be imported into the normal conveying device in step 2 are determined to correspond to each express delivery, and the specific determination process is as follows:

[0104] Mark each express delivery corresponding to the target batch that has not been successfully matched with the three-segment grayscale template of the electronic waybill, and synchronously obtain the position of each express delivery corresponding to the target batch that has not been successfully matched with the three-segment grayscale template of the electronic waybill in the conveying device, send the corresponding abnormal transmission signal to the conveying device, and the conveying device will convey each express delivery corresponding to the target batch that has not been successfully matched with the three-segment grayscale template of the electronic waybill to the branch conveying device;

[0105] Each express delivery corresponding to the target batch that successfully matches the grayscale template of the three-segment code of the electronic waybill will send a corresponding normal transmission signal to the conveying device, and the conveying device will convey each express delivery corresponding to the target batch that successfully matches the grayscale template of the three-segment code of the electronic waybill to the normal conveying device, thereby determining each express delivery corresponding to the target batch to be imported into the normal conveying device.

[0106] Step 3: Perform in-depth processing on each target express delivery corresponding to the target batch, thereby determining the branch conveying device corresponding to the final delivery address of each target express delivery corresponding to the target batch.

[0107] In the preferred technical solution of this application, in step 3, each target express corresponding to the target batch is deeply processed, and the specific processing process is as follows:

[0108] The barcode area in the image of each target express corresponding to the target batch is obtained, and the edge line detection is performed on the barcode area in the image of each target express corresponding to the target batch based on the Sobel operator and the Otsu algorithm, and then the intersection points of the edge lines of the barcode area in the image of each target express corresponding to the target batch are obtained, which are , k represents the number of each target express, k=1,2,...n, and then the width and height of the barcode area in the distortion-corrected image corresponding to each target express of the target batch are determined by the vertex coordinates, as shown in the following formula: ; ; In the formula represents the width and height of the barcode area in the distortion-corrected image of the target batch corresponding to the kth target express;

[0109] The four vertices of the barcode area in the distortion-corrected image of each target express delivery of the target batch after distortion correction are derived from the original vertices. The specific derivation formula is: ; ; ; ; Thus, the coordinates of each vertex of the barcode area in the distortion-corrected image corresponding to each target express of the target batch are obtained, which are .

[0110] In the preferred technical solution of the present application, the edge straight line detection is performed on the barcode area in the image corresponding to each target express of the target batch, and the specific processing process is as follows:

[0111] Extract the convolution kernel of the Sobel operator in the horizontal direction from the encoding database And the convolution kernel of the Sobel operator in the vertical direction ; Randomly select a pixel point from each pixel point in the barcode area of ​​the image corresponding to each target express of the target batch as a reference pixel point, thereby obtaining the reference pixel point of the barcode area in the image corresponding to each target express of the target batch , and obtain the grayscale value of the reference pixel point of the barcode area in the image corresponding to each target express of the target batch; and use the above-mentioned Sobel operator to calculate the gradient of the reference pixel point of the barcode area in the image corresponding to each target express of the target batch respectively in the horizontal direction and the vertical direction; ,in, , , , , , , , , ;

[0112] ,in , , , , , , , , ;

[0113] Thus, the horizontal and vertical gradients of the reference pixel points of the barcode area in the target batch corresponding to each target express in the image are obtained respectively. ; and the gradient amplitude of the reference pixel point in the barcode area in the corresponding image of each target express delivery of the target batch is obtained .

[0114] In a preferred technical solution of the present application, the edge straight line detection is performed on the barcode area in the image corresponding to each target express of the target batch, and the specific processing process also includes the following steps:

[0115] Get the total number of pixels in the barcode area of ​​each target express image corresponding to the target batch , and then filter out the number and grayscale value of the foreground pixels and background pixels of the barcode area in the image corresponding to each target express of the target batch;

[0116] We further obtain the ratio of the foreground pixels and background pixels in the barcode area of ​​each target express image in the target batch to the total number of pixels, which are recorded as and ;

[0117] The grayscale values ​​of the foreground pixels in the barcode area in the corresponding images of each target express delivery of the target batch are summed and averaged to obtain the average grayscale value of the foreground pixels in the barcode area in the corresponding images of each target express delivery of the target batch. Similarly, the average grayscale value of the background pixels in the barcode area of ​​each target express image corresponding to the target batch can be obtained. ;

[0118] Comprehensive analysis shows the maximum inter-class variance of the barcode area in the image corresponding to each target express delivery of the target batch ; And use the Otsu algorithm to perform binary processing on the barcode area in the image corresponding to each target express of the target batch. The specific processing formula is as follows: ,in, is the edge detection result of the barcode area in the image corresponding to the kth target express of the target batch, where the pixel with a value of 1 represents the edge and the pixel with a value of 0 represents the non-edge;

[0119] The edge detection results of each pixel point in the barcode area of ​​the image corresponding to each target express of the target batch are obtained by similar analysis, thereby detecting each edge straight line in the barcode area of ​​the image corresponding to each target express of the target batch.

[0120] In the preferred technical solution of the present application, the final delivery address corresponding to each target express delivery of the target batch corresponds to the branch conveying device, and the specific determination process is:

[0121] The barcode information of each target express corresponding to the target batch is obtained from the barcode area in the distortion-corrected image of each target express corresponding to the target batch, and each code in the barcode area in the distortion-corrected image of each target express corresponding to the target batch is decoded through the coding table to determine the final delivery address of each target express corresponding to the target batch, and the final delivery address is compared with the final delivery address range corresponding to each branch conveying device to determine the branch conveying device corresponding to the final delivery address of each target express corresponding to the target batch.

[0122] Example 2

[0123] According to an exemplary embodiment, a logistics express automated sorting device based on barcode recognition includes: an electronic device and a computer-readable storage medium;

[0124] Figure 2It is a structural diagram of an automated sorting device for logistics and express delivery based on barcode recognition provided in an embodiment of the present application. The device may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) and one or more memories, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the above-mentioned automated sorting method for logistics and express delivery based on barcode recognition.

[0125] The electronic device comprises a processor, a memory and a communication bus, wherein the memory stores a computer-readable program executable by the processor;

[0126] The communication bus realizes the connection and communication between the processor and the memory;

[0127] The processor implements the above-mentioned automated sorting method for logistics and express delivery based on barcode recognition by calling the computer program stored in the memory and executing the computer readable program;

[0128] The computer-readable storage medium stores one or more programs. When executed on an electronic device, the one or more programs can be executed by one or more processors, providing a user input interface to implement the above-mentioned automated sorting method for logistics and express delivery based on barcode recognition.

[0129] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0130] It should be understood that determining B based on A does not mean determining B only based on A. B can also be determined based on A and / or other information.

[0131] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0132] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. The automated sorting method for logistics express based on barcode recognition is characterized in that: The method comprises the following steps: Step 1: Use the imaging system in the conveying device to collect images of each express delivery corresponding to the target batch, transmit the acquired images to the central processor, and the central processor performs image analysis on each express delivery corresponding to the target batch; Step 2: Determine the transmission signal of each express delivery corresponding to the target batch according to the analysis result, thereby determining each express delivery corresponding to the target batch to be imported into the normal conveying device, and marking it as each express delivery corresponding to the target batch; Step 3: Perform deep processing on each target express delivery corresponding to the target batch, thereby determining the branch conveying device corresponding to the final delivery address of each target express delivery corresponding to the target batch; In step 3, each target express corresponding to the target batch is deeply processed, and the specific processing process is as follows: The barcode area in the image of each target express corresponding to the target batch is obtained, and the edge line detection is performed on the barcode area in the image of each target express corresponding to the target batch based on the Sobel operator and the Otsu algorithm, and then the intersection points of the edge lines of the barcode area in the image of each target express corresponding to the target batch are obtained, which are , k represents the number of each target express, k=1,2,...n, and then the width and height of the barcode area in the distortion-corrected image corresponding to each target express of the target batch are determined by the vertex coordinates, as shown in the following formula: ; ; In the formula represents the width and height of the barcode area in the distortion-corrected image of the target batch corresponding to the kth target express; The four vertices of the barcode area in the distortion-corrected image of each target express delivery of the target batch after distortion correction are derived from the original vertices. The specific derivation formula is: ; ; ; ; Thus, the coordinates of each vertex of the barcode area in the distortion-corrected image corresponding to each target express of the target batch are obtained, which are ; The edge straight line detection is performed on the barcode area in the image of each target express delivery corresponding to the target batch, and the specific processing process is as follows: Extract the convolution kernel of the Sobel operator in the horizontal direction from the encoding database And the convolution kernel of the Sobel operator in the vertical direction ; A pixel point is randomly selected from each pixel point in the barcode area of ​​the image corresponding to each target express of the target batch as a reference pixel point, thereby obtaining a reference pixel point of the barcode area of ​​the image corresponding to each target express of the target batch , and obtain the grayscale value of the reference pixel point in the barcode area in the image corresponding to each target express of the target batch ; The Sobel operator is used to calculate the gradients in the horizontal and vertical directions of the reference pixel points in the barcode area in the image corresponding to each target express delivery of the target batch; ,in, , , , , , , , ; ,in , , , , , , , , ; Thus, the horizontal and vertical gradients of the reference pixel points of the barcode area in the target batch corresponding to each target express in the image are obtained respectively. ; Then, the gradient amplitude of the reference pixel point in the barcode area of ​​each target express image corresponding to the target batch is obtained. ; The edge straight line detection is performed on the barcode area in the image corresponding to each target express of the target batch, and the specific processing process also includes the following steps: Get the total number of pixels in the barcode area of ​​each target express image corresponding to the target batch , and then filter out the number and grayscale value of the foreground pixels and background pixels of the barcode area in the image corresponding to each target express of the target batch; We further obtain the ratio of the foreground pixels and background pixels in the barcode area of ​​each target express image in the target batch to the total number of pixels, which are recorded as and ; The grayscale values ​​of the foreground pixels in the barcode area in the corresponding images of each target express delivery of the target batch are summed and averaged to obtain the average grayscale value of the foreground pixels in the barcode area in the corresponding images of each target express delivery of the target batch. Similarly, the average grayscale value of the background pixels in the barcode area of ​​each target express image corresponding to the target batch can be obtained. ; Comprehensive analysis shows the maximum inter-class variance of the barcode area in the image corresponding to each target express delivery of the target batch ; The Otsu algorithm is used to perform binary processing on the barcode area in the image corresponding to each target express delivery of the target batch. The specific processing formula is as follows: ,in, is the edge detection result of the barcode area in the image corresponding to the kth target express of the target batch, where the pixel with a value of 1 represents the edge and the pixel with a value of 0 represents the non-edge; The edge detection results of each pixel point in the barcode area of ​​the image corresponding to each target express of the target batch are obtained by similar analysis, thereby detecting each edge straight line in the barcode area of ​​the image corresponding to each target express of the target batch.

2. The automated sorting method for express logistics based on barcode recognition according to claim 1 is characterized in that: The image analysis is performed on each express delivery corresponding to the target batch, and the specific analysis process is as follows: S11, enlarge the image of each express delivery corresponding to the target batch until the pixel is displayed, and obtain the RGB value of each pixel in the image of each express delivery corresponding to the target batch, and convert it to Within the range, the converted RGB value of each pixel in the image of each express delivery of the target batch is obtained, which is recorded as, i represents the number of each express delivery, i=1,2,...f, d represents the number of each pixel, d=1,2,...m; S12: Obtain the maximum value of each pixel corresponding to each pixel in the image of each express delivery of the target batch Similarly, the minimum pixel value corresponding to each pixel in the image of each express delivery of the target batch is obtained ; S13, converting the converted RGB value of each pixel in the image of each express delivery corresponding to the target batch into the HSV color space value, and the specific conversion formula is: , and obtain the brightness of each pixel in the image of each express delivery of the target batch ; Get the saturation of each pixel in the image of each express delivery of the target batch ; Get the hue of each pixel in the image of each express delivery corresponding to the target batch ; S14, combining the brightness, saturation and hue of each pixel in the image of each express delivery corresponding to the target batch, thereby obtaining the HSV color space value of each pixel in the image of each express delivery corresponding to the target batch ; S15. Flatten each pixel point in the image of each express delivery corresponding to the target batch, select the pixel point in the lower left corner as the origin of the rectangular coordinate system, and thereby obtain the coordinate point of each pixel point in the image of each express delivery corresponding to the target batch through the constructed rectangular coordinate system.

3. The automated sorting method for express delivery based on barcode recognition according to claim 2 is characterized in that: The image analysis of each express delivery corresponding to the target batch is performed, and the specific analysis process also includes the following steps: S21. Extract the lower limit value corresponding to the set HSV color space value from the encoding database and upper bound ; S22, create a binary mask, and thereby calculate the binary mask value corresponding to each pixel in the image of each express delivery of the target batch , the specific calculation formula is as follows: ,in, The specific constraints are , Indicates the mathematical symbol NOT; The specific restrictions are: ; The specific restrictions are: ; The specific restrictions are: ; in, Represents the coordinate point of the dth pixel in the image corresponding to the i-th express in the target batch, They represent the brightness, saturation and hue of the coordinate point corresponding to the d-th pixel in the image corresponding to the i-th express of the target batch; S23, comparing the binary mask value corresponding to each pixel in the image of each express delivery corresponding to the target batch with a predefined threshold range, if the binary mask value corresponding to a pixel in the image of a certain express delivery corresponding to the target batch is within the predefined threshold range, then the pixel in the image of the express delivery corresponding to the target batch is marked as white, otherwise, the pixel in the image of the express delivery corresponding to the target batch is marked as black, thereby obtaining a grayscale image of each express delivery corresponding to the target batch; S24. Extract the grayscale template of the three-segment code of the electronic waybill from the coding database, and use computer software to match the grayscale image of each express delivery corresponding to the target batch with the grayscale template of the three-segment code of the electronic waybill. If there is a successful matching area, the successful matching area is recorded as the reference template area of ​​each express delivery corresponding to the target batch.

4. The automated sorting method for express delivery based on barcode recognition according to claim 3 is characterized in that: In step 2, the target batches to be imported into the normal conveying device are determined to correspond to each express delivery. The specific determination process is as follows: Mark each express delivery corresponding to the target batch that has not been successfully matched with the three-segment grayscale template of the electronic waybill, and synchronously obtain the position of each express delivery corresponding to the target batch that has not been successfully matched with the three-segment grayscale template of the electronic waybill in the conveying device, send the corresponding abnormal transmission signal to the conveying device, and the conveying device will convey each express delivery corresponding to the target batch that has not been successfully matched with the three-segment grayscale template of the electronic waybill to the branch conveying device; Each express delivery corresponding to the target batch that successfully matches the grayscale template of the three-segment code of the electronic waybill will send a corresponding normal transmission signal to the conveying device, and the conveying device will convey each express delivery corresponding to the target batch that successfully matches the grayscale template of the three-segment code of the electronic waybill to the normal conveying device, thereby determining each express delivery corresponding to the target batch to be imported into the normal conveying device.

5. The automated sorting method for express logistics based on barcode recognition according to claim 1 is characterized in that: The specific process of determining the branch conveying device corresponding to the final delivery address of each target express delivery corresponding to the target batch is as follows: The barcode information of each target express corresponding to the target batch is obtained from the barcode area in the distortion-corrected image of each target express corresponding to the target batch, and each code in the barcode area in the distortion-corrected image of each target express corresponding to the target batch is decoded through the coding table to determine the final delivery address of each target express corresponding to the target batch, and the final delivery address is compared with the final delivery address range corresponding to each branch conveying device to determine the branch conveying device corresponding to the final delivery address of each target express corresponding to the target batch.

6. The automated sorting method for express logistics based on barcode recognition according to claim 1, characterized in that: The automated sorting method for express logistics based on barcode recognition is implemented by the automated sorting device for express logistics based on barcode recognition as follows: The automated sorting device for logistics and express delivery based on barcode recognition is characterized by comprising an electronic device and a computer-readable storage medium; The electronic device comprises a processor, a memory and a communication bus, wherein the memory stores a computer-readable program executable by the processor; The communication bus realizes the connection and communication between the processor and the memory; When the processor executes the computer-readable program, the steps in the automated sorting method for logistics and express delivery based on barcode recognition as described in any one of claims 1 to 5 are implemented; The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the automated sorting method for logistics and express delivery based on barcode recognition as described in any one of claims 1-5.