Method, apparatus, and storage medium for picture data processing

By segmenting and adjusting the pixel values ​​of the package waybill images, the problem of inaccurate barcode recognition on package waybills caused by complex lighting conditions was solved, thereby improving the accuracy of order identification and the efficiency of logistics operations.

CN122200726APending Publication Date: 2026-06-12BEIJING JINGDONG QIANSHITECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING JINGDONG QIANSHITECHNOLOGY CO LTD
Filing Date
2026-03-02
Publication Date
2026-06-12

Smart Images

  • Figure CN122200726A_ABST
    Figure CN122200726A_ABST
Patent Text Reader

Abstract

The application discloses a picture data processing method and device, electronic equipment and storage medium, and relates to the technical field of data processing. A specific embodiment of the method comprises: in response to an order identifier identification instruction, obtaining a package waybill picture corresponding to an order; identifying a target region in the package waybill picture, segmenting the package waybill picture, and obtaining a target picture corresponding to the target region; calculating the distribution state of the pixel value of each pixel point in the target picture, and adjusting the pixel value of each pixel point; and identifying the order identifier based on the adjusted target picture. The embodiment can solve the problem that the package waybill picture has some regions that are too dark or too exposed due to complex lighting conditions and other factors, which affects the recognition result of the package waybill barcode, reduces the recognition accuracy of the order identifier, and reduces the processing efficiency of the order logistics business.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, electronic device, and storage medium for image data processing. Background Technology

[0002] In order logistics scenarios, order packages typically have a shipping label affixed to their outer packaging. This label includes a unique barcode identifier. During the transportation and delivery of orders, the order's identity can be determined by identifying this barcode. Common technologies involve first photographing the shipping label and then using image recognition to identify the order identifier within the image. However, in many scenarios, complex lighting conditions can cause areas of the shipping label image to be too dark or overexposed, easily affecting the barcode recognition results, reducing the accuracy of order identification, and consequently decreasing the processing efficiency of order logistics operations. Summary of the Invention

[0003] In view of this, embodiments of the present invention provide a method, apparatus, electronic device, and storage medium for image data processing, which can solve the problem that some areas of the package waybill image are too dark or overexposed due to complex lighting conditions and other factors, which affects the recognition result of the package waybill barcode, reduces the recognition accuracy of order identifiers, and reduces the processing efficiency of order logistics business.

[0004] To achieve the above objectives, according to one aspect of the present invention, a method for image data processing is provided.

[0005] An image data processing method according to an embodiment of the present invention includes: in response to an order identifier recognition instruction, obtaining a package label image of the corresponding order; Identify the target region in the package waybill image, segment the package waybill image, and obtain the target image corresponding to the target region; Calculate the distribution of pixel values ​​of each pixel in the target image, and adjust the pixel values ​​of each pixel. The order identifier of the order is identified based on the adjusted target image.

[0006] In one embodiment, identifying a target region in the package waybill image and segmenting the package waybill image includes: The package label image is processed based on a preset image segmentation model to obtain the corresponding binarized image. The region in the binarized image whose mask is a preset target value is determined as the target region, and the package label image is segmented based on the target region.

[0007] In another embodiment, calculating the distribution of pixel values ​​of each pixel in the target image and adjusting the pixel values ​​of each pixel includes: Calculate the ratio between the number of pixels corresponding to each pixel value in the target image and the total number of pixels in the target image, and adjust the pixel value of each pixel in the target image based on the ratio.

[0008] In another embodiment, calculating the ratio of the number of each pixel value in the target image to the total number of pixels in the target image includes: Convert the current pixel value of each pixel in the target image into an undetermined pixel value within a preset range; Determine the number of pixels corresponding to each of the undetermined pixel values, and calculate the ratio of the number of each pixel to the total number of pixels in the target image.

[0009] In yet another embodiment, adjusting the undetermined pixel values ​​of each pixel in the target image based on the ratio includes: For each pixel in the target image, the undetermined pixel value corresponding to the pixel is determined as the target value. A set of undetermined pixel values ​​that are not greater than the target value is selected from the preset range. The undetermined pixel value is adjusted based on the sum of the ratios corresponding to each undetermined pixel value in the set of undetermined pixel values.

