Intelligent quality control system for paper packaging products
By designing an intelligent quality control system for paper packaging products, using edge detection algorithms and pixel gradient value calculations, the problem of text clarity evaluation of paper packaging products is solved, and efficient and accurate quality control and inspection are achieved.
Patent Information
- Application Number
- CN202411863954.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art cannot accurately judge the clarity of text on paper packaging products such as pharmaceutical packaging paper boxes, resulting in difficulty in quality control and affecting product quality and information transmission accuracy.
Design an intelligent quality control system for paper packaging products, take paper carton images through cameras, extract text edges using edge detection algorithms, calculate pixel gradient values to evaluate text sharpness, and classify and sharpen according to clarity to achieve high-quality output.
It improves the accuracy of text image acquisition, provides objective text clarity evaluation standards, effectively screens out low-quality paper boxes, and improves the accuracy and efficiency of quality inspection.
Smart Images

Figure CN119904135A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to an intelligent quality control system for paper packaging products. Background Art
[0002] Image processing is an important technology with many advantages and beneficial effects. It can accurately analyze and process images, extract valuable information, and provide support for various applications. Through image processing technology, image enhancement, recognition, classification and other functions can be achieved to improve the quality and usability of images.
[0003] In actual application scenarios, quality control of paper packaging products such as pharmaceutical packaging cartons is crucial. However, in the current production process of paper packaging products, it is impossible to accurately judge the clarity of text by collecting, analyzing and processing the text images of paper packaging products such as pharmaceutical packaging cartons, and the problem of low text clarity will occur, which may affect the quality of the product and the accuracy of information conveyed. For example, unclear text on pharmaceutical packaging cartons may prevent consumers from accurately obtaining drug information, posing a safety hazard. In order to solve this technical problem, we provide an intelligent quality control system for paper packaging products. Summary of the invention
[0004] The purpose of the present invention is to provide an intelligent quality control system for paper packaging products to solve the problems raised in the above background technology.
[0005] In order to achieve the above-mentioned purpose, an intelligent quality control system for paper packaging products is provided, comprising:
[0006] The text extraction unit photographs the drug packaging carton through a camera to obtain a text image in the drug packaging carton, and extracts text edges in the text image through an edge detection algorithm;
[0007] The analysis and judgment unit obtains the sharpness of the text edge in the medicine packaging paper box text image by calculating the pixel gradient value of the text edge in the medicine packaging paper box text image, and calculates the text clarity in the medicine packaging paper box text image according to the sharpness of the text edge in the medicine packaging paper box text image;
[0008] The classification optimization unit classifies the drug packaging cartons according to the clarity of the text in the drug packaging carton text image to obtain a low-quality drug packaging carton image, and sharpens and monitors the text edge pixels in the low-quality drug packaging carton image in real time to obtain a high-quality drug packaging carton.
[0009] As a further improvement of the technical solution, the method of obtaining the text image in the drug packaging carton in the text extraction unit specifically includes:
[0010] The image of the medicine packaging carton captured by the camera is denoised and input into a preset text detection and recognition model, so that the text detection and recognition model recognizes each field in the image of the medicine packaging carton, the horizontal coordinate of the center point of each field, and the vertical coordinate of the center point of each field, and clusters each field according to the vertical and horizontal coordinate differences of the center point of each field, so as to obtain the text order in the medicine packaging carton, and obtain the text image in the medicine packaging carton according to the text order in the medicine packaging carton.
[0011] As a further improvement of the technical solution, the text extraction unit extracts text edges in the text image by using an edge detection algorithm, specifically including:
[0012] Use Gaussian filtering to smooth the text image and calculate the intensity gradient and direction of each pixel in the text image. Perform non-maximum suppression on the gradient amplitude of each pixel in the text image obtained by calculation to obtain the local maximum value, and set a high threshold and a low threshold. Pixels in the text image that are greater than the high threshold are recorded as strong edges, and pixels between the low threshold and the high threshold are recorded as weak edges. The strong edges and weak edges are connected to form the text edge of each character in the text image.
[0013] As a further improvement of the technical solution, the method of obtaining the sharpness of the text edge in the drug packaging paper box text image by calculating the pixel gradient value of the text edge in the drug packaging paper box text image in the analysis and judgment unit specifically includes:
[0014] The drug packaging paper box text image is converted into a grayscale image, and the sharpness of the text edge in the drug packaging paper box text image is obtained by calculating the pixel gradient value of the text edge in the drug packaging paper box text image. The specific calculation method is:
[0015] S1. Set the text image in the drug packaging carton as a two-dimensional image f(x, y), and its gradient at point (x, y) is represented by a vector: Among them G x and G y are the partial derivatives in the x-direction and y-direction respectively, and T represents the transpose;
[0016] S2, the G x and G y Substitute the formula to calculate the pixel gradient value β of the text edge. The calculation formula of the pixel gradient value of the text edge is:
[0017] S3, calculating the sharpness S of the text edge in the drug packaging paper box text image by counting the average gradient value of the text edge pixel points, the calculation formula of the sharpness of the text edge in the drug packaging paper box text image is: Where N is the total number of text edge pixels, and E is the set of text edge pixels.
[0018] As a further improvement of the technical solution, the analysis and judgment unit calculates the clarity of the text in the drug packaging carton image according to the sharpness of the text edge in the drug packaging carton image, specifically including:
[0019] The text clarity in the drug packaging paper box image is set to C. The text clarity in the drug packaging paper box image is determined by the sharpness of the text edge in the drug packaging paper box text image and the variance clarity. The calculation formula of the variance clarity is:
[0020]
[0021] Among them, S is the sharpness of the text edge in the text image of the drug packaging paper box, β is the pixel gradient value of the text edge, and the sharpness and variance clarity of the text edge in the text image of the drug packaging paper box are substituted into the formula to calculate the text clarity in the drug packaging paper box image. The specific calculation formula is:
[0022] C=ω1×C fc +ω2×S
[0023] Among them, ω1 and ω2 represent the weight coefficients of the sharpness of the text edge and the variance clarity in the text image of the medicine packaging carton, respectively, on the text clarity in the medicine packaging carton image.
[0024] As a further improvement of the technical solution, the classification optimization unit classifies the drug packaging cartons according to the clarity of the text in the drug packaging carton image, and obtains a method of low-quality drug packaging cartons, specifically including:
[0025] Extract the text image of the standard drug packaging carton from the database, analyze the text image of the standard drug packaging carton, and obtain the text clarity C of the text image of the standard drug packaging carton B , the text clarity C of the text image of the standard drug packaging carton B The text clarity threshold of the text image of the drug packaging paper box is recorded as C, and the text clarity C of the text image of the standard drug packaging paper box is calculated. B Compare and select the texts with clarity lower than C B The drug packaging carton image is recorded as a low-quality drug packaging carton image.
[0026] As a further improvement of the technical solution, the classification optimization unit performs sharpening processing on the text edge pixels in the low-quality drug packaging carton image, specifically including:
[0027] The low-quality drug packaging carton image is processed by using edge detection algorithm to obtain the edge position of the text in the low-quality drug packaging carton image, and the text edge pixels are determined according to the edge position of the text in the low-quality drug packaging carton image, and the Laplace operator is introduced to sharpen the text edge pixels;
[0028] For each pixel (x, y) in the low-quality drug packaging carton image, the Laplacian operator can be expressed as:
[0029]
[0030] Wherein, f(x, y) represents the pixel value of the image at the point (x, y). The Laplace operator is introduced to sharpen the low-quality drug packaging carton image to obtain a sharpened image g(x, y). The expression of the sharpening process is:
[0031]
[0032] Wherein, λ is a positive weight coefficient used to control the intensity of sharpening, and λ∈[0,1].
[0033] As a further improvement of the present invention, the classification optimization unit counts all low-quality pharmaceutical packaging carton images, and sorts the low-quality pharmaceutical packaging carton images according to their Laplace operator values, wherein the sorting method is from large to small, and for low-quality pharmaceutical packaging carton images with low Laplace operator values, the value of λ is increased and the clarity of the text image of the low-quality pharmaceutical packaging carton is monitored in real time until the clarity of the text image of the low-quality pharmaceutical packaging carton reaches the clarity of the text image of the standard pharmaceutical packaging carton, then the value of λ is stopped from being increased.
[0034] Compared with the prior art, the present invention has the following beneficial effects:
[0035] In an intelligent quality control system for paper packaging products, the text image in the pharmaceutical packaging carton is obtained by clustering the horizontal and vertical coordinate differences of the center points of each field in the image of the pharmaceutical packaging carton and determining the row and column sequences, and finally typeset output is used to obtain the text image in the pharmaceutical packaging carton, accurately identify each field in the pharmaceutical packaging carton image and its position information, improve the accuracy of text image acquisition, obtain the sharpness of the text edge by calculating the pixel gradient value of the text edge, and then calculate the text clarity in the pharmaceutical packaging carton text image, quantitatively evaluate the sharpness of the text edge and the clarity of the text image, provide an objective and accurate measurement standard, classify the text image of the pharmaceutical packaging carton according to its text clarity, obtain a low-quality image, and perform sharpening processing and real-time monitoring on the text edge pixels in the low-quality image to obtain a high-quality pharmaceutical packaging carton, which can effectively screen out low-quality pharmaceutical packaging cartons and improve the accuracy and efficiency of quality inspection. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is an overall block diagram of the present invention.
[0037] The meaning of each number in the figure is:
[0038] 1. Text extraction unit; 2. Analysis and judgment unit; 3. Classification and optimization unit. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] Example 1
[0041] The present invention provides an intelligent quality control system for paper packaging products. Figure 1 As shown, it includes a text extraction unit 1, an analysis and judgment unit 2, and a classification optimization unit 3;
[0042] The text extraction unit 1 photographs the medicine packaging carton through a camera to obtain a text image in the medicine packaging carton, and extracts text edges in the text image through an edge detection algorithm.
[0043] The method of obtaining the text image in the drug packaging carton in the text extraction unit 1 specifically includes:
[0044] The image of the drug packaging carton captured by the camera is subjected to denoising processing and input into a preset text detection and recognition model, so that the text detection and recognition model recognizes each field in the image of the drug packaging carton, the horizontal coordinate of the center point of each field, and the vertical coordinate of the center point of each field, and clusters each field according to the vertical and horizontal coordinate differences of the center point of each field, and obtains the text sorting in the drug packaging carton. The text image in the drug packaging carton is obtained according to the text sorting in the drug packaging carton. The text detection and recognition model can accurately identify the field position information, and the automatic determination of the text sorting is realized through clustering, which improves the accuracy and efficiency of the text image acquisition, provides an accurate text image basis for the subsequent text edge extraction and clarity analysis, and helps to more accurately evaluate the quality of the drug packaging carton;
[0045] Cluster the fields according to the difference in the ordinates of the center points of the fields, and then treat the fields in the same class as the fields in the same row. Determine the sequence of each row according to the average value of the ordinates of the center points of the fields in each row, and determine the order of each field in the corresponding row according to the abscissa of the center point of the field. This method can accurately determine the row sequence of the fields and their position in each row, making the layout of the text image more consistent with the actual text arrangement, helping to improve the readability and comprehensibility of the text image, and making subsequent processing and analysis more accurate.
[0046] The fields are clustered according to the difference in the horizontal coordinates of the center points of each field, and then the fields in the same category are taken as the fields in the same column. The sequence of each column is determined according to the average value of the horizontal coordinates of the center points of the fields in each column, and the order of each field in the corresponding row is determined according to the horizontal coordinates of the center points of the fields. Finally, typeset output is performed according to the row sequence of each row, the column sequence of each column, the order of each field in the corresponding row, and the order of each field in the corresponding column to obtain the text image in the drug packaging carton. The information of rows and columns is fully considered, and the text layout on the drug packaging carton can be restored more accurately, the accuracy of the text image can be improved, and high-quality text images are provided for subsequent text edge extraction, clarity calculation and quality classification, which is helpful to more accurately judge the quality of the drug packaging carton.
[0047] The text extraction unit 1 extracts text edges in the text image by using an edge detection algorithm, specifically including:
[0048] Use Gaussian filtering to smooth the text image and calculate the intensity gradient and direction of each pixel in the text image. Gaussian filtering can effectively remove noise and improve the accuracy of edge detection. The gradient amplitude of each pixel in the text image obtained by calculation is non-maximum suppressed to obtain the local maximum. Non-maximum suppression and threshold setting can accurately determine the edge pixels and reduce misjudgment. High and low thresholds are set. Pixels in the text image that are greater than the high threshold are recorded as strong edges, and pixels between the low and high thresholds are recorded as weak edges. The strong edges and weak edges are connected to form the text edges of each character in the text image. This method can adapt to text of different fonts and sizes, has strong versatility, and accurately extracts the text edges in the text image, providing a reliable basis for subsequent text edge sharpness calculation and clarity analysis.
[0049] The analysis and judgment unit 2 obtains the sharpness of the text edge in the medicine packaging paper box text image by calculating the pixel gradient value of the text edge in the medicine packaging paper box text image, and calculates the text clarity in the medicine packaging paper box text image according to the sharpness of the text edge in the medicine packaging paper box text image.
[0050] The method of obtaining the sharpness of the text edge in the drug packaging paper box text image by calculating the pixel gradient value of the text edge in the drug packaging paper box text image in the analysis and judgment unit 2 specifically includes:
[0051] Since grayscale images can more prominently show the characteristics of text edges and simplify the calculation process, the text image of the drug packaging carton is converted into a grayscale image, and the sharpness of the text edge in the drug packaging carton text image is obtained by calculating the pixel gradient value of the text edge in the drug packaging carton text image. The specific calculation method is:
[0052] S1. Set the text image in the drug packaging carton as a two-dimensional image f(x, y), and its gradient at the point (x, y) is represented by a vector ▽f(x, y) = [G x , G y ] T , where G x and G y are the partial derivatives in the x-direction and y-direction respectively. T is represented as the transpose. Using a vector to represent the gradient of the image at a point can accurately describe the direction and intensity of the change of the image at that point.
[0053] S2, G x and G y Substitute the formula to calculate the pixel gradient value β of the text edge. The calculation formula of the pixel gradient value of the text edge is: Quantify the degree of change in the edge of text to determine its sharpness;
[0054] S3. Calculate the sharpness S of the text edge in the text image of the drug packaging paper box by counting the average gradient value of the text edge pixel points. The calculation formula for the sharpness of the text edge in the text image of the drug packaging paper box is: Where N is the total number of text edge pixels, and E is the set of text edge pixels. Based on the calculation of pixel gradient values and average gradient values, the sharpness of text edges can be objectively evaluated, avoiding the influence of subjective factors.
[0055] The analysis and judgment unit 2 calculates the clarity of the text in the drug packaging paper box image according to the sharpness of the text edge in the drug packaging paper box image, specifically including:
[0056] Text clarity not only depends on the sharpness of the text edge, but is also related to the overall quality of the image. Variance clarity can reflect the uniformity and stability of the image. Therefore, considering the two together can provide a more comprehensive assessment of text clarity.
[0057] The text clarity in the drug packaging carton image is set to C. The text clarity in the drug packaging carton image is determined by the sharpness of the text edge in the drug packaging carton text image and the variance clarity. The calculation formula of the variance clarity is:
[0058]
[0059] Among them, S is the sharpness of the text edge in the drug packaging paper box text image, and β is the pixel gradient value of the text edge, which can more accurately judge the clarity of the text in the drug packaging paper box image. Substituting the sharpness of the text edge and the variance clarity in the drug packaging paper box text image into the formula, the text clarity in the drug packaging paper box image is calculated. The specific calculation formula is:
[0060] C=ω1×C fc +ω2×S
[0061] Among them, ω1 and ω2 represent the weight coefficients of the sharpness of the text edge in the text image of the pharmaceutical packaging carton and the influence of the variance clarity on the text clarity in the pharmaceutical packaging carton image. This formula measures the clarity of the image by calculating the variance of the pixel gradient value of the text edge. The larger the variance, the more drastic the image change and the lower the clarity.
[0062] The classification optimization unit 3 classifies the drug packaging cartons according to the clarity of the text in the drug packaging carton image, and obtains a method of obtaining a low-quality drug packaging carton, specifically including:
[0063] Extract the text image of the standard drug packaging carton from the database, analyze the text image of the standard drug packaging carton, and obtain the text clarity C of the text image of the standard drug packaging carton B, the text clarity C of the text image of the standard drug packaging carton B The text clarity threshold of the text image of the drug packaging paper box is recorded as C, and the text clarity C of the text image of the standard drug packaging paper box is calculated. B Compare and select the texts with clarity lower than C B The drug packaging carton image is recorded as a low-quality drug packaging carton image.
[0064] The classification optimization unit 3 classifies the drug packaging cartons according to the clarity of the text in the drug packaging carton text image to obtain a low-quality drug packaging carton image, and sharpens and monitors the text edge pixels in the low-quality drug packaging carton image in real time to obtain a high-quality drug packaging carton.
[0065] The classification optimization unit 3 performs sharpening processing on the edge pixels of the text in the low-quality drug packaging paper box image, specifically including:
[0066] The edge detection algorithm is used to process the low-quality drug packaging carton image to obtain the edge position of the text in the low-quality drug packaging carton image. The text edge pixels are determined according to the edge position of the text in the low-quality drug packaging carton image, and the Laplace operator is introduced to sharpen the text edge pixels. The Laplace operator is sensitive to edge information and can enhance the contrast of the text edge to make the text clearer.
[0067] For each pixel (x, y) in the low-quality drug packaging carton image, the Laplacian operator can be expressed as:
[0068]
[0069] Among them, f(x, y) represents the pixel value of the image at the point (x, y). The Laplace operator is introduced to sharpen the low-quality drug packaging carton image to obtain the sharpened image g(x, y). The expression of sharpening is:
[0070]
[0071] Among them, λ is a positive weight coefficient used to control the strength of sharpening. By adjusting the weight coefficient, the strength of sharpening can be flexibly controlled to adapt to different image quality and requirements. λ∈[0, 1] effectively improves the clarity of text in low-quality pharmaceutical packaging carton images, making them easier to recognize and read, and reducing the problem of inaccurate information transmission caused by unclear text.
[0072] The classification optimization unit 3 counts all the low-quality drug packaging carton images, and sorts the low-quality drug packaging carton images according to their Laplace operator values, in a descending order. For low-quality drug packaging carton images with low Laplace operator values, the value of λ is increased and the clarity of the text image of the low-quality drug packaging carton is monitored in real time until the clarity of the text image of the low-quality drug packaging carton reaches the clarity of the text image of the standard drug packaging carton, then the value of λ is stopped from being increased.
[0073] In the present invention, by clustering the horizontal and vertical coordinate differences of the center points of each field in the image of the medicine packaging paper box and determining the row and column sequences, the text image in the medicine packaging paper box is finally obtained by typeset output, and then the pixel gradient value of the text edge is calculated according to the text image in the medicine packaging paper box to obtain the sharpness of the text edge, and then the text clarity in the medicine packaging paper box text image is calculated, providing an objective and accurate measurement standard, and finally the medicine packaging paper box text image is classified according to the text clarity to obtain a low-quality medicine packaging paper box image, and the text edge pixels in the low-quality medicine packaging paper box image are sharpened and monitored in real time to obtain a high-quality medicine packaging paper box, effectively screen out low-quality medicine packaging paper boxes, and improve the accuracy and efficiency of quality detection.
[0074] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and descriptions are only preferred examples of the present invention and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. An intelligent quality control system for paper packaging products, characterized in that: It includes a text extraction unit (1), an analysis and judgment unit (2), and a classification optimization unit (3); The text extraction unit (1) photographs the medicine packaging carton through a camera to obtain a text image of the medicine packaging carton, and extracts text edges in the text image of the medicine packaging carton through an edge detection algorithm; The analysis and judgment unit (2) obtains the sharpness of the text edge in the drug packaging paper box text image by calculating the pixel gradient value of the text edge in the drug packaging paper box text image, and calculates the text clarity in the drug packaging paper box text image based on the sharpness of the text edge in the drug packaging paper box text image; The classification optimization unit (3) classifies the pharmaceutical packaging carton image according to the clarity of the text in the pharmaceutical packaging carton image to obtain a low-quality pharmaceutical packaging carton image, and performs sharpening processing and real-time monitoring on the text edge pixels in the low-quality pharmaceutical packaging carton image to obtain a high-quality pharmaceutical packaging carton.
2. The intelligent quality control system for paper packaging products according to claim 1, characterized in that: The method of obtaining the text image of the medicine packaging carton in the text extraction unit (1) specifically includes: The image of the medicine packaging carton captured by the camera is denoised and input into a preset text detection and recognition model, which identifies each field in the medicine packaging carton image, the horizontal coordinate of the center point of each field, and the vertical coordinate of the center point of each field, and clusters each field according to the difference between the vertical and horizontal coordinates of the center point of each field, to obtain the text order in the medicine packaging carton, and obtain the text image of the medicine packaging carton based on the text order in the medicine packaging carton.
3. The intelligent quality control system for paper packaging products according to claim 1, characterized in that: The text extraction unit (1) extracts the text edges of the text image of the drug packaging paper box by using an edge detection algorithm, specifically comprising: The Gaussian filtering algorithm is used to smooth the text image of the drug packaging paper box and calculate the intensity gradient and direction of each pixel in the text image of the drug packaging paper box, and the gradient amplitude of each pixel in the text image of the drug packaging paper box is non-maximum suppressed to obtain the local maximum value of each pixel; A high threshold and a low threshold are set, and the high threshold and the low threshold are used to distinguish the strong and weak edges of the text image of the medicine packaging paper box. Pixels in the text image of the medicine packaging paper box that are greater than the high threshold are recorded as strong edges, and pixels between the low threshold and the high threshold are recorded as weak edges. The strong edge and the weak edge of the text image of the medicine packaging paper box are connected to form the text edge of each character in the text image of the medicine packaging paper box.
4. The intelligent quality control system for paper packaging products according to claim 3 is characterized by: The method of obtaining the sharpness of the text edge in the medicine packaging paper box text image by calculating the pixel gradient value of the text edge in the medicine packaging paper box text image in the analysis and judgment unit (2) specifically includes: The drug packaging paper box text image is converted into a grayscale image, and the sharpness of the text edge in the drug packaging paper box text image is obtained by calculating the pixel gradient value of the text edge in the drug packaging paper box text image. The specific calculation method is: S1. Set the text image in the drug packaging carton as a two-dimensional image f(x, y), and its gradient at the point (x, y) is represented by a vector ▽f(x, y) = [G x , G y ] T , where G x and G y are the partial derivatives in the x-direction and y-direction respectively, and T represents the transpose; S2, the G x and G y Substitute the formula to calculate the pixel gradient value β of the text edge. The calculation formula of the pixel gradient value of the text edge is: S3, calculating the sharpness S of the text edge in the drug packaging paper box text image by counting the average gradient value of the text edge pixel points, the calculation formula of the sharpness of the text edge in the drug packaging paper box text image is: Where N is the total number of text edge pixels, and E is the set of text edge pixels.
5. The intelligent quality control system for paper packaging products according to claim 4, characterized in that: The analysis and judgment unit (2) calculates the clarity of the text in the drug packaging paper box image according to the sharpness of the text edge in the drug packaging paper box image, specifically including: The text clarity in the drug packaging paper box image is set to C. The text clarity in the drug packaging paper box image is determined by the sharpness of the text edge in the drug packaging paper box text image and the variance clarity. The calculation formula of the variance clarity is: Among them, S is the sharpness of the text edge in the text image of the drug packaging carton, and β is the pixel gradient value of the text edge; Substitute the sharpness and variance clarity of the text edge in the drug packaging carton text image into the formula to calculate the text clarity in the drug packaging carton image. The specific calculation formula is: C=ω1×C fc +ω2×S Among them, ω1 and ω2 represent the weight coefficients of the sharpness of the text edge and the variance clarity in the text image of the medicine packaging carton, respectively, on the text clarity in the medicine packaging carton image.
6. The intelligent quality control system for paper packaging products according to claim 1, characterized in that: The classification optimization unit (3) classifies the drug packaging cartons according to the clarity of the text in the drug packaging carton image to obtain a method of low-quality drug packaging cartons, specifically including: Extract the text image of the standard drug packaging carton from the database, analyze the text image of the standard drug packaging carton, and obtain the text clarity C of the text image of the standard drug packaging carton B , the text clarity C of the text image of the standard drug packaging carton B The text clarity threshold of the text image of the drug packaging paper box is recorded as C, and the text clarity C of the text image of the standard drug packaging paper box is calculated. B Compare and select the texts with clarity lower than C B The drug packaging carton image is recorded as a low-quality drug packaging carton image.
7. The intelligent quality control system for paper packaging products according to claim 3, characterized in that: The classification optimization unit (3) performs sharpening processing on the text edge pixels in the low-quality drug packaging paper box image, specifically comprising: The low-quality drug packaging carton image is processed by using edge detection algorithm to obtain the edge position of the text in the low-quality drug packaging carton image, and the text edge pixels are determined according to the edge position of the text in the low-quality drug packaging carton image, and the Laplace operator is introduced to sharpen the text edge pixels; For each pixel (x, y) in the low-quality drug packaging carton image, the Laplacian operator can be expressed as: Wherein, f(x, y) represents the pixel value of the image at the point (x, y). The Laplace operator is introduced to sharpen the low-quality drug packaging carton image to obtain a sharpened image g(x, y). The expression of the sharpening process is: g(x,y)=f(x,y)+λ▽ 2 f(x,y) Wherein, λ is a positive weight coefficient used to control the intensity of sharpening, and λ∈[0,1].
8. The intelligent quality control system for paper packaging products according to claim 3, characterized in that: The classification optimization unit (3) collects statistics on all low-quality drug packaging paper box images, and sorts the low-quality drug packaging paper box images according to their Laplace operator values, wherein the sorting method is from large to small. For low-quality drug packaging paper box images with low Laplace operator values, the value of λ is increased and the clarity of the text image of the low-quality drug packaging paper box is monitored in real time until the clarity of the text image of the low-quality drug packaging paper box reaches the clarity of the text image of the standard drug packaging paper box, and then the increase of the value of λ is stopped.