An image processing method based on logistics products

By constructing a global feature matrix and image processing model, and using the Gamma correction algorithm to correct logistics commodity images, the problem of reduced image clarity caused by environmental factors is solved and the image quality is improved.

CN117934344BActive Publication Date: 2024-10-01青岛冠成软件有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410167276.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-06
Publication Date
2024-10-01
Estimated Expiration
2044-02-06

Smart Images

  • Figure CN117934344B_ABST
    Figure CN117934344B_ABST
Patent Text Reader

Abstract

The present invention discloses an image processing method based on logistics commodities, which belongs to the field of image processing technology and includes the following steps: S1, using a handheld terminal to shoot real-time images of logistics commodities, and constructing a global feature matrix for the real-time image; S2, constructing an image processing model, inputting the global feature matrix into the image processing model, and determining a pixel correction coefficient for the real-time image; S3, correcting the real-time image according to the pixel correction coefficient to complete the image processing. The present invention discloses an image processing method based on logistics commodities, which can effectively improve the quality of real-time images of logistics commodities and ensure high clarity of images when uploaded to a database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image processing, and in particular relates to an image processing method based on logistics commodities. Background Art

[0002] With the continuous development of the economy, the buying, selling and returning of goods between different regions are becoming more and more frequent. When couriers pick up goods at the door, they usually take photos of the goods sent by users and upload them to the database for retention. This operation plays a very important role in the return and exchange process of goods, which can ensure the safety of logistics goods and ensure the safe delivery of logistics goods. However, when couriers take photos of logistics goods, the image clarity of logistics goods will be reduced due to environmental influences. Therefore, it is currently necessary to improve the quality of the images of logistics goods taken. Summary of the invention

[0003] In order to solve the above problems, the present invention proposes an image processing method based on logistics commodities.

[0004] The technical solution of the present invention is: a method for image processing based on logistics commodities comprises the following steps:

[0005] S1. Use a handheld terminal to capture real-time images of logistics products and construct a global feature matrix for the real-time images;

[0006] S2, constructing an image processing model, inputting the global feature matrix into the image processing model, and determining pixel correction coefficients for the real-time image;

[0007] S3. Correct the real-time image according to the pixel correction coefficient to complete the image processing.

[0008] Furthermore, S1 includes the following sub-steps:

[0009] S11, using a handheld terminal to capture a real-time image of the logistics commodity and extracting the contour of the real-time image;

[0010] S12, determining the contour distribution coefficient of each row according to the contour area of ​​the real-time image;

[0011] S13. Determine the global feature matrix according to the profile distribution coefficient of each row.

[0012] The beneficial effect of the above further scheme is: in the present invention, when the courier uses the handheld terminal to collect the real-time image of the logistics goods, the real-time image may have large noise and large background interference due to environmental factors, so it is necessary to extract pixel features of the area where the logistics goods are located in the real-time image, and use the results of the pixel feature extraction (i.e., the global feature matrix) to correct the real-time image. The present invention determines the contour distribution coefficient of each row in the real-time image according to the proportion of the contour area in each row, and then determines the global feature matrix according to the mean of the contour distribution coefficients of every two rows. The matrix can characterize the color of the pixels of two adjacent rows in the real-time image.

[0013] Furthermore, in S12, the profile distribution coefficient l of the mth row m The calculation formula is: , Where R i G represents the red component of the i-th pixel in the m-th row of the real-time image that does not belong to the contour area. i represents the green component of the i-th pixel in the m-th row of the real-time image that does not belong to the contour area, B i represents the blue component of the i-th pixel in the m-th row of the real-time image that does not belong to the contour area, I represents the number of pixels in the m-th row of the real-time image that do not belong to the contour area, and R j G represents the red component of the jth pixel in the mth row of the real-time image that belongs to the contour area. j represents the green component of the jth pixel in the mth row of the real-time image belonging to the contour area, B j represents the blue component of the jth pixel in the mth row of the real-time image belonging to the contour area, w j represents the color weight of the jth pixel belonging to the contour area in the mth row of the real-time image, J represents the number of pixels belonging to the contour area in the mth row of the real-time image, and max(·) represents the maximum value function.

[0014] Furthermore, in S13, the expression of the global feature matrix L is: ; In the formula, l1 represents the contour distribution coefficient of the first row, l2 represents the contour distribution coefficient of the second row, and l m represents the silhouette coefficient of the mth row, l m+1 represents the contour distribution coefficient of the m+1th row, l M-1 represents the contour distribution coefficient of the M-1th row, l M It represents the contour distribution coefficient of the Mth row, where M represents the number of pixel rows of the real-time image.

[0015] Furthermore, S2 includes the following sub-steps:

[0016] S21, performing singular value decomposition on the global feature matrix;

[0017] S22, constructing an image processing model;