[0010] In yet another embodiment, calculating the ratio of the number of each pixel to the total number of pixels in the target image includes: The preset interval is divided into at least two pixel levels; For each pixel level, calculate the ratio between the number of pixels corresponding to each undetermined pixel value in the pixel level and the total number of pixels in the pixel set.

[0011] In yet another embodiment, obtaining the package label image for the corresponding order includes: Obtain the device information of the preset shooting device, generate a shooting instruction for the package label, and send it to the preset shooting device; Receive a package label image sent by the preset shooting device, wherein the package label image is captured by the preset shooting device within a preset area.

[0012] To achieve the above objectives, according to another aspect of the present invention, an apparatus for image data processing is provided.

[0013] An image data processing apparatus according to an embodiment of the present invention includes: an acquisition unit, configured to acquire a package label image of a corresponding order in response to an identification instruction of an order identifier; The segmentation unit is used to identify the target region in the package waybill image, segment the package waybill image, and obtain the target image corresponding to the target region. The adjustment unit is used to calculate the distribution of pixel values ​​of each pixel in the target image and adjust the pixel values ​​of each pixel. The identification unit is used to identify the order identifier of the order based on the adjusted target image.

[0014] In one embodiment, the segmentation unit is specifically used for: The package label image is processed based on a preset image segmentation model to obtain the corresponding binarized image. The region in the binarized image whose mask is a preset target value is determined as the target region, and the package label image is segmented based on the target region.

[0015] In yet another embodiment, the adjustment unit is specifically used for: Calculate the ratio between the number of pixels corresponding to each pixel value in the target image and the total number of pixels in the target image, and adjust the pixel value of each pixel in the target image based on the ratio.

[0016] In yet another embodiment, the adjustment unit is specifically used for: Convert the current pixel value of each pixel in the target image into an undetermined pixel value within a preset range; Determine the number of pixels corresponding to each of the undetermined pixel values, and calculate the ratio of the number of each pixel to the total number of pixels in the target image.

[0017] In yet another embodiment, the adjustment unit is specifically used for: For each pixel in the target image, the undetermined pixel value corresponding to the pixel is determined as the target value. A set of undetermined pixel values ​​that are not greater than the target value is selected from the preset range. The undetermined pixel value is adjusted based on the sum of the ratios corresponding to each undetermined pixel value in the set of undetermined pixel values.

[0018] In yet another embodiment, the adjustment unit is specifically used for: The preset interval is divided into at least two pixel levels; For each pixel level, calculate the ratio between the number of pixels corresponding to each undetermined pixel value in the pixel level and the total number of pixels in the pixel set.

[0019] In yet another embodiment, the acquisition unit is specifically used for: Obtain the device information of the preset shooting device, generate a shooting instruction for the package label, and send it to the preset shooting device; Receive a package label image sent by the preset shooting device, wherein the package label image is captured by the preset shooting device within a preset area.

[0020] To achieve the above objectives, according to another aspect of the present invention, an electronic device is provided.

[0021] An electronic device according to an embodiment of the present invention includes: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the image data processing method provided in the embodiment of the present invention.

[0022] To achieve the above objectives, according to another aspect of the present invention, a computer-readable medium is provided.

[0023] An embodiment of the present invention provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the image data processing method provided in the embodiment of the present invention.

[0024] To achieve the above objectives, according to another aspect of the present invention, a computer program product is provided.

[0025] A computer program product according to an embodiment of the present invention includes a computer program that, when executed by a processor, implements the image data processing method provided in the embodiment of the present invention.

[0026] One embodiment of the above invention has the following advantages or beneficial effects: In this embodiment of the invention, the target area to be identified in the package label image of an order can first be segmented to obtain a target image. Then, the pixel values ​​can be adjusted according to the distribution of pixel values ​​in the target image, and the order identifier can be identified based on the adjusted target image. Thus, by segmenting the area to be identified in this embodiment of the invention, interference from other areas in the package label image is avoided in adjusting and identifying the target area. Furthermore, adjusting the pixel values ​​after segmenting the target image enhances the lighting and compensates for exposure, thereby improving the accuracy of order identifier recognition and the processing efficiency of order logistics.

[0027] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description

[0028] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein: Figure 1This is a schematic diagram of a main flow of an image data processing method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of another main process of the image data processing method according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the main units of an image data processing apparatus according to an embodiment of the present invention; Figure 4 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied; Figure 5 This is a schematic diagram of the structure of a computer system suitable for implementing embodiments of the present invention. Detailed Implementation

