Ground calcium carbonate packaging quality detection method based on visual detection

By adaptively calculating the detection angle and selecting ambient light, an image difference matrix is ​​obtained, shadows and brightness gradients are identified, a dust thickness model is constructed, and a convolutional neural network is used to solve the problems of surface changes and environmental interference in the detection of heavy calcium carbonate packaging, thus achieving high-precision and comprehensive packaging quality assessment.

CN121437409APending Publication Date: 2026-01-30JIANGXI LONGHE NEW MATERIAL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511514324.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-22
Publication Date
2026-01-30

Smart Images

  • Figure CN121437409A_ABST
    Figure CN121437409A_ABST
Patent Text Reader

Abstract

The invention provides a heavy calcium carbonate packaging quality detection method based on visual inspection, and relates to the technical field of heavy calcium carbonate packaging quality detection.The method comprises the steps that a low-dust detection angle and a high-dust detection angle are calculated according to the radian angle range of a packaging bag; the method comprises the following steps: acquiring pixel difference matrixes of in-bag areas of two images with high and low dust detection angles, performing shadow and brightness gradient identification on the in-bag areas according to the pixel difference matrixes, dividing brightness areas, and calculating the identification thickness of dust in each area according to the brightness of each brightness area, the method comprises the following steps: acquiring environmental parameters of a package detection area, calculating the thickness, position and quantity of different brightness areas of a bag-in-bag area, calculating a quality evaluation value of the bag-in-bag area, establishing a visual detection model, calculating a quality evaluation value of a bag end area, calculating a package quality score according to the quality evaluation value of the bag-in-bag area, and identifying the package quality.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of heavy calcium carbonate packaging quality detection, in particular to a heavy calcium carbonate packaging quality detection method based on visual detection. BACKGROUND

[0002] In the industrialized packaging production of heavy calcium carbonate, the quality of the packaging bag is directly related to the storage, transportation and final use experience of the product. At present, the visual-based packaging quality detection technology has been preliminarily applied in the industrial field, but for heavy calcium carbonate and other materials that are easy to produce dust and change in packaging form, the existing technology still has obvious limitations. Among them, most detection systems use fixed-angle light source and camera layout, which is difficult to adapt to the changes in the curved surface of the packaging bag caused by different filling amounts and stacking pressures, and is easy to form highlights or shadows in the image, which can cover up the real defects. In addition, the traditional image processing method is difficult to distinguish between dust attached to the bag surface and background interference such as wrinkles and printed patterns on the packaging bag, and it is also impossible to quantify the attachment state of the dust, resulting in high false detection and missed detection rates. In addition, the existing method usually separates the dust on the bag surface and the sealing quality of the bag mouth for processing, lacks a unified evaluation system for the overall quality of the packaging, and the sealing detection relies mainly on manual inspection or simple binary recognition, which cannot effectively distinguish complex defect types such as leakage, inclusion and wrinkles. The influence of environmental light changes, workshop dust concentration and temperature on the stability of the detection has not been fully considered, resulting in insufficient system robustness. Therefore, the industry urgently needs a detection method that can adapt to complex industrial environments, accurately distinguish and quantify various defects, and make a comprehensive and intelligent judgment on the packaging quality.

[0003] The above information disclosed in the background section is only used to enhance the understanding of the background of the present disclosure, and therefore it can include information that does not constitute prior art known to those of ordinary skill in the art. SUMMARY

[0004] The present application aims to provide a heavy calcium carbonate packaging quality detection method based on visual detection to solve the problems raised in the background.

[0005] To achieve the above-mentioned purpose, the present application provides the following technical solutions: A heavy calcium carbonate packaging quality detection method based on visual detection, the specific steps comprising: Step 1: Obtain the packaging curvature of the packaging bag of the historically packaged heavy calcium carbonate, select the curvature angle range of the packaging bag according to the normal distribution of the packaging curvature, calculate the low-dust detection angle and the high-dust detection angle according to the curvature angle range, and select the illumination light type and illumination brightness according to the environment light; Step 2: irradiate the packaging bag according to the low-dust detection angle and the high-dust detection angle respectively, obtain the detection images of the packaging bag under high-angle and low-angle irradiation, and crop the detection images to generate the middle-bag region and the end-bag region, and then preprocess the middle-bag region of the detection image to obtain the pixel difference matrix of the two images under high and low dust detection angles; Step 3: construct a pixel difference histogram based on the pixel difference values in the pixel difference matrix, identify the shadow and brightness gradient of the middle-bag region, and divide the brightness region, calculate the identified thickness of the dust in each brightness region according to the brightness of each brightness region; Step 4: obtain the environmental parameters of the packaging detection region, calculate the dust thickness attached to the packaging bag by constructing a dust attachment model, calculate the scattering thickness according to the attachment thickness and the identified thickness, and calculate the quality evaluation value of the middle-bag region according to the thickness and position and number of different brightness regions in the middle-bag region; Step 5: according to the detection images of the high and low dust detection angles, identify the sealing quality type of the top region by establishing a visual detection model, calculate the quality evaluation value of the end-bag region, and calculate the packaging quality score according to the quality evaluation value of the end-bag region and the quality evaluation value of the middle-bag region to identify the packaging quality.

[0006] Further, the specific method for selecting the range of the arc angle of the packaging bag according to the range of the arc angle is as follows: Obtain the width of the packaging bag before packaging and the theoretical thickness after packaging Take the horizontal cross section of the center point of the packaging bag as the reference surface, and select two points on both sides of the center point of the packaging bag after packaging, at a distance of from the center point, and the absolute value of the included angle between the connecting line of the detection points of any two vectors and the horizontal line is the packaging arc; Statistically analyze the normal distribution range of the packaging arc of the historical packaging bag, select the packaging arc within the normal distribution , and the sum of the selected packaging arc and the set packaging arc threshold angle is the low-dust detection angle, wherein, is the mean of the packaging arc, is the standard deviation of the packaging arc; The complementary angle of the mean of the arc angle is the high-dust detection angle.

[0007] Further, the method for selecting the irradiation light type and the light intensity according to the ambient light is as follows: According to the same time interval, statistically analyze the spectral band of the calcium carbonate packaging quality detection place, and take the band with the least spectral band as the irradiation light type; In a dust-free environment, the brightness of the light reflected from the high dust detection angle to the camera is adjusted to be the same as that from the low dust detection angle.