[0018] S23, inputting the global feature matrix into the image processing model to obtain the global feature value of the image;

[0019] S24, generating pixel correction coefficients according to the singular values ​​of the global feature matrix and the global feature values ​​of the image.

[0020] The beneficial effect of the above further scheme is: in the present invention, the image processing model can reflect the RGB components of the pixels of the entire real-time image, and then combined with the global feature matrix, the pixel correction coefficient can be obtained for image correction.

[0021] Furthermore, in S22, the expression of the image processing model F is: Where R h Represents the red component of the hth pixel in the real-time image, G h Indicates the green component of the hth pixel in the real-time image, B h It represents the blue component of the h-th pixel in the real-time image, H represents the number of pixels in the real-time image, and L represents the global feature moment.

[0022] Furthermore, in S24, the calculation formula of the pixel correction coefficient X is: ; In the formula, f represents the global eigenvalue of the image, and γ represents the singular value of the global feature matrix.

[0023] Furthermore, in S3, the pixel correction coefficient is used as the Gamma value, and the real-time image is corrected using the Gamma correction algorithm to complete the image processing.

[0024] In the present invention, the correction process may also be: multiplying the pixel correction coefficient by the red component, green component and blue component of each pixel point respectively to obtain the red component, green component and blue component of the corrected image.

[0025] The beneficial effects of the present invention are as follows: the present invention discloses an image processing method based on logistics commodities, which analyzes and processes the RGB components of each row of pixels of the real-time image collected by a handheld terminal, obtains a contour distribution coefficient that can characterize the RGB components of each row of pixels, and determines a final global feature matrix based on the contour distribution coefficients of two adjacent rows; image correction is completed by the global feature matrix and the constructed image processing model, which can effectively improve the quality of the real-time image of the logistics commodity and ensure the high clarity of the image when uploaded to the database. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1This is a flow chart of the image processing method based on logistics products. DETAILED DESCRIPTION

[0027] The embodiments of the present invention will be further described below in conjunction with the accompanying drawings.

[0028] like Figure 1 As shown, the present invention provides an image processing method based on logistics commodities, comprising the following steps:

[0029] S1. Use a handheld terminal to capture real-time images of logistics products and construct a global feature matrix for the real-time images;

[0030] S2, constructing an image processing model, inputting the global feature matrix into the image processing model, and determining pixel correction coefficients for the real-time image;

[0031] S3. Correct the real-time image according to the pixel correction coefficient to complete the image processing.

[0032] In this embodiment of the present invention, S1 includes the following sub-steps:

[0033] S11, using a handheld terminal to capture a real-time image of the logistics commodity and extracting the contour of the real-time image;

[0034] S12, determining the contour distribution coefficient of each row according to the contour area of ​​the real-time image;

[0035] S13. Determine the global feature matrix according to the profile distribution coefficient of each row.

[0036] In the present invention, when the courier uses a handheld terminal to collect real-time images of logistics goods, the noise of the real-time images may be large due to environmental factors, and there may be large interference in the background. Therefore, it is necessary to extract pixel features of the area where the logistics goods are located in the real-time image, and use the results of the pixel feature extraction (i.e., the global feature matrix) to correct the real-time image. The present invention determines the contour distribution coefficient of each row in the real-time image based on the proportion of the contour area in each row, and then determines the global feature matrix based on the mean of the contour distribution coefficients of every two rows. The matrix can characterize the color of the pixels of two adjacent rows in the real-time image.

[0037] In the embodiment of the present invention, in S12, the profile distribution coefficient l of the mth row m The calculation formula is: , Where R i G represents the red component of the i-th pixel in the m-th row of the real-time image that does not belong to the contour area. i represents the green component of the i-th pixel in the m-th row of the real-time image that does not belong to the contour area, B irepresents the blue component of the i-th pixel in the m-th row of the real-time image that does not belong to the contour area, I represents the number of pixels in the m-th row of the real-time image that do not belong to the contour area, and R j G represents the red component of the jth pixel in the mth row of the real-time image that belongs to the contour area. j represents the green component of the jth pixel in the mth row of the real-time image belonging to the contour area, B j represents the blue component of the jth pixel in the mth row of the real-time image belonging to the contour area, w j represents the color weight of the jth pixel belonging to the contour area in the mth row of the real-time image, J represents the number of pixels belonging to the contour area in the mth row of the real-time image, and max(·) represents the maximum value function.

[0038] In the embodiment of the present invention, in S13, the expression of the global feature matrix L is: ; In the formula, l1 represents the contour distribution coefficient of the first row, l2 represents the contour distribution coefficient of the second row, and l m represents the silhouette coefficient of the mth row, l m+1 represents the contour distribution coefficient of the m+1th row, l M-1 represents the contour distribution coefficient of the M-1th row, l M It represents the contour distribution coefficient of the Mth row, where M represents the number of pixel rows of the real-time image.