[0029] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0030] It should be noted that, unless otherwise specified, the embodiments and features described in this invention can be combined with each other. The acquisition, transmission, storage, use, and processing of data in this application comply with relevant national laws and regulations. In the embodiments of this application, certain existing industry solutions such as software, components, and models may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solution of this application, and do not imply that the applicant has already used or necessarily used such solutions.

[0031] This invention provides an image data processing system that can be used in order logistics operations to process data from images of package labels for orders, specifically for identifying order identifiers from images of package labels for orders.

[0032] In order logistics scenarios, to facilitate the transportation and handling of packages corresponding to orders, a package label is usually affixed to the outer surface of the package. The package label may include corresponding order information, such as recipient information, sender information, and the corresponding order identification code. Therefore, identifying order identifiers through package labels is a common scenario in order logistics operations. When identifying order identifiers through package labels, an image of the package label can be obtained first, and then the order identifier can be derived from the image. In many scenarios, complex lighting conditions can cause some areas of the package label image to be too dark or overexposed, easily affecting the recognition results of the package label barcode. Therefore, in this embodiment of the invention, the area containing the order identifier can be segmented from the package label image to avoid interference from other areas in the package label image on the adjustment and recognition of the target area. Furthermore, after segmenting the target image, its pixel values ​​are adjusted to enhance the lighting and compensate for the exposure of the target image, thereby improving the accuracy of order identifier recognition and the processing efficiency of order logistics operations.

[0033] In this embodiment of the invention, the image data processing system is used for identifying order identifiers. In some application scenarios, the image data processing system can be connected to a camera device used to photograph the package label, so the image data processing system can acquire images of the package label through the camera device.

[0034] This invention provides a method for image data processing, which can be executed by an image data processing system, such as... Figure 1 As shown, the method includes the following steps.

[0035] S101: In response to the order identifier recognition command, obtain the package label image of the corresponding order.

[0036] The identification instruction refers to the command to identify the order identifier from the package label image. After receiving the identification instruction, the corresponding package label image can be retrieved first. The package label image can be pre-stored or retrieved in real time.

[0037] Specifically, in scenarios where package label images are pre-stored, the recognition instruction can include information about the package label image to be recognized, such as storage location and image identifier, so that the package label image can be retrieved based on the information in the recognition instruction. In scenarios where package label images are acquired in real time, the recognition instruction may not include package label image information. When responding to the recognition instruction, the image data processing system can first generate a shooting instruction, that is, acquire the package label image in real time through a shooting device. Specifically, this can be executed as follows: acquiring the device information of a preset shooting device to generate a package label shooting instruction and sending it to the preset shooting device; receiving the package label image sent by the preset shooting device, wherein the package label image is captured by the preset shooting device within a preset area.

[0038] The device information of the camera can be pre-stored in the image data processing system. Based on the device information, a corresponding shooting command can be generated and sent to the camera, enabling it to photograph the package waybills and obtain corresponding images. The camera can photograph package waybills within a preset area. Sales personnel can place the package waybills to be identified within the preset area. After obtaining the image of the package waybill, the camera can send it to the image data processing system.

[0039] S102: Identify the target region in the package waybill image, segment the package waybill image, and obtain the target image corresponding to the target region.

[0040] Parcel waybills typically include various information, with the order identifier code being a part of the waybill. Parcel waybill images usually include other information besides the order identifier code. In this embodiment of the invention, to avoid the influence of other information areas in the parcel waybill image on the recognition of the order identifier, the parcel waybill image can be segmented first, that is, the target area to be recognized can be segmented to obtain the corresponding target image. The target area represents the region in the parcel waybill image that includes the code corresponding to the order identifier. For example, if the code corresponding to the order identifier may include a barcode, then the target area represents the region in the parcel waybill image where the barcode corresponding to the order identifier is located. The target image is the image obtained by segmenting the target area from the parcel waybill image.

[0041] In this embodiment of the invention, the segmentation method for the package waybill image is not limited. For example, an image segmentation model can be pre-trained, and the package waybill image can be segmented using the image segmentation model to obtain the target image corresponding to the target region.