[0008] Furthermore, the method for cropping the detected image to generate the bag center and bag end regions is as follows: The SIFT feature extraction algorithm is used to extract key points and key point feature descriptors from two images. Key point matching is performed using the feature descriptors. The RANSAC algorithm is used to remove erroneous matching points, retaining only the most reliable pair of matching points. The geometric transformation matrix of the two images is calculated using the matching point pairs. Perspective transformation is performed on the detection image with a low dust detection angle to transform it to a viewpoint that is completely aligned with the detection image with a high dust detection angle. Gaussian filtering is used to filter the detection image of the high dust detection angle to reduce image noise. The filtered high dust detection angle detection image is then converted into a binary image using a binarization algorithm. On the binary image, a contour search algorithm is used to find the largest outer contour. Based on the size of the packaging bag, a cropping ratio is set, and the aligned high dust detection angle detection image is cropped according to the cropping ratio to obtain the upper, middle, and lower areas of the bag. The upper and lower areas of the bag are the bag end areas.

[0009] Furthermore, the specific method for obtaining the pixel difference matrix of the two images at high and low dust detection angles after preprocessing the bag region of the detection image is as follows: The method for preprocessing the bag region of the detected image is to convert it to grayscale and then assign weights to the R, G, and B channels based on the values ​​of the pixels. Calculate the grayscale value by setting the proportion of the wavelength of the illumination light in the R, G, and B channels. The weights; The converted grayscale values ​​are normalized by maximum normalization. A pixel matrix is ​​generated based on the normalized grayscale values, using pixels as matrix elements. The pixel difference matrix between the two images is calculated based on the converted pixel matrices of the two images of the bag region at high and low dust detection angles.

[0010] Furthermore, the specific method for identifying shadows and brightness gradients in the bag area and dividing the brightness region is as follows: The pixel difference values ​​in the pixel difference matrix are statistically analyzed. The x-axis is set according to the order of pixel difference values ​​from smallest to largest, and the y-axis is set to the number of identical pixel difference values. A pixel difference histogram is constructed. The vertices of the histogram are connected to form a continuous curve. The first valley point is selected as the shadow segmentation value in the direction of pixel difference value from smallest to largest. Pixel difference values ​​smaller than the shadow segmentation value are all regarded as shadow pixels. The area of ​​the shadow region is calculated based on the position of the shadow pixels and compared with the shadow judgment threshold. The shadow region with a value greater than the shadow judgment threshold is judged as the shadow region. Remove the pixel difference values ​​that are identified as shadows in the pixel difference histogram. Connect the vertices of the pixel difference histogram to form a continuous curve. Use the pixel difference value at the valley as the brightness gradient boundary value. Use the pixel difference value between two brightness gradient boundaries as the brightness gradient. The area formed by the pixels corresponding to the brightness gradient is the brightness area.

[0011] Furthermore, the method for calculating the identification thickness of dust in each region based on the brightness of each region is as follows: The average brightness of each brightness region is calculated based on the pixel difference value and the number of pixel differences in each brightness gradient region. The dust thickness is then calculated by establishing a brightness-dust thickness model. The brightness and dust thickness model is as follows: in, For dust identification thickness, The light attenuation coefficient is... For maximum reflection difference, This represents the average brightness.

[0012] Furthermore, the environmental parameters include ambient temperature and dust concentration; The specific mathematical formula for the dust adhesion model is as follows: in, The thickness of the dust particles adhering to the surface. The substrate constant is the adhesion constant. Dust concentration, Concentration index For activation energy, Boltzmann's constant, For ambient temperature, The thickness of the packaging spillage is obtained by the difference between the thickness of the attached dust and the thickness of the identification.

[0013] Furthermore, the quality assessment value of the area in the bag is calculated by the difference between the amount of dust spilled from the bag and the dust distribution gradient. The amount of spillage from the bag is calculated by summing the thickness and area of ​​each brightness region. Dust distribution gradient difference is calculated by calculating the thickness gradient difference between each brightness region and its adjacent brightness regions, calculating the cumulative gradient difference of brightness regions based on the number of adjacent brightness regions and the thickness gradient difference, and calculating the dust distribution gradient difference based on the number of regions and the cumulative gradient difference of regions. The weighted allocation method is used to calculate the quality assessment value of the area in the bag by summing the weights assigned to the bag spillage amount, the number of shaded areas, and the dust distribution gradient difference.

[0014] Furthermore, the sealing quality types include leaky seals, leaking seals, seal inclusions, and seal wrinkles; The visual detection model is based on a convolutional neural network, and specifically includes the establishment and training of the visual detection model: The visual detection model consists of an input layer, a convolutional layer, a pooling layer, a fully connected layer, and an output layer. The training process for a visual detection model is as follows: The bag end region generated by cropping the detection images under high-angle and low-angle illumination is used as the input image of the visual detection model, and the sealing quality type is used as the output of the model. The model is trained by using historical input images as input and the sealing quality type on the historical input images as the output of the model. The visual detection model is then trained by using real-time acquired input images as input and detecting the sealing quality type on the real-time input images. The method for identifying packaging quality by calculating a packaging quality score based on the quality assessment values ​​of the bag end area and the bag middle area is as follows: The sealing quality type is assigned a value, and the detected sealing quality type and corresponding amplitude are cumulatively measured to obtain the quality assessment value of the bag end area. The packaging quality score is obtained by summing the quality assessment values ​​of the bag end and the bag center area, and the packaging quality is judged based on the packaging quality score.

[0015] Compared with the prior art, the beneficial effects of the present invention are: This invention calculates low-dust detection angles and high-dust detection angles based on the curvature angle range of the packaging bag. After preprocessing the detection images, it obtains the pixel difference matrix of the bag region in two images with high and low dust detection angles. Based on the pixel difference matrix, it performs shadow and brightness gradient recognition on the bag region and divides the brightness region. Based on the brightness of each brightness region, it calculates the dust recognition thickness of each region. It obtains the environmental parameters of the packaging detection area to calculate the thickness, position, and quantity of different brightness regions in the bag region and calculates the quality assessment value of the bag region. By establishing a visual detection model, it calculates the quality assessment value of the bag end region and calculates the packaging quality score with the bag region quality assessment value to identify the packaging quality. This invention adaptively calculates the optimal low-dust and high-dust detection angles by analyzing the normal distribution of historical packaging curvature, and intelligently selects illumination parameters based on ambient light, ensuring the stability and high contrast of image acquisition from the source, providing high-quality input for subsequent processing. By acquiring images using dual-angle illumination and generating a pixel difference matrix after registration, the dust signal is significantly highlighted while suppressing background interference. Furthermore, through histogram statistical analysis combined with a physical optics model, the invention achieves, for the first time, accurate identification and quantification of dust thickness, and can scientifically distinguish between stably attached dust and easily scattered dust, greatly improving the accuracy and scientific rigor of dust detection. By introducing environmental parameters and constructing a dust adhesion model, the detection results possess good environmental robustness. Furthermore, convolutional neural networks were used to identify the sealed area at the bag end, enabling high-precision classification of complex defects such as leaks and inclusions. The bag end sealing quality and the dust condition inside the bag were integrated into a comprehensive packaging quality score through a weighted scoring method. This achieved all-round, automated, and intelligent quality inspection and grading of heavy calcium carbonate packaging, from "microscopic dust measurement" to "macroscopic seal judgment". This significantly reduced labor costs, improved inspection efficiency and reliability, and provided strong data support for quality control and process improvement on the production line. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of the overall method flow of the present invention; Figure 2 This is a schematic diagram showing the difference in grayscale values ​​of the detection images under high and low angle illumination in this invention. Figure 3 This is a schematic diagram illustrating the selection of valley values ​​using a histogram in this invention; Figure 4 This is a schematic diagram illustrating the division of brightness regions in this invention. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.