[0039] In this embodiment of the present invention, S2 includes the following sub-steps:

[0040] S21, performing singular value decomposition on the global feature matrix;

[0041] S22, constructing an image processing model;

[0042] S23, inputting the global feature matrix into the image processing model to obtain the global feature value of the image;

[0043] S24, generating pixel correction coefficients according to the singular values ​​of the global feature matrix and the global feature values ​​of the image.

[0044] In the present invention, the image processing model can reflect the RGB components of the pixels of the entire real-time image, and then combined with the global feature matrix, the pixel correction coefficient can be obtained for image correction.

[0045] In the embodiment of the present invention, in S22, the expression of the image processing model F is: Where R h Represents the red component of the hth pixel in the real-time image, G h Indicates the green component of the hth pixel in the real-time image, B hIt represents the blue component of the h-th pixel in the real-time image, H represents the number of pixels in the real-time image, and L represents the global feature moment.

[0046] In the embodiment of the present invention, in S24, the calculation formula of the pixel correction coefficient X is: ; In the formula, f represents the global eigenvalue of the image, and γ represents the singular value of the global feature matrix.

[0047] In the embodiment of the present invention, in S3, the pixel correction coefficient is used as the Gamma value, and the real-time image is corrected using the Gamma correction algorithm to complete the image processing.

[0048] In the present invention, the correction process may also be: multiplying the pixel correction coefficient by the red component, green component and blue component of each pixel point respectively to obtain the red component, green component and blue component of the corrected image.

[0049] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.

Claims

1. A method for image processing based on logistics commodities, characterized in that: The following steps are involved: S1. Use a handheld terminal to capture real-time images of logistics products and construct a global feature matrix for the real-time images; S2, constructing an image processing model, inputting the global feature matrix into the image processing model, and determining pixel correction coefficients for the real-time image; S3, correcting the real-time image according to the pixel correction coefficient to complete the image processing; The S1 comprises the following sub-steps: S11, using a handheld terminal to capture a real-time image of the logistics commodity and extracting the contour of the real-time image; S12, determining the contour distribution coefficient of each row according to the contour area of ​​the real-time image; S13, determining a global feature matrix according to the profile distribution coefficient of each row; In S12, the profile distribution coefficient l of the mth row m The calculation formula is: , ; In the formula, R i G represents the red component of the i-th pixel in the m-th row of the real-time image that does not belong to the contour area. i represents the green component of the i-th pixel in the m-th row of the real-time image that does not belong to the contour area, B i represents the blue component of the i-th pixel in the m-th row of the real-time image that does not belong to the contour area, I represents the number of pixels in the m-th row of the real-time image that do not belong to the contour area, and R j G represents the red component of the jth pixel in the mth row of the real-time image that belongs to the contour area. j represents the green component of the jth pixel in the mth row of the real-time image belonging to the contour area, B j represents the blue component of the jth pixel in the mth row of the real-time image belonging to the contour area, w j represents the color weight of the jth pixel belonging to the contour area in the mth row of the real-time image, J represents the number of pixels belonging to the contour area in the mth row of the real-time image, and max(·) represents the maximum value function; In S13, the expression of the global feature matrix L is: ; In the formula, l1 represents the contour distribution coefficient of the first row, l2 represents the contour distribution coefficient of the second row, and l m represents the profile distribution coefficient of the mth row, l m+1 represents the contour distribution coefficient of the m+1th row, l M-1 represents the contour distribution coefficient of the M-1th row, l M It represents the contour distribution coefficient of the Mth row, where M represents the number of pixel rows of the real-time image.

2. The image processing method based on logistics commodities according to claim 1 is characterized in that: The S2 comprises the following sub-steps: S21, performing singular value decomposition on the global feature matrix; S22, constructing an image processing model; S23, inputting the global feature matrix into the image processing model to obtain the global feature value of the image; S24, generating pixel correction coefficients according to the singular values ​​of the global feature matrix and the global feature values ​​of the image.

3. The image processing method based on logistics commodities according to claim 2 is characterized in that: In S22, the expression of the image processing model F is: ; In the formula, R h Represents the red component of the hth pixel in the real-time image, G h Indicates the green component of the hth pixel in the real-time image, B h It represents the blue component of the h-th pixel in the real-time image, H represents the number of pixels in the real-time image, and L represents the global feature matrix.

4. The image processing method based on logistics commodities according to claim 2 is characterized in that: In S24, the calculation formula of the pixel correction coefficient X is: ; In the formula, f represents the global eigenvalue of the image, and γ represents the singular value of the global feature matrix.

5. The image processing method based on logistics commodities according to claim 1 is characterized in that: In S3, the pixel correction coefficient is used as the Gamma value, and the real-time image is corrected using the Gamma correction algorithm to complete the image processing.