[0042] Specifically, the image segmentation model processes the package label image to obtain a binarized image. The binarized image represents a mask for each pixel of the image corresponding to a first preset value or a second preset value. The first preset value is set as the preset target value, which is the mask value corresponding to the target region. Therefore, based on the mask of each pixel in the binarized image, the region in the binarized image whose mask is the preset target value can be determined as the target region. Then, the package label image can be segmented based on the target region to obtain the target image whose mask value is the preset target value.

[0043] It should be noted that the values ​​of the first and second preset values ​​can be set according to requirements. For example, the first preset value can be set to 1 and the second preset value to 0, that is, the preset target value is 1. The image segmentation model can be a deep learning network model, such as the DeepLabv3+ network model.

[0044] In this embodiment of the invention, model training is required before using a deep learning network model for image segmentation. The method of model training is not limited; for example, it can include two parts: data collection and annotation, and model training.

[0045] Data acquisition and annotation are used to determine the sample data for model training. Deep learning-based image segmentation models typically require a large amount of data and ground truth for training. Therefore, a large number of package label images can be collected for model training. During the acquisition process, it is necessary to cover as many package label images as possible from different times, scenes, lighting conditions, and angles to improve the accuracy of model training. For the collected package label images, the coding region corresponding to the order identifier in each package label image can be labeled. This can be done using image segmentation annotation tools (such as LabelMe), outlining the coding corresponding to the order identifier. The labeled region is used as the target region, and the other regions are used as the background region. In this way, the image segmentation model obtains a binary image for segmentation, where the mask corresponding to the background region is the second preset value, and the mask corresponding to the target region is the first preset value.

[0046] Model training is used to train an image segmentation model using collected and labeled sample data. Specifically, the sample data can be randomly divided into training, validation, and test sets according to a set ratio. The initialized image segmentation model is trained using the training set, and gradient backpropagation is performed using the loss function of the model output and the ground truth to update the model parameters. The trained image segmentation model can then be tested on the validation set to verify its segmentation performance. When the model's segmentation performance on the validation set approaches saturation, training is stopped, and the model parameters are saved. Finally, the model is tested on the test set to determine its segmentation accuracy. The image segmentation model training process can be implemented using a deep learning framework.

[0047] It should be noted that, in this embodiment of the invention, after training the image segmentation model, the parameters of the best-performing model can be saved. This allows any package label image to be input into the trained image segmentation model for target region segmentation. The image segmentation model can output a binary image of the target region segmentation result, where the mask corresponding to the background region is a second preset value, and the mask corresponding to the target region is a first preset value. Because package labels may have curves or wrinkles, the target image obtained after segmentation may be a polygon.

[0048] S103: Calculate the distribution of pixel values ​​of each pixel in the target image in order to adjust the pixel values ​​of each pixel.

[0049] Due to complex lighting conditions and other factors, the target image may be too dark or overexposed, resulting in unclear images and inaccurate identification. Therefore, in this step, the pixel values ​​can be adjusted according to the pixel value distribution of the target image.

[0050] Specifically, this step can be performed as follows: calculate the ratio between the number of pixels corresponding to each pixel value in the target image and the total number of pixels in the target image, and adjust the pixel value of each pixel in the target image based on the ratio.

[0051] For each pixel in the target image, the number of pixels corresponding to each pixel value can be calculated. This number is then compared with the total number of pixels in the target image to obtain a ratio. This ratio represents the distribution of pixel values ​​in the target image, so the pixel values ​​of each pixel in the target image can be adjusted based on this ratio in this step.

[0052] In one implementation, to facilitate pixel value processing, the pixel values ​​of the target image can be converted to a pixel dimension for processing, such as converting them to a grayscale dimension. This step can be performed as follows: converting the current pixel value of each pixel in the target image into a pending pixel value within a preset range; determining the number of pixels corresponding to each pending pixel value; calculating the ratio of the number of each pixel to the total number of pixels in the target image; and adjusting the pending pixel values ​​of each pixel in the target image based on this ratio.

[0053] The preset range can be based on the value range corresponding to the pixel dimension after conversion. For example, if the pixel dimension after conversion is grayscale, the corresponding value range is 0-255, so the preset range is 0-255.

[0054] After the pixel values ​​of each pixel in the target image are converted, the corresponding undetermined pixel values ​​are obtained. Then, the number of pixels corresponding to each undetermined pixel value can be calculated. By comparing the number of each pixel with the total number of pixels in the target image, the corresponding ratio can be obtained. At this time, the ratio represents the distribution of pixel values ​​after the pixel dimension is converted.

[0055] Furthermore, after obtaining the ratio, the pixel value adjustment can be specifically performed as follows: for each undetermined pixel value, the undetermined pixel value is determined as the target value, a set of undetermined pixel values ​​not greater than the target value is selected from the preset range, and the undetermined pixel value is adjusted based on the sum of the ratios corresponding to each undetermined pixel value in the set of undetermined pixel values.

[0056] Each undetermined pixel value within the preset range corresponds to a ratio, and based on this ratio, the undetermined pixel values ​​corresponding to each pixel in the target image can be adjusted sequentially.

[0057] For each pixel, there is a corresponding undetermined pixel value and its corresponding ratio. In this step, when adjusting each pixel, the undetermined pixel value corresponding to that pixel can be determined as the target value. A set of undetermined pixel values ​​not greater than the target value is selected from a preset range. The ratios corresponding to each undetermined pixel value in this set are summed. This summed value is then multiplied by the maximum value of the undetermined pixel values ​​in the preset range to obtain the adjusted pixel value for that pixel. After obtaining the adjusted pixel value for each pixel, the overall adjusted pixel value of the target image can be obtained.

[0058] In another implementation, since there are a large number of undetermined pixel values ​​within the preset interval, the undetermined pixel values ​​can be divided into levels for easier calculation. That is, the preset interval can be divided into at least two pixel levels, and then the corresponding ratio can be calculated using the pixel levels as the dimension. Specifically, this can be done by: dividing the preset interval into at least two pixel sets; for each pixel set, calculating the ratio between the number of pixels corresponding to each undetermined pixel value in the pixel set and the total number of pixels corresponding to that pixel set.

[0059] Based on this, for each pixel in the target image, its corresponding pixel level and the ratio corresponding to that pixel level can be determined. This pixel level is then set as the target value. A set of pixel levels not exceeding the target value is selected from a preset range. The pixel level of each pixel is adjusted based on the sum of the ratios corresponding to each pixel level in this set. After adjusting the pixel level of each pixel, subsequent processing can be performed on the adjusted target image.

[0060] Taking the converted pixel dimension as grayscale as an example, the preset range is 0-255, with a maximum value of 255. The pixel levels are represented as follows: ,in The adjusted pixel level is represented as follows: The calculation formula is shown below.

[0061]

[0062] In the above formula, The total number of pixels in the target image. This represents the number of pixels corresponding to the j-th gray level.

[0063] It should be noted that the calculation process is simplified in the embodiments of the present invention, and the results can be obtained by... Evidence is then collected, and rounding can be used to obtain the integer value. In this embodiment of the invention, the method of adjusting pixel values ​​is not limited; for example, histogram equalization algorithms can be used.

[0064] S104: Identify the order identifier based on the adjusted target image.

[0065] For the adjusted target image, various methods can be used for order recognition, such as machine learning algorithms, neural network algorithms, etc.

[0066] In this embodiment of the invention, the target area to be identified in the package label image of an order can first be segmented to obtain a target image. Then, the pixel values ​​can be adjusted according to the distribution of pixel values ​​in the target image, and the order identifier can be identified based on the adjusted target image. Thus, by segmenting the area to be identified in this embodiment of the invention, interference from other areas in the package label image is avoided in adjusting and identifying the target area. Furthermore, adjusting the pixel values ​​after segmenting the target image enhances the lighting and compensates for exposure, thereby improving the accuracy of order identifier recognition and the processing efficiency of order logistics.

[0067] The following is combined Figure 1 The illustrated embodiments provide a detailed description of the image data processing method in this invention, such as... Figure 2 As shown, the method includes the following steps.

[0068] S201: In response to the order identifier identification command, obtain the package label image of the corresponding order.

[0069] S202: Process the package label image based on the preset image segmentation model to obtain the corresponding binarized image.

[0070] S203: Determine the target region as the area in the binarized image whose mask is a preset target value, and segment the package label image based on the target region.

[0071] S204: Calculate the ratio between the number of pixels corresponding to each pixel value in the target image and the total number of pixels in the target image.

[0072] S205: Adjust the pixel values ​​of each pixel in the target image based on the ratio.

[0073] S206: Identify the order identifier based on the adjusted target image.

[0074] It should be noted that the data processing principle in the embodiments of the present invention is the same as... Figure 1 The data processing principles in the illustrated embodiments are the same and will not be repeated here.

[0075] To address the problems existing in the prior art, embodiments of the present invention provide an image data processing apparatus 300, such as... Figure 3 As shown, the device 300 includes: an acquisition unit 301, used to acquire a package label image of the corresponding order in response to an identification command of the order identifier; Segmentation unit 302 is used to identify the target region in the package waybill image, segment the package waybill image, and obtain the target image corresponding to the target region; The adjustment unit 303 is used to calculate the distribution of pixel values ​​of each pixel in the target image and adjust the pixel values ​​of each pixel. The identification unit 304 is used to identify the order identifier of the order based on the adjusted target image.

[0076] It should be understood that the manner in which embodiments of the present invention are implemented is different from the implementation method. Figure 1 The embodiments shown are the same and will not be described again here.

[0077] In one embodiment, the segmentation unit 302 is specifically used for: The package label image is processed based on a preset image segmentation model to obtain the corresponding binarized image. The region in the binarized image whose mask is a preset target value is determined as the target region, and the package label image is segmented based on the target region.

[0078] In yet another embodiment, the adjustment unit 303 is specifically used for: Calculate the ratio between the number of pixels corresponding to each pixel value in the target image and the total number of pixels in the target image, and adjust the pixel value of each pixel in the target image based on the ratio.

[0079] In yet another embodiment, the adjustment unit 303 is specifically used for: Convert the current pixel value of each pixel in the target image into an undetermined pixel value within a preset range; Determine the number of pixels corresponding to each of the undetermined pixel values, and calculate the ratio of the number of each pixel to the total number of pixels in the target image.

[0080] In yet another embodiment, the adjustment unit 303 is specifically used for: For each pixel in the target image, the undetermined pixel value corresponding to the pixel is determined as the target value. A set of undetermined pixel values ​​that are not greater than the target value is selected from the preset range. The undetermined pixel value is adjusted based on the sum of the ratios corresponding to each undetermined pixel value in the set of undetermined pixel values.

[0081] In yet another embodiment, the adjustment unit 303 is specifically used for: The preset interval is divided into at least two pixel levels; For each pixel level, calculate the ratio between the number of pixels corresponding to each undetermined pixel value in the pixel level and the total number of pixels in the pixel set.

[0082] In yet another embodiment, the acquisition unit 301 is specifically used for: Obtain the device information of the preset shooting device, generate a shooting instruction for the package label, and send it to the preset shooting device; The system receives a package label image sent by the preset shooting device, wherein the package label image is captured by the preset shooting device within a preset area.

[0083] It should be understood that the manner in which embodiments of the present invention are implemented is different from the implementation method. Figure 1 , 2 The embodiments shown are the same and will not be described again here.

[0084] In this embodiment of the invention, the target area to be identified in the package label image of an order can first be segmented to obtain a target image. Then, the pixel values ​​can be adjusted according to the distribution of pixel values ​​in the target image, and the order identifier can be identified based on the adjusted target image. Thus, by segmenting the area to be identified in this embodiment of the invention, interference from other areas in the package label image is avoided in adjusting and identifying the target area. Furthermore, adjusting the pixel values ​​after segmenting the target image enhances the lighting and compensates for exposure, thereby improving the accuracy of order identifier recognition and the processing efficiency of order logistics.

[0085] According to embodiments of the present invention, an electronic device and a readable storage medium are also provided.

[0086] An electronic device according to an embodiment of the present invention includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the image data processing method provided in the embodiment of the present invention.

[0087] Figure 4 An exemplary system architecture 400 is shown, in which the image data processing method or apparatus of the present invention can be applied.

[0088] like Figure 4 As shown, system architecture 400 may include terminal devices 401, 402, and 403, a network 404, and a server 405. Network 404 serves as the medium for providing communication links between terminal devices 401, 402, and 403 and server 405. Network 404 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0089] Users can use terminal devices 401, 402, and 403 to interact with server 405 via network 404 to receive or send messages, etc. Various client applications can be installed on terminal devices 401, 402, and 403.

[0090] Terminal devices 401, 402, and 403 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0091] Server 405 can be a server that provides various services. The server can analyze and process data such as received product information query requests, and feed back the processing results (such as product information - just an example) to the terminal device.

[0092] It should be noted that the image data processing method provided in the embodiments of the present invention is generally executed by server 405, and correspondingly, the image data processing device is generally located in server 405.

[0093] It should be understood that Figure 4 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0094] The following is for reference. Figure 5 It shows a schematic diagram of the structure of a computer system 500 suitable for implementing embodiments of the present invention. Figure 5 The computer system shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0095] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 502 or programs loaded from storage section 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the system 500. The CPU 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0096] The following components are connected to I / O interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to I / O interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 510 as needed so that computer programs read from it can be installed into storage section 508 as needed.

[0097] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by central processing unit (CPU) 501, it performs the functions defined above in the system of this invention.

[0098] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0099] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a unit, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0100] The units described in the embodiments of the present invention can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor can be described as including an acquisition unit, a segmentation unit, an adjustment unit, and an identification unit. The names of these units do not necessarily limit the specific unit; for example, an acquisition unit can also be described as a "unit for acquiring functions."

[0101] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs that, when executed by the device, cause the device to perform the image data processing method provided by the present invention.

[0102] In another aspect, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the image data processing method provided in the embodiments of the present invention.

[0103] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for image data processing, characterized in that, include: In response to the order identifier recognition command, obtain the package label image of the corresponding order; Identify the target region in the package waybill image, segment the package waybill image, and obtain the target image corresponding to the target region; Calculate the distribution of pixel values ​​of each pixel in the target image, and adjust the pixel values ​​of each pixel. The order identifier of the order is identified based on the adjusted target image.

2. The method according to claim 1, characterized in that, Identifying target regions in the package waybill image and segmenting the package waybill image includes: The package label image is processed based on a preset image segmentation model to obtain the corresponding binarized image. The region in the binarized image whose mask is a preset target value is determined as the target region, and the package label image is segmented based on the target region.

3. The method according to claim 1, characterized in that, Calculate the distribution of pixel values ​​of each pixel in the target image, and adjust the pixel values ​​of each pixel, including: Calculate the ratio between the number of pixels corresponding to each pixel value in the target image and the total number of pixels in the target image, and adjust the pixel value of each pixel in the target image based on the ratio.

4. The method according to claim 3, characterized in that, Calculating the ratio of the number of each pixel value in the target image to the total number of pixels in the target image includes: Convert the current pixel value of each pixel in the target image into an undetermined pixel value within a preset range; Determine the number of pixels corresponding to each of the undetermined pixel values, and calculate the ratio of the number of each pixel to the total number of pixels in the target image.

5. The method according to claim 4, characterized in that, Adjusting the undetermined pixel values ​​of each pixel in the target image based on the ratio includes: For each pixel in the target image, the undetermined pixel value corresponding to the pixel is determined as the target value. A set of undetermined pixel values ​​that are not greater than the target value is selected from the preset range. The undetermined pixel value is adjusted based on the sum of the ratios corresponding to each undetermined pixel value in the set of undetermined pixel values.

6. The method according to claim 3, characterized in that, Calculating the ratio of the number of each pixel to the total number of pixels in the target image includes: The preset interval is divided into at least two pixel levels; For each pixel level, calculate the ratio between the number of pixels corresponding to each undetermined pixel value in the pixel level and the total number of pixels in the pixel set.

7. The method according to claim 1, characterized in that, Obtain the package label image for the corresponding order, including: Obtain the device information of the preset shooting device, generate a shooting instruction for the package label, and send it to the preset shooting device; Receive a package label image sent by the preset shooting device, wherein the package label image is captured by the preset shooting device within a preset area.

8. An apparatus for image data processing, characterized in that, include: The acquisition unit is used to acquire the package label image of the corresponding order in response to the identification command of the order identifier; The segmentation unit is used to identify the target region in the package waybill image, segment the package waybill image, and obtain the target image corresponding to the target region. The adjustment unit is used to calculate the distribution of pixel values ​​of each pixel in the target image and adjust the pixel values ​​of each pixel. The identification unit is used to identify the order identifier of the order based on the adjusted target image.

9. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.

10. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.

11. A computer program product, comprising a computer program, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.