[0018] It should be noted that, unless otherwise defined, the technical or scientific terms used in this invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0019] Example: Please see Figures 1-4 The present invention provides a technical solution: A visual inspection-based method for quality detection of heavy calcium carbonate packaging, comprising the following steps: Step 1: Obtain the curvature of the packaging bags of historically packaged heavy calcium carbonate. Based on the normal distribution of the packaging curvature, select the curvature angle range of the packaging bag. Calculate the low dust detection angle and high dust detection angle based on the curvature angle range, and select the type and intensity of illumination light according to the ambient light.

[0020] Through a data-driven adaptive preprocessing mechanism, the reliability and accuracy of subsequent visual inspection are fundamentally improved. Compared with existing technologies that typically use fixed detection angles and illumination parameters, this solution achieves a paradigm shift from "passively adapting to the environment" to "actively optimizing the environment." Existing technologies often ignore the morphological changes of packaging bags due to different filling volumes and stacking pressures. Directly using preset angles for illumination can easily produce bright spots or shadows on curved surfaces, masking real defects. At the same time, ambient light interference introduces noise, reducing the detection signal-to-noise ratio. This step analyzes the normal distribution of historical packaging curvature to scientifically define the curvature range of most packaging bags. Based on this, the low-dust detection angle and high-dust detection angle are accurately calculated. This angle calculation based on a statistical model ensures that the detection light reaches the sensor in the optimal way, maximizing feature visibility. Furthermore, the illumination light type (e.g., selecting a specific wavelength light source to distinguish it from ambient light) and illumination intensity (compensating for or suppressing ambient light) are intelligently selected based on real-time ambient light, creating a stable and consistent lighting environment for image acquisition and ensuring high consistency of image quality from the source. This step, as the foundation of the entire inspection process, provides high-quality and reliable raw input data for all subsequent image processing and analysis. It is like equipping the entire system with "intelligent eyes," enabling subsequent key operations such as dust difference calculation, thickness recognition, and sealing detection to be carried out under controlled and optimized visual conditions. This significantly reduces the false detection and false negative rates, thereby ultimately ensuring the successful implementation and high-precision evaluation of the entire packaging quality inspection solution.

[0021] In one embodiment, the specific method for selecting the curvature angle range of the packaging bag and calculating the low dust detection angle and high dust detection angle based on the curvature angle range is as follows: Get the width of the unpackaged bag Theoretical thickness when packaging is complete Using the transverse cross-section where the center point of the packaging bag is located as the reference plane, on both sides of the center point of the packaged packaging bag, at a distance from the center point... The detection range is defined between two points. On the reference plane between the two points, detection points are selected at the same distance. The absolute value of the angle between the line connecting the detection points of any two vectors and the horizontal line is the packaging radian. By statistically analyzing the normal distribution range of the packaging curvature of historical packaging bags, we selected packaging curvatures that fall within the normal distribution. The packaging curvature at the location is used as the low dust detection angle, and the sum of this angle and the set packaging curvature threshold angle is used as the low dust detection angle. This represents the average curvature of the packaging. The standard deviation of the packaging curvature; The complementary angles of the mean radian angles are used as the high dust detection angles.

[0022] Select each of the two sides at a distance from the center point The detection range is defined between two points. This design is based on the actual morphological changes of the packaging bag after filling with heavy calcium carbonate and the principle of geometric optical detection. The packaging bag is flat when unpackaged, but after filling, due to the filling and sealing with powder, it forms a three-dimensional structure that approximates an elliptical cylinder. The central area expands and bulges due to material support, while the two side areas undergo specific curved transitions due to sealing and stacking pressure. This is achieved through a formula... The boundary of the critical transition zone from the central bulging area to the wrinkled areas on both sides is defined, thereby ensuring that the selected detection range avoids the area with the largest edge angle, and accurately locks the detection focus on the optimal observation area where the curvature of the packaging bag surface is relatively uniform and most conducive to uniform light illumination and the appearance of dust characteristics.

[0023] By analyzing the morphological statistical characteristics of packaging bags, the low-dust detection angle and high-dust detection angle are accurately calculated, achieving adaptive matching between the detection angle and the actual physical shape of the packaging bag, thereby significantly improving the signal-to-noise ratio and reliability of dust detection. Specifically, based on the normal distribution characteristics of historical radii data, the radii at μ-2σ (covering approximately 95% of common packaging shapes) are selected and a safety threshold is superimposed to ensure that the low-dust detection angle can effectively apply to the actual radii variations of most packaging bags. This angle design allows the incident light to illuminate the bag surface in a near-tangential manner, maximizing the shadow contrast between dust particles and the bag background, thus highlighting the morphological characteristics of fine dust. The high-dust detection angle is determined by the complementary angle of the mean radii angle. By utilizing the principle of optical reflection, this angle is close to the specular reflection angle of the bag surface, making the reflected light intensity of the smooth packaging bag surface much greater than the reflected light of the rough dust particles. This creates a significant "bright background - dark dust" contrast in high-angle images, complementing the "dark background - bright dust" effect formed in low-angle images. The advantage of this dual-angle collaborative detection mechanism is that it can capture dust information from two different optical perspectives, mutually verifying each other and overcoming the limitations of single-angle detection, thereby greatly enhancing the dust identification capability and measurement accuracy. This method optimizes the image acquisition process from the source, providing high-quality, high-contrast raw image data for subsequent image difference calculation, dust thickness identification, and quality assessment. This directly determines the accuracy and stability of subsequent algorithm processing and is a prerequisite for the entire system to achieve high-precision, high-reliability detection.

[0024] In one embodiment, the method for selecting the type and intensity of illumination light based on ambient light is as follows: The spectral bands at the packaging quality inspection point of heavy calcium carbonate were statistically analyzed at the same time interval, and the band with the fewest occurrences in the statistical spectral bands was taken as the type of irradiation light. In a dust-free environment, the brightness of the light reflected from the high dust detection angle to the camera is adjusted to be the same as that from the low dust detection angle.

[0025] By selecting the least frequently occurring spectral band in ambient light as the illumination light type and performing brightness calibration based on this, its core advantage lies in minimizing ambient light interference and establishing a stable brightness benchmark, thereby ensuring a high signal-to-noise ratio and consistency in the detected images. Selecting the least frequently occurring spectral band for illumination essentially utilizes a "spectral avoidance" principle, making the light source actively emitted by the system differentiated from existing natural or artificial light sources in the environment along the spectral dimension. This allows the system's light source signal to be easily separated during camera imaging using optical filters and other means, greatly suppressing background noise introduced by changes in ambient light (such as sunlight shifts or factory light switching), ensuring the purity and stability of image features. Subsequently, in a dust-free environment, the brightness of the high-angle light source was adjusted to make its reflected brightness consistent with that of the low-angle light source. The purpose was to establish an optical reference benchmark in a "zero-dust state" for the system before the detection began. This means that the background brightness of two images from different angles is consistent in a flawless state, providing an absolutely reliable differential benchmark that is not affected by the environment for subsequent dust identification and thickness calculation. This allows weak dust signals to be amplified and extracted with extreme precision, significantly improving the sensitivity, accuracy, and robustness of the detection system.

[0026] Step 2: Illuminate the packaging bag at low and high dust detection angles respectively to obtain detection images of the packaging bag at high and low angles. Crop the detection images to generate the bag center and bag end regions. After preprocessing the bag center region of the detection images, obtain the pixel difference matrix of the two images at high and low dust detection angles.

[0027] This step, through innovative dual-angle optical imaging and differential processing technology, fundamentally solves the core challenge of accurately separating minute dust signals from background interference in complex industrial environments. Compared with existing technologies that typically use single-angle imaging or direct image analysis, it achieves a qualitative leap in detection accuracy and reliability. Existing technologies are easily affected by factors such as packaging bag wrinkles, printed patterns, uneven ambient lighting, and curved surface reflections, making it difficult to effectively separate weak dust information from complex backgrounds, resulting in high false detection and false negative rates. This step acquires images from two optimized complementary angles—low dust detection angle and high dust detection angle—and precisely crops the key areas within the bag for grayscale preprocessing. Finally, it calculates and generates a pixel difference matrix for the two images, amplifying and highlighting the "difference layer" information exhibited by the different scattering, occlusion, and reflection characteristics of dust at the two angles. This provides a reliable input dust pixel difference matrix for subsequent steps (dust thickness identification in step 3 and quality assessment in step 4).

[0028] In one embodiment, the method for cropping the detected image to generate the bag middle and bag end regions is as follows: The SIFT feature extraction algorithm is used to extract key points and key point feature descriptors from two images. Key point matching is performed using the feature descriptors. The RANSAC algorithm is used to remove erroneous matching points, retaining only the most reliable pair of matching points. The geometric transformation matrix of the two images is calculated using the matching point pairs. Perspective transformation is performed on the detection image with a low dust detection angle to transform it to a viewpoint that is perfectly aligned with the detection image with a high dust detection angle.

[0029] The SIFT feature extraction algorithm extracts keypoints and their feature descriptors from two images acquired at low and high dust detection angles, respectively. Specifically, the SIFT algorithm first constructs a Difference of Gaussian pyramid to detect stable extrema at different scales as candidate keypoints. It then precisely locates the position and scale of the keypoints by fitting a three-dimensional quadratic function, while eliminating low-contrast points and edge response points to ensure stability. Subsequently, a principal direction is assigned to each keypoint to ensure rotation invariance. Finally, a gradient direction histogram is calculated in the neighborhood of each keypoint, generating a 128-dimensional feature descriptor vector. This vector is highly robust to changes in illumination, rotation, and scale. Then, a nearest neighbor search algorithm is typically employed. For each keypoint in the low-angle image, the closest and second-closest feature descriptors in the high-angle image are found. If the ratio of the closest distance to the second-closest distance is less than a preset threshold (e.g., 0.8), the pair of matching points is accepted, resulting in an initial set of matching pairs. Since false matches are inevitable in the initial matching, the RANSAC (Random Sample Consensus) algorithm is used for refinement. RANSAC repeatedly calculates the homography matrix model by randomly selecting the minimum set of points (e.g., 4 pairs of matching points) and counting the number of interior points that conform to the model. Finally, the model with the most interior points is selected as the optimal estimate, thus effectively eliminating false matching points caused by noise, duplicate textures, or occlusion, and retaining only the most reliable set of geometrically consistent interior point matching pairs. Based on this refined set of matching point pairs, the geometric transformation matrix between the two images (usually the homography matrix H, a 3x3 matrix) can be calculated. This matrix accurately describes the projection mapping relationship from the low-angle image plane to the high-angle image plane. Finally, the homography matrix H calculated in this way is used to perform perspective transformation on the detection image at the low dust detection angle. The coordinates of each pixel in the low-angle image are reprojected and mapped to the coordinate system of the high-angle image according to matrix H. The pixel values ​​at non-integer coordinates are calculated by interpolation methods such as bilinear interpolation, thereby generating a new image that is completely aligned with the detection image at the high dust detection angle in terms of viewpoint.

[0030] Gaussian filtering is used to filter the detection image of the high dust detection angle to reduce image noise. The filtered high dust detection angle detection image is then converted into a binary image using a binarization algorithm. On the binary image, a contour search algorithm is used to find the largest outer contour. Based on the size of the packaging bag, a cropping ratio is set, and the aligned high dust detection angle detection image is cropped according to the cropping ratio to obtain the upper, middle, and lower areas of the bag. The upper and lower areas of the bag are the bag end areas.

[0031] In one embodiment, the specific method for obtaining the pixel difference matrix of two images with high and low dust detection angles after preprocessing the bag region of the detection image is as follows: The method for preprocessing the bag region of the detected image is to convert it to grayscale and then assign weights to the R, G, and B channels based on the values ​​of the pixels. Calculate the grayscale value by setting the proportion of the wavelength of the illumination light in the R, G, and B channels. The weights are calculated using the following formula: in, The grayscale value of a pixel. These are the weights of the R, G, and B channels of a pixel, respectively. , All values ​​are between 0 and 1; Based on the proportion of the wavelength of the irradiated light in the R, G, and B channels, set The weights; The converted grayscale values ​​are normalized by maximum normalization. A pixel matrix is ​​generated based on the normalized grayscale values, using pixels as matrix elements. The pixel difference matrix between the two images is calculated based on the converted pixel matrices of the two images of the bag region at high and low dust detection angles.

[0032] The image information captured under two different illumination angles is transformed into a highly condensed and feature-enhanced difference matrix, which greatly highlights the subtle optical signal changes caused by dust adhesion, while suppressing interference noise caused by the packaging bag background, uneven ambient lighting, and residual image registration errors to the greatest extent. The reflection characteristics of dust particles and smooth packaging bag surfaces to light at different angles are fundamentally different. By dynamically adjusting the grayscale weights according to the proportion of a specific illumination light band (for example, assigning a higher weight α1 to the R channel if the light source is biased towards the red light band), the reflected signal of the system's active light source is maximized in the grayscale image, further improving the image's response sensitivity to target features (i.e., dust). Subsequent maximum normalization eliminates overall brightness differences caused by minor fluctuations in illumination intensity, ensuring that subsequent comparisons are performed under conditions of uniform brightness scale. The fundamental principle behind calculating the difference between the two normalized grayscale matrices is a differential amplification operation. For a dust-free, uniform bag surface area, the grayscale values ​​at the two angles should be very close after registration and normalization, with the difference approaching zero. However, for areas with dust, the grayscale values ​​will show significant differences due to the distinct optical properties of the dust at the two angles. Therefore, the final pixel difference matrix separates and amplifies the weak, difficult-to-observe dust signal from the complex background, forming a feature map with a very high signal-to-noise ratio where significantly non-zero values ​​directly correspond to the dust distribution.

[0033] Step 3: Construct a pixel difference histogram based on the pixel difference values ​​in the pixel difference matrix, identify shadows and brightness gradients in the bag area, divide the area into brightness regions, and calculate the dust recognition thickness of each region based on the brightness of each region.

[0034] This step, through a brightness and dust thickness model, achieves a leap from qualitative judgment to quantitative measurement of dust adhesion. Compared to existing technologies that typically only perform binary defect identification or rely on simple grayscale values ​​for rough estimation, this step accurately identifies and separates shadow interference through multi-peak and valley analysis of pixel difference histograms, and converts brightness differences into precise thickness data, greatly improving the scientific rigor and accuracy of the detection. Existing technologies often fail to effectively distinguish between the real signals generated by dust and the shadows caused by packaging bag wrinkles and deformations, leading to misjudging shadows as dust or ignoring low-contrast dust, and lacking the ability to quantify the severity of dust. This step first scientifically determines the shadow segmentation threshold using the first valley point of the pixel difference histogram, thereby accurately identifying and eliminating interference from large-area shadow areas and effectively solving the false positive problem. Then, based on the valley points, different brightness gradient regions are divided on the shadow-removed histogram. This essentially discretizes the continuous dust adhesion into different severity levels, achieving refined dust classification. Finally, a mathematical model based on the physical principle of light attenuation in the dust layer is established. This process converts the average brightness value of each brightness area—an optical signal—into a key physical quantity: the thickness of the dust particles. This transforms the detection result from an abstract "grayscale value" or "pixel area" into "thickness" information with clear physical meaning that can be used for quality assessment. For the overall quality inspection solution of heavy calcium carbonate packaging, this step plays a crucial quantitative role. It receives the enhanced and purified dust difference signal (pixel difference matrix) from step 2 and outputs a series of precise, localized dust thickness distribution data, advancing the detection process from "detecting anomalies" to "precisely measuring the degree of anomaly." In one embodiment, the specific method for identifying shadow and brightness gradients in the bag area and dividing the brightness area is as follows: The pixel difference values ​​in the pixel difference matrix are statistically analyzed. The x-axis is set according to the pixel difference values ​​in ascending order, and the y-axis is set to the number of identical pixel difference values. A pixel difference histogram is constructed, and the vertices of the histogram are connected to form a continuous curve. The first valley point in the direction of pixel difference values ​​from smallest to largest is selected as the shadow segmentation value. Pixel difference values ​​smaller than the shadow segmentation value are all regarded as shadow pixels. The area of ​​the shadow region is calculated based on the position of the shadow pixels and compared with the shadow judgment threshold. The shadow region with a value greater than the shadow judgment threshold is judged as the shadow region.

[0035] Remove the pixel difference values ​​that are identified as shadows in the pixel difference histogram. Connect the vertices of the pixel difference histogram to form a continuous curve. Use the pixel difference value at the valley as the brightness gradient boundary value. Use the pixel difference value between two brightness gradient boundaries as the brightness gradient. The area formed by the pixels corresponding to the brightness gradient is the brightness area.

[0036] The core advantage of using pixel difference histograms for shadow and brightness gradient recognition lies in its ability to objectively and accurately separate image features of different properties from a global statistical perspective. This enables the quantitative extraction and classification of dust signals. Its greatest benefit is avoiding the subjectivity and limitations of manually set thresholds, significantly improving the automation and reliability of detection. The histogram presents a statistical distribution of massive pixel difference values, clearly reflecting the response characteristics of different regions in the image. Regions with extremely small pixel difference values ​​(close to zero) mainly represent background bags without dust or shadows, while regions with positive and large difference values ​​correspond to dust signals. The shadow segmentation threshold is determined by finding the first valley point on the histogram curve. This is a data-driven scientific method for finding natural boundary points. This valley point marks the inflection point in the statistical distribution of pixel groups from "background and weak noise" to "significant shadows," effectively separating true shadow pixel clusters. It adapts to changes caused by different lighting and bag materials, ensuring the accuracy of shadow recognition. After removing these shaded areas, the remaining histogram curve is used to find subsequent valley points as brightness gradient boundaries. Essentially, this is based on the aggregation characteristics of the dust signal itself (i.e., different dust thicknesses lead to different brightness differences, thus forming multiple peak clusters on the histogram) to classify different dust severity levels. Each brightness gradient region corresponds to a specific dust coverage density or thickness range, laying the foundation for subsequent accurate thickness calculations. The identified shaded areas may also represent significant quality issues. Large and continuous shadows are often not random noise; they are highly likely to originate from physical wrinkles and deformations caused by improper sealing, transportation compression, or material defects in the packaging bag, or from localized dents, adhesions, or even tears on the bag surface. These physical anomalies also affect the packaging's sealing, aesthetics, and even overall strength, and are quality defects that need to be detected and addressed.

[0037] The method for calculating the identification thickness of dust in each brightness region based on the brightness of each region is as follows: The average brightness of each brightness region is calculated based on the pixel difference value and the number of pixel differences in each brightness gradient region. The dust thickness is then calculated by establishing a brightness-dust thickness model. The brightness and dust thickness model is as follows: in, For dust identification thickness, The light attenuation coefficient is... For maximum reflection difference, This represents the average brightness.

[0038] Step 4: Obtain environmental parameters of the packaging inspection area, calculate the dust thickness attached to the packaging bag by constructing a dust adhesion model, calculate the scattered thickness based on the adhesion thickness and the identification thickness, and calculate the quality assessment value of the bag area based on the thickness, position and quantity of different brightness areas in the bag.

[0039] This step, through multiphysics coupling modeling and multidimensional quality quantification assessment, achieves root cause analysis, precise quantification, and comprehensive evaluation of packaging bag dust problems. Compared with existing technologies that rely solely on visual appearance information or simple threshold judgments, this represents a significant leap from "phenomenon observation" to "mechanism modeling" and "comprehensive evaluation." Existing technologies typically ignore the direct impact of environmental factors (temperature, dust concentration) on detection results, cannot distinguish whether dust is attached to the bag surface or about to disperse, and lacks quantitative assessment of dust distribution uniformity, resulting in a single dimension of quality evaluation and insufficient accuracy. This step innovatively introduces environmental temperature and dust concentration parameters and constructs a dust adhesion model based on physicochemical principles. This model scientifically describes the theoretical adhesion strength and thickness of dust on the packaging bag surface under different environmental conditions. Its value lies in linking the detection results with the microscopic physical processes of the production environment (such as intermolecular adsorption) for the first time. By calculating the difference between the adhesion thickness and the visual recognition thickness obtained in step 3, the scattered thickness can be accurately obtained—this directly characterizes the amount of "dangerous dust" that is poorly adhered, easily disperses and pollutes the environment, and affects user experience, achieving a key distinction in dust status. Furthermore, when calculating the regional quality assessment value in the bag, not only is the total amount of scattered dust in all areas accumulated, but the dust distribution gradient difference index is also creatively introduced to quantify the uniformity of dust distribution, because locally accumulated dust has worse stability and aesthetics than uniformly distributed dust. Finally, by using a weighted allocation method to integrate the scattered amount, distribution gradient difference, and number of shaded areas, a comprehensive, scientific, and multi-dimensional quality assessment value is obtained.

[0040] In one embodiment, the environmental parameters include ambient temperature and dust concentration; The specific mathematical formula for the dust adhesion model is as follows: in, The thickness of the dust particles adhering to the surface. The substrate constant is the adhesion constant. Dust concentration, Concentration index For activation energy, Boltzmann's constant, For ambient temperature, The thickness of the packaging spillage is obtained by the difference between the thickness of the attached dust and the thickness of the identification.

[0041] This dust adhesion model, by incorporating two key physical parameters—ambient temperature and dust concentration—and based on the principles of molecular adsorption and thermodynamics, achieves the scientific prediction and identification of the theoretical dust adhesion thickness on the surface of packaging bags. The core mathematical formula of the model... It precisely describes the microscopic physical process of dust adhesion to a solid surface, where the exponential term... Essentially a variant of the Arrhenius formula, it reveals the decisive influence of temperature on adhesion thickness; as ambient temperature increases, the denominator of the exponential term... Increasing the value of the exponent term reduces the absolute value of its negative value. and The fact that the exponential function term is a positive constant leads to an increase in the exponential function value. This means that higher temperatures impart higher kinetic energy to dust molecules, making them more likely to overcome the energy barrier and detach from the surface. Therefore, the theoretical adhesion thickness decreases accordingly. Conversely, lower temperatures are more conducive to stable dust adhesion. Meanwhile, the power function term... This describes the effect of dust concentration. The higher the concentration, the more dust particles in the air can adhere to, and therefore the adhesion thickness will increase accordingly. The concentration index describes this non-linear relationship of growth.

[0042] In one embodiment, the quality assessment value of the area in the bag is calculated by the difference between the amount of dust spilled from the bag and the dust distribution gradient. The amount of spillage from the bag is calculated by summing the thickness and area of ​​each brightness region. Dust distribution gradient difference is calculated by calculating the thickness gradient difference between each brightness region and its adjacent brightness regions, calculating the cumulative gradient difference of brightness regions based on the number of adjacent brightness regions and the thickness gradient difference, and calculating the dust distribution gradient difference based on the number of regions and the cumulative gradient difference of regions. The weighted allocation method is used to calculate the quality assessment value of the area in the bag by summing the weights assigned to the bag spillage amount, the number of shaded areas, and the dust distribution gradient difference.

[0043] The amount of spillage directly reflects the state of the packaging bag surface during the filling process. Due to factors such as excessively fast filling and excessive vibration, the amount of heavy calcium carbonate spilled on the packaging bag is significant. The number of shaded areas is an important indicator of physical wrinkles, dents, or potential damage to the packaging bag itself. These shades often indicate uneven sealing pressure, poor heat sealing quality, defects in the bag material, or punctures in the bag, which directly affects the sealing performance and damage resistance of the packaging. It is a key indicator for judging the physical integrity of the packaging. The dust distribution gradient difference vividly depicts the uniformity of dust distribution on the bag surface. An excessively high gradient difference indicates that the dust is locally aggregated rather than uniformly distributed. This is not only unsightly and suggests that there may be process fluctuations or malfunctions in the production process (such as filling and dust removal), but the aggregated dust clumps are also more likely to fall off during subsequent handling. It is a sensitive indicator for assessing production consistency and stability. By assigning weights to these three items and performing a weighted summation, the evaluation value is no longer a single-dimensional judgment. Instead, it integrates three independent yet interconnected quality elements—equipment status, packaging physical condition, and production process level—into an authoritative comprehensive score from a global perspective. Its greatest advantage is that it avoids the one-sidedness of traditional methods that only focus on a single defect (such as measuring only the total amount of dust). This allows the final quality evaluation result to more accurately and comprehensively reflect the overall quality status of the packaging bag, providing extremely reliable and detailed data for production quality control, process improvement, and factory exit decisions, and greatly enhancing the scientific nature and effectiveness of quality management.

[0044] Step 5: Based on the detection images of high and low dust detection angles, a visual detection model is established to identify the sealing quality type of the top area and calculate the quality assessment value of the bag end area. The packaging quality score is calculated based on the quality assessment value of the bag end area and the quality assessment value of the bag middle area to identify the packaging quality.

[0045] In one embodiment, the sealing quality type includes leaky seal, leaking seal, seal inclusions, and seal wrinkles; The visual detection model is based on a convolutional neural network, and specifically includes the establishment and training of the visual detection model: The visual detection model consists of an input layer, a convolutional layer, a pooling layer, a fully connected layer, and an output layer. The training process for a visual detection model is as follows: The bag end region generated by cropping the detection images under high-angle and low-angle illumination is used as the input image of the visual detection model, and the sealing quality type is used as the output of the model. The model is trained by using historical input images as input and the sealing quality type on the historical input images as the output of the model. The visual detection model is then trained by using real-time acquired input images as input and detecting the sealing quality type on the real-time input images.

[0046] The input layer receives images of the bag-end regions, providing the network with input data in a uniform format, reducing computational burden, and accelerating model convergence. The convolutional layer is the core of the network; each layer uses multiple learnable convolutional kernels to perform sliding window calculations on the input image or the feature map of the previous layer for local feature extraction. The pooling layer uses max pooling, which retains the most salient features while downsampling the feature map, significantly reducing the number of parameters and computational cost, effectively controlling overfitting, and giving the model a certain degree of translation invariance. The fully connected layer, located after feature extraction, flattens the final multidimensional feature map into a one-dimensional vector and inputs it into one or more fully connected layers. Its function is to synthesize global features and perform high-order inference, mapping the learned distributed feature representation to the label space of the samples. That is, it initially combines all extracted features for different categories such as "missing seal" and "wrinkle". The output layer is the last fully connected layer, using the Softmax activation function, which transforms the final inference result into a probability distribution.

[0047] Using convolutional neural networks (CNNs) specifically for identifying the seal quality type of the bag end region is a precise technical choice based on the essential differences and data characteristics of defects in the bag end region. Sealing quality problems in the bag end region (such as leaks, incomplete seals, inclusions, and wrinkles) manifest as complex texture variations, morphological anomalies, and structural defects. These features are highly abstract and variable (e.g., the shape of wrinkles and the types of inclusions vary greatly). CNNs, with their multi-layered convolution and pooling operations, are extremely adept at automatically learning and extracting such abstract, hierarchical, deep features from pixels, thereby achieving end-to-end accurate classification of complex defect patterns.

[0048] The method for identifying packaging quality by calculating a packaging quality score based on the quality assessment values ​​of the bag end area and the bag middle area is as follows: The sealing quality type is assigned a value, and the detected sealing quality type and corresponding amplitude are cumulatively measured to obtain the quality assessment value of the bag end area. The packaging quality score is obtained by summing the quality assessment values ​​of the bag end and the bag center area, and the packaging quality is judged based on the packaging quality score.

[0049] This method transforms complex, qualitative visual defects into unified, quantifiable numerical indicators, thereby achieving an objective, standardized, and efficient assessment of bag end-seal quality. By assigning different scores to different seal quality types (such as leaks, incomplete seals, inclusions, and wrinkles) based on their risk severity (e.g., leaks are assigned the highest score because they lead to complete failure), this method not only simply counts the number of defects but also profoundly quantifies their severity. This allows a severe leak to have a far greater impact on the quality assessment value than multiple minor wrinkle defects. This severity-based weighted cumulative measurement method most accurately reflects the actual threat level of seal defects to the overall functionality of the packaging (i.e., its sealability), avoiding the one-sidedness of treating defects of different natures the same.

[0050] Different severity levels are assigned to different sealing quality types identified in the bag end area. For example, a leaky seal (10 points, a serious defect), a leaking seal (8 points), seal inclusions (6 points), and a wrinkled seal (3 points, a minor defect). If multiple defect types are found during inspection, their corresponding scores are summed to obtain the bag end area quality assessment value. The higher the value, the more serious the bag end sealing quality problem. A weighted summation method is used to calculate the final packaging quality score. The quality judgment process based on the packaging quality score is as follows: a pass / fail threshold is set. If the packaging quality score is ≤ the pass / fail threshold, the packaging quality is judged as pass / fail; if the packaging quality score is > the pass / fail threshold, it is judged as fail / fail. To further refine the control, multiple threshold ranges are established to achieve graded assessment. If the pass / fail threshold is < the packaging quality score ≤ the defective product threshold, it is judged as defective; if the defective product threshold is < the packaging quality score ≤ the rework threshold, it is judged as needing to be repackaged. This achieves accurate grading of the packaging quality of heavy calcium carbonate.

[0051] All the above formulas use dimensionless numerical values ​​for calculation, and the numerical values ​​substituted into the formulas are all in the International System of Units (SI). The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0052] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented in software, the above embodiments can be implemented, in whole or in part, as a computer program product. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.

[0053] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0054] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A method for detecting the quality of heavy calcium carbonate packaging based on visual detection, characterized in that, The specific steps include: Step 1: Obtain the packaging curvature of the packaging bag of the historical packaged heavy calcium carbonate, select the curvature angle range of the packaging bag according to the normal distribution of the packaging curvature, calculate the low-dust detection angle and the high-dust detection angle according to the curvature angle range, and select the illumination light type and the illumination brightness according to the ambient light; Step 2: irradiate the packaging bag according to the low-dust detection angle and the high-dust detection angle respectively, obtain the detection images of the packaging bag under high-angle and low-angle irradiation, and generate the middle-bag region and the end-bag region by cropping the detection images, and obtain the pixel difference matrix of the two images under high-dust detection angle and low-dust detection angle after preprocessing the middle-bag region of the detection images; Step 3: construct a pixel difference histogram according to the pixel difference values in the pixel difference matrix, identify the shadow and the brightness gradient of the middle-bag region, and divide the brightness region, calculate the recognition thickness of the dust in each region according to the brightness of each brightness region; Step 4: obtain the environmental parameters of the packaging detection region, calculate the dust thickness attached to the packaging bag by constructing a dust attachment model, calculate the scattering thickness according to the attachment thickness and the recognition thickness, and calculate the middle-bag region quality evaluation value according to the thickness and position and number of different brightness regions in the middle-bag region; Step 5: according to the detection images of the high-dust detection angle and the low-dust detection angle, identify the sealing quality type of the top region by establishing a visual detection model, calculate the end-bag region quality evaluation value, and calculate the packaging quality score according to the end-bag region quality evaluation value and the middle-bag region quality evaluation value to identify the packaging quality.

2. The heavy calcium carbonate packaging quality detection method based on visual detection according to claim 1, characterized in that: The specific method for selecting the curvature angle range of the packaging bag and calculating the low-dust detection angle and the high-dust detection angle is: Acquiring the width of the packaging bag when unpackaged the theoretical thickness when the packaging is completed , taking the transverse cross section where the center point of the packaging bag is located as the reference surface, two points on both sides of the center point of the packaging bag when the packaging is completed, at a distance of from the center point, the detection range is between the two points, and the detection points are selected at the same distance on the reference surface between the two points, and the absolute value of the included angle between the connecting line between the detection points of any two vectors and the horizontal line is the packaging radian; By statistically analyzing the normal distribution range of the packaging curvature of historical packaging bags, we selected packaging curvatures that fall within the normal distribution. The packaging curvature at the location is used as the low dust detection angle, and the sum of this angle and the set packaging curvature threshold angle is used as the low dust detection angle. This represents the average curvature of the packaging. The standard deviation of the packaging curvature; The complementary angle of the mean value of the curvature angle is taken as the high-dust detection angle.

3. The heavy calcium carbonate packaging quality detection method based on visual detection according to claim 1, characterized in that: The method for selecting the illumination light type and the illumination brightness according to the ambient light is: According to the same time interval, the spectral band of the heavy calcium carbonate packaging quality detection place is counted, and the least band of the counted spectral band is taken as the illumination light type; In a dust-free environment, adjust the illumination brightness of the high-dust detection angle to make the brightness of the high-dust detection angle and the low-dust detection angle reflected to the camera the same.

4. The heavy calcium carbonate packaging quality detection method based on visual detection according to claim 1, characterized in that: The method for cropping the detection images to generate the middle-bag region and the end-bag region is: Use SIFT feature extraction algorithm to extract key points and feature descriptors of key points from two images, match key points through feature descriptors, remove false matching points through RANSAC algorithm, only keep the most reliable matching point pair, calculate the geometric transformation matrix of the two images through the matching point pair, and transform the detection image of the low-dust detection angle to the same perspective as the detection image of the high-dust detection angle through perspective transformation; The detection image of the high-dust detection angle is filtered by Gaussian filtering to reduce image noise. The filtered detection image of the high-dust detection angle is converted into a binary image by a binary algorithm. In the binary image, the largest external contour is found by using a contour search algorithm. According to the size of the packaging bag, a clipping ratio is set. The aligned detection image of the high-dust detection angle is clipped by the clipping ratio to obtain the upper, middle and lower regions of the bag. The upper and lower regions of the bag are the bag end regions.

5. The heavy calcium carbonate packaging quality detection method based on visual detection according to claim 1, characterized in that: After the middle region of the detection image is preprocessed, the specific method for obtaining the pixel difference matrix of the two images of the high-dust detection angle and the low-dust detection angle is as follows: The method for pre-processing the bag region of the detection image is converted into a gray image, and according to the numerical value of the R, G and B channels of the pixel, the weight of the R, G and B channels is assigned The gray value is calculated, and the weight is set according to the proportion of the wave band of the illumination light type in the R, G and B channels . The converted gray value is normalized by maximum normalization. According to the pixel as a matrix element, a pixel matrix is generated. According to the pixel matrix converted from the two images of the middle region of the high-dust detection angle and the low-dust detection angle, the pixel difference matrix between the two images is calculated.

6. The heavy calcium carbonate packaging quality detection method based on visual detection according to claim 1, characterized in that: The specific method for identifying the shadow and the brightness gradient of the middle region and dividing the brightness region is as follows: The pixel difference values in the pixel difference matrix are counted. The pixel difference values are taken as the horizontal coordinates in the order from small to large, and the number of the same pixel difference values is taken as the vertical coordinates. A pixel difference histogram is constructed. The vertices of the histogram are connected to form a continuous curve. The first valley point is selected as the shadow segmentation value in the direction from small to large pixel difference value. The pixel difference values less than the shadow segmentation value are all shadow pixels. The area of the shadow region is calculated according to the position of the shadow pixels, and compared with the shadow judgment threshold. The shadow region greater than the shadow judgment threshold is judged as the shadow region. The pixel difference values in the pixel difference histogram that are judged as the shadow are removed. The vertices of the pixel difference histogram are connected to form a continuous curve. The pixel difference value at the valley is taken as the brightness gradient dividing value. The pixel difference values between the two brightness gradient dividing values are taken as the brightness gradient. The region formed by the pixels corresponding to the brightness gradient is the brightness region.

7. The heavy calcium carbonate packaging quality detection method based on visual detection according to claim 1, characterized in that: The method for calculating the identification thickness of the dust in each brightness region according to the brightness of each brightness region is as follows: The average brightness of each brightness region is calculated according to the pixel difference values and the number of the pixel difference values in each brightness gradient region. The dust thickness is calculated by establishing a brightness and dust thickness model. The brightness and dust thickness model is as follows: wherein, is the recognition thickness of the dust, is the light attenuation coefficient, is the maximum reflection difference, is the average brightness. 8.The method of claim 1, wherein the method is characterized by: The environmental parameters include the environmental temperature and the dust concentration. The specific mathematical formula of the dust adhesion model is as follows: wherein, is the dust thickness of the attached powder, is the attachment base constant, is the dust concentration, is the concentration exponent, is the activation energy, is the Boltzmann constant, is the ambient temperature, The packaging scattering thickness is obtained by the difference between the adhesion thickness and the identification thickness. 9.The method of claim 1, wherein the method is characterized by: The middle region quality evaluation value is calculated by the bagging scattering amount and the dust distribution gradient difference. The bagging scattering amount is calculated by summing and accumulating the thickness and the area of each brightness region. The dust distribution gradient difference is calculated by calculating the thickness gradient difference between each brightness region and the adjacent brightness region, calculating the cumulative gradient difference value of the brightness region according to the number of the adjacent brightness regions and the thickness gradient difference, and calculating the dust distribution gradient difference according to the number of the regions and the cumulative gradient difference value of the regions. The middle region quality evaluation value is calculated by summing and calculating the weights of the bagging scattering amount, the number of the shadow regions and the dust distribution gradient difference by the weight distribution method.

10. The heavy calcium carbonate packaging quality detection method based on visual detection according to claim 1, characterized in that: The sealing quality types include seal leakage, seal leakage, seal inclusion and seal fold; The visual detection model is based on a convolutional neural network, and specifically includes visual detection model establishment and visual detection model training: The visual detection model establishment includes an input layer, a convolutional layer, a pooling layer, a full connection layer and an output layer; The visual detection model training process is as follows: The bag end region generated by the detection image cropping under high-angle and low-angle illumination is used as the input image of the visual detection model, the sealing quality type is used as the output of the model, the historical input image is used as the input of the model, the sealing quality type on the historical input image is used as the output of the model to train the model, and the real-time input image is used as the input of the visual detection model to detect the sealing quality type on the real-time input image; The method for calculating the packaging quality score according to the bag end region quality evaluation value and the bag middle region quality evaluation value is as follows: The sealing quality type is valued, and the sealing quality type and the corresponding amplitude are accumulated and measured to obtain the bag end region quality evaluation value; The packaging quality score is obtained by summing the bag end region quality evaluation value and the bag middle region quality evaluation value, and the packaging quality is judged according to the packaging quality score.