Image processing-based automatic grading method and system for flake caustic agglomerate degree
By using image processing technology to identify the degree of blurring in the contact area and internal texture of caustic soda flakes, and calculating the correlation index and distribution difference index, the problem of difficulty in identifying early caking of caustic soda flakes in existing technologies is solved, and accurate caking degree classification and automated monitoring are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHAANXI FUHUA CHEMICAL CO LTD
- Filing Date
- 2026-04-22
- Publication Date
- 2026-07-03
AI Technical Summary
Existing methods for grading the degree of caustic soda caking mainly rely on geometric dimension detection, which makes it difficult to identify the early stages of caking, resulting in the inability to take timely and effective preventive measures and causing the quality of caustic soda caking to deteriorate.
An image processing-based method was used to identify the contact areas between caustic soda flakes and the boundary ambiguity index and internal ambiguity index of adjacent caustic soda flakes. The correlation index and distribution difference index were calculated to determine the caustic soda flake agglomeration index for classification.
It enables quantitative identification of the early stage of caustic soda agglomeration, improves the accuracy and reliability of agglomeration degree grading, eliminates subjective judgment differences, optimizes the quantitative accuracy of agglomeration degree, and supports automated monitoring of caustic soda storage quality.
Smart Images

Figure CN122090179B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image data processing technology, and specifically to an automatic grading method and system for the degree of caustic soda agglomeration based on image processing. Background Technology
[0002] Sodium hydroxide flakes are a highly hygroscopic chemical raw material that readily absorbs moisture from the air during storage and transportation, leading to caking. The caking process typically exhibits a gradual evolution: initially, the surface of the sodium hydroxide flakes becomes sticky and loses its luster due to moisture absorption, and the boundaries between contacting flakes begin to blur and adhere; as moisture penetrates deeper, the flakes gradually adhere to form aggregates, eventually evolving into severe caking. Therefore, accurate identification and grading of the degree of caustic soda caking is crucial for timely adjustment of storage conditions, optimization of processing techniques, and prevention of economic losses.
[0003] Existing methods for grading the degree of caustic soda caking primarily rely on the detection of the caustic soda's geometric dimensions. This involves comparing the size of caustic soda flakes with standard sizes and observing the presence of agglomerates significantly larger than normal to determine the degree of caking. However, this size-based approach is insufficient for effectively identifying the early stages of caking. In the early stages of caking, although the surface of the caustic soda flakes may have become hygroscopic and sticky with blurred boundaries, the material may still maintain a loose, flaky structure and has not yet formed obvious large agglomerates. Relying solely on agglomerate size as a criterion cannot promptly capture the early caking state where the surface of the caustic soda flakes has already adhered while the internal structure has not yet fully hardened. This prevents effective preventative measures from being taken in the early stages of caking, delaying optimal treatment and causing further deterioration of the caustic soda's quality. Summary of the Invention
[0004] This invention provides an automatic grading method and system for the degree of caustic soda agglomeration based on image processing, in order to solve existing problems.
[0005] The present invention provides an automatic grading method and system for the degree of caustic soda agglomeration based on image processing, which adopts the following technical solution:
[0006] In a first aspect, one embodiment of the present invention provides an automatic grading method for the degree of caustic soda ash agglomeration based on image processing. The method includes: acquiring image data of caustic soda ash; identifying contact areas between caustic soda ash ash and adjacent caustic soda ash ash corresponding to the contact areas; determining a boundary fuzziness index of the contact areas and an internal fuzziness index of at least one of the adjacent caustic soda ash ash ash; calculating a correlation index based on the boundary fuzziness index and the internal fuzziness index; wherein the correlation index is used to characterize the degree of correlation between the boundary fuzziness index and the internal fuzziness index; determining a distribution difference index based on the internal fuzziness index of each caustic soda ash ash; wherein the distribution difference index is used to characterize the spatial distribution difference of the internal moisture content of the caustic soda ash ash; determining a caustic soda ash agglomeration index based on the correlation index and the distribution difference index; and grading the degree of agglomeration based on the caustic soda ash ash agglomeration index.
[0007] Further, the identification of the contact area between caustic soda flakes and the adjacent caustic soda flakes corresponding to the contact area includes: segmenting the image data to obtain the mask area of each caustic soda flake and its corresponding identification information; performing morphological dilation operation on the mask area of each caustic soda flake, determining the contact area between the caustic soda flakes based on the intersection between the dilated mask areas, and recording the identification information of the adjacent caustic soda flakes constituting the contact area; and determining the caustic soda flake located in the upper layer among the adjacent caustic soda flakes based on the depth information in the image data, so as to use it as the object for calculating the internal fuzziness index.
[0008] Furthermore, before performing morphological expansion calculations on the masked regions of each caustic soda flake, the method further includes: calculating the area of each caustic soda flake based on its masked region, and determining an area statistic based on the area; if the area statistic exceeds a preset threshold, directly determining the caustic soda agglomeration index as the maximum value, and classifying the agglomeration degree based on the caustic soda agglomeration index; if the area statistic does not exceed the preset threshold, performing morphological expansion calculations on the masked regions of each caustic soda flake.
[0009] Further, determining the boundary ambiguity index of the contact area includes: extracting the boundaries of each caustic soda flake, and identifying contact boundary segments belonging to the contact area and independent boundary segments belonging to the non-contact area; determining the edge ambiguity of each boundary segment; wherein the edge ambiguity is used to characterize the steepness of the grayscale change at the corresponding boundary segment; and determining the boundary ambiguity index based on the minimum edge ambiguity in the independent boundary segment and the edge ambiguity of the contact boundary segment.
[0010] Further, determining the edge ambiguity of each boundary segment includes: performing grayscale sampling along a direction perpendicular to the boundary for each pixel on the boundary segment to obtain a grayscale profile of each pixel; determining the edge width of each pixel based on the width of the transition region of grayscale change in the grayscale profile; determining the average value of the edge width of each pixel on the boundary segment to obtain the edge ambiguity of the boundary segment.
[0011] Further, the method for determining the internal blur index includes: calculating the gradient magnitude of each pixel within the caustic soda flake region, and determining a sharpness index based on the statistics of the gradient magnitude; wherein the sharpness index is used to characterize the clarity of the internal texture of the caustic soda flake; and determining the internal blur index based on the sharpness index; wherein the internal blur index decreases as the sharpness index increases.
[0012] Further, the step of calculating the correlation index based on the boundary fuzziness index and the internal fuzziness index includes: sorting each contact region according to the boundary fuzziness index to obtain an ordered sequence of the internal fuzziness index; and calculating the monotonic correlation between the boundary fuzziness index and the internal fuzziness index based on the sorting relationship between the boundary fuzziness index and the internal fuzziness index to obtain the correlation index between the boundary fuzziness index and the internal fuzziness index.
[0013] Furthermore, determining the distribution difference index based on the internal fuzzy indices of each caustic soda flake includes: statistically analyzing the internal fuzzy indices of each caustic soda flake to obtain a set of internal fuzzy indices; calculating the dispersion statistic of the set of internal fuzzy indices to obtain the distribution difference index; wherein the dispersion statistic is used to quantify the spatial distribution difference of the internal moisture content of each caustic soda flake, reflecting the uneven moisture content caused by environmental factors during the caustic soda agglomeration process.
[0014] Further, determining the caustic soda caking index based on the correlation index and the distribution difference index includes: calculating the statistic of the boundary ambiguity index, and determining the intermediate caking index based on the product of the statistic and the correlation index; wherein the intermediate caking index is used to characterize the initial caking degree determined based on the correlation between boundary adhesion and internal permeability; and determining the caustic soda caking index based on the intermediate caking index and the distribution difference index.
[0015] Secondly, another embodiment of the present invention provides an automatic grading system for the degree of caustic soda agglomeration based on image processing, including a host computer and an image acquisition device communicatively connected to the host computer, wherein:
[0016] The image acquisition device is used to acquire image data of caustic soda flakes and send it to the host computer;
[0017] The host computer is used to acquire image data of caustic soda flakes; identify the contact areas between caustic soda flakes and the adjacent caustic soda flakes corresponding to the contact areas; determine the boundary fuzziness index of the contact areas and the internal fuzziness index of at least one of the adjacent caustic soda flakes; calculate a correlation index based on the boundary fuzziness index and the internal fuzziness index; wherein the correlation index is used to characterize the degree of correlation between the boundary fuzziness index and the internal fuzziness index; determine a distribution difference index based on the internal fuzziness index of each caustic soda flake; wherein the distribution difference index is used to characterize the spatial distribution difference of the internal moisture content of the caustic soda flakes; determine a clumping index based on the correlation index and the distribution difference index, and classify the degree of clumping based on the clumping index.
[0018] The beneficial effects of the technical solution of the present invention are:
[0019] In this embodiment, image data of caustic soda flakes is acquired; contact areas between caustic soda flakes and adjacent caustic soda flakes corresponding to the contact areas are identified; boundary fuzziness indices of the contact areas and internal fuzziness indices of at least one of the adjacent caustic soda flakes are determined; a correlation index is calculated based on the boundary fuzziness index and the internal fuzziness index; wherein the correlation index is used to characterize the degree of correlation between the boundary fuzziness index and the internal fuzziness index; a distribution difference index is determined based on the internal fuzziness index of each caustic soda flake; wherein the distribution difference index is used to characterize the spatial distribution difference of the internal moisture content of the caustic soda flakes; and a clumping index of caustic soda flakes is determined based on the correlation index and the distribution difference index, and the degree of clumping is graded based on the clumping index.
[0020] This invention, by analyzing the correlation between the ambiguity of the boundary of the caustic soda contact area and the ambiguity of the internal texture of adjacent caustic soda flakes, and combining this with the spatial distribution differences in the degree of moisture absorption among caustic soda flakes, achieves quantitative identification of the early stage of caustic soda agglomeration. This overcomes the problem of missed detection of early agglomeration caused by traditional methods relying solely on agglomerate size, and improves the accuracy of agglomeration degree classification. On the other hand, based on the correlation index calculated from the boundary ambiguity index and the internal ambiguity index, the physical process of moisture absorption and penetration from the caustic soda surface can be verified. By quantifying the monotonic correlation between boundary adhesion and internal moisture absorption, it effectively distinguishes between true agglomeration signs caused by moisture absorption and accidental surface contamination or light interference, enhancing the identification of agglomeration. The reliability of the caking degree determination is improved. On the one hand, by calculating the distribution difference index of fuzzy indicators within each caustic soda flake, the uneven moisture absorption caused by environmental factors within the caustic soda flake pile is quantified. The discrete characteristics of the spatial distribution of fuzziness degree during the caking process are used as a weighting factor for the caking degree, so that the grading results can reflect the actual non-uniform deterioration state of the caustic soda flakes, thus optimizing the quantitative accuracy of the caking degree. On the other hand, based on image processing technology, the automatic detection and grading of the caking degree of caustic soda flakes is realized. By replacing manual observation with machine vision, subjective judgment differences are eliminated, and the objective quantification of the subtle adhesion and texture changes on the surface of the caustic soda flakes is realized, providing technical support for the automated monitoring of the storage quality of caustic soda flakes. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 A flowchart illustrating the automatic grading method for the degree of caustic soda agglomeration based on image processing provided in this application embodiment;
[0023] Figure 2 This is a schematic diagram of caustic soda flakes before they clump together, provided in an embodiment of this application.
[0024] Figure 3 This is a schematic diagram of caustic soda flakes agglomerating as provided in the embodiments of this application;
[0025] Figure 4 This is a schematic diagram of the architecture of an automatic grading system for the degree of caustic soda agglomeration based on image processing, provided in an embodiment of this application. Detailed Implementation
[0026] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following detailed description, in conjunction with the accompanying drawings and preferred embodiments, provides a specific implementation method, structure, features, and effects of the invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0027] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0028] The following description, in conjunction with the accompanying drawings, details a specific solution provided by the present invention.
[0029] like Figure 1 As shown in the embodiments of this application, an automatic grading method for the degree of caustic soda agglomeration based on image processing is provided. The method includes:
[0030] Step S110: Acquire image data of caustic soda flakes.
[0031] The aforementioned caustic soda flakes are chemically known as sodium hydroxide (NaOH, commonly called caustic soda or lye). They are solid alkali in flake or thin sheet form, produced by electrolyzing saturated brine, followed by evaporation, concentration, and cooling solidification. Their crystal structure is fragile, typically 0.5 to 2 millimeters thick, and they exhibit extremely high hygroscopicity and deliquescence. When exposed to the atmosphere, they rapidly absorb moisture from the air, forming a concentrated alkali solution on their surface, causing particles to adhere together due to capillary action and a dissolution-recrystallization mechanism. As an important basic chemical raw material, caustic soda flakes are widely used in papermaking, textiles, detergent production, petroleum refining, and water treatment. However, their strong corrosiveness and tendency to clump require strict sealing and a dry environment during storage and transportation to prevent quality deterioration and loss of flowability due to moisture absorption.
[0032] The aforementioned image data for caustic soda flakes can include two modalities: visible light images and depth images. Visible light images record the optical reflection characteristics of the caustic soda surface, including two-dimensional visual information such as color, texture, gloss, and edge contours, used to extract the grayscale features, boundary sharpness, and surface texture details of the caustic soda flakes. Depth images characterize the three-dimensional spatial structure of the caustic soda flake stacking scene, recording the distance information of each pixel relative to the imaging plane. This is used to determine the spatial positional relationships between caustic soda flakes, their stacking order, and the three-dimensional morphology of the contact areas, providing a spatial geometric basis for distinguishing upper and lower layers of caustic soda flakes and analyzing the stacking structure.
[0033] Visible light images can be acquired under uniform diffuse lighting conditions using color imaging units in RGB-D imaging devices (such as CMOS or CCD sensors equipped with Bayer filters) to avoid specular reflections and shadow interference. Depth images can be acquired using a coaxially configured structured light projector and infrared receiver, a time-of-flight (ToF) sensor, or a stereo vision matching algorithm. This generates a disparity map or distance map with the same resolution as the visible light image, and performs pixel-level registration (alignment) to establish a mapping relationship between two-dimensional image coordinates and three-dimensional spatial coordinates, ensuring a one-to-one correspondence between the caustic soda boundaries in the visible light image and their spatial positions in the depth image.
[0034] For visible light images, considering the reflective properties of caustic soda surface and the noise interference that may be introduced by uneven ambient lighting, preprocessing operations can be performed to enhance the recognizability of target features. For example, nonlinear smoothing algorithms such as median filtering can be used to suppress salt-and-pepper noise and Gaussian noise, preserving edge information while eliminating isolated noise points. Then, contrast enhancement techniques such as histogram equalization or adaptive gamma correction can be used to expand the gray-scale dynamic range, improve the gray-scale difference between the caustic soda boundary and the background, thereby strengthening the saliency of the edge structure and providing a high-quality image data foundation for subsequent segmentation and boundary extraction. For depth images, due to the physical positional deviation between the depth sensor and the visible light imaging unit and the differences in lens distortion, spatial registration and alignment processing is required. The intrinsic and extrinsic parameter matrices are obtained through camera calibration, and the depth coordinate system is mapped to the visible light image coordinate system using rigid body transformation or projection transformation to achieve a pixel-level one-to-one correspondence. This ensures that the depth information can be accurately superimposed onto the corresponding position in the two-dimensional image, thereby supporting the determination of the hierarchical relationship of caustic soda based on depth information and the analysis of the three-dimensional structure. It is understood that the preprocessing of visible light images and depth images uses mature existing technologies. For the specific implementation methods and working principles, please refer to the relevant technologies. The embodiments in this application will not be repeated here.
[0035] It is understood that the automatic grading method for the degree of caustic soda agglomeration based on image processing provided in this application is mainly based on the physicochemical mechanism of caustic soda hygroscopic agglomeration, and determines the degree of agglomeration by quantitatively analyzing the spatial correlation between the surface boundary features and internal texture features of caustic soda. For example... Figure 2 and Figure 3As shown, when caustic soda flakes are exposed to the atmosphere due to their strong hygroscopicity, their surface rapidly absorbs moisture, forming a liquid film that becomes sticky. This leads to capillary adhesion between contacting or overlapping caustic soda flake particles, widening the grayscale transition zone at the contact area and reducing edge clarity. Simultaneously, the hygroscopic process follows a mass transfer law of penetration from the surface to the interior. The concentrated alkali solution formed by surface dissolution wets adjacent particles and diffuses inward, causing the internal crystal structure of the caustic soda flakes to become damp. This manifests as a reduction in the gradient amplitude of the internal texture and blurring of details. Therefore, in the early stage of agglomeration, although caustic soda flakes have not yet formed large agglomerates, there is a monotonically positive correlation between the degree of blurring at the contact boundary and the degree of blurring of the internal texture of the caustic soda flakes. Furthermore, due to spatial differences in stacking location, packaging sealing, and environmental exposure, the degree of moisture absorption of caustic soda flakes in different areas is non-uniformly distributed, resulting in a decrease in the consistency of the degree of blurring within each caustic soda flake. This method quantifies the correlation between boundary adhesion and internal penetration by calculating the correlation index between the fuzzy index of the contact area boundary and the fuzzy index of the internal texture of adjacent caustic soda flakes. It also characterizes the non-uniformity of the agglomeration process by combining the spatial distribution difference index of the fuzzy indices within each caustic soda flake. Finally, it integrates these indices to determine the caustic soda agglomeration index, thus achieving accurate identification and grading of the degree of agglomeration in the early stage when the caustic soda still maintains a loose flaky structure but has already shown surface moisture absorption and adhesion. The specific scheme is as follows:
[0036] Step S120: Identify the contact areas between caustic soda flakes and the adjacent caustic soda flakes corresponding to the contact areas.
[0037] The contact area between the aforementioned caustic soda flakes refers to the common area formed on the imaging plane by adjacent caustic soda flakes due to physical contact or gravitational overlap when the caustic soda flakes are stacked. This area corresponds to the material exchange interface where two or more caustic soda flake entities adhere to each other, and is usually represented by the intersection of the caustic soda flake mask in the two-dimensional image space. The adjacent caustic soda flakes corresponding to the contact area refer to the caustic soda flake entities that are in physical contact at the contact interface, including the caustic soda flakes located in the upper layer and the caustic soda flakes located in the lower layer. The two form a mechanical connection and a moisture transfer channel through the contact area.
[0038] Step S120 above identifies the contact areas between caustic soda flakes and their corresponding adjacent caustic soda flakes. The purpose is to establish a basis for the correlation analysis between the surface boundary features and internal structural features of caustic soda flakes. By extracting the boundaries of the contact areas, the degree of boundary blurring caused by moisture absorption and stickiness on the caustic soda surface can be quantitatively assessed. By identifying the adjacent caustic soda flakes constituting the contact area, the degree of internal texture blurring of specific caustic soda flakes (especially those located in the upper layer and directly exposed to the environment) can be further analyzed. This identification mechanism allows the system to verify the physical process of moisture absorption and penetration into the interior of the caustic soda surface. That is, when the contact boundary is blurred due to the formation of a surface liquid film, whether the adjacent caustic soda flakes simultaneously experience a loss of texture details, thus determining the degree of agglomeration based on the consistency of boundary-internal features, rather than relying solely on geometrical changes for a lagging judgment.
[0039] Optionally, step S120 may include: segmenting the image data to obtain the mask region of each caustic soda flake and its corresponding identification information; performing morphological dilation operation on the mask region of each caustic soda flake, determining the contact region between caustic soda flakes based on the intersection between the dilated mask regions, and recording the identification information of adjacent caustic soda flakes constituting the contact region; and determining the caustic soda flake located in the upper layer among adjacent caustic soda flakes based on the depth information in the image data, so as to use it as the object for calculating the internal fuzziness index.
[0040] In the above scheme, the image data segmentation process aims to accurately separate caustic soda flakes from the background environment, generate a binary mask region, and assign a unique identifier to each independent caustic soda flake instance, thereby establishing the basis for spatial localization and attribute analysis of individual caustic soda flakes. During segmentation, based on the grayscale difference between caustic soda flakes and the supporting background, an adaptive threshold segmentation algorithm such as the Otsu method can be used to automatically determine the optimal grayscale threshold. Pixels above the threshold are classified as foreground (caustic soda flakes, assigned a logical true value), and pixels below the threshold are classified as background (assigned a logical false value), generating a binary mask image; or a semantic segmentation model based on deep learning (such as a pre-trained convolutional neural network) can be used to directly output the probability map of the caustic soda flake region through pixel-level classification and binarize it to meet the segmentation requirements under complex lighting conditions. After segmentation, eight-neighbor or four-neighbor connected component analysis is performed on the binary mask. A unique integer identifier is assigned to each connected caustic soda region using seed filling or a two-step scanning labeling algorithm, generating a labeled image. This ensures that each caustic soda pixel carries the identity code of its respective entity, providing structured data support for subsequent mask dilation operations, contact region detection, and individual feature extraction. It is understood that the image segmentation schemes described above are all mature existing technologies. For their implementation methods and working principles, please refer to relevant technologies; the embodiments in this application will not be repeated.
[0041] Morphological dilation of the masked regions of each caustic soda flake is an image processing operation based on mathematical morphological principles to expand the boundaries of the caustic soda flakes and detect potential contact interfaces. This operation uses a structuring element (typically a 3×3 or 5×5 square or rhomboid template) to perform a convolutional scan of the binary mask. When at least one foreground pixel exists within the area covered by the structuring element, the anchor point is marked as the foreground, thus achieving a morphological effect of expanding the caustic soda flake boundaries outward by one or more pixels. In caustic soda stacking scenarios, due to the potential sub-pixel gaps or slight contacts between the flakes, it is difficult to accurately capture the actual physical contact areas directly based on the original mask. By expanding the mask boundaries of each caustic soda flake through dilation, the originally separate but spatially adjacent caustic soda flake masks artificially overlap. This overlapping area corresponds to the contact or adjacent interfaces between the caustic soda flakes on the image plane. By performing a pixel-by-pixel logical AND operation on each expanded caustic soda mask, the overlapping area where different caustic soda identifiers coexist can be extracted. This area is identified as the contact area between caustic sodas. At the same time, by recording the caustic soda identifier pairs coexisting in the overlapping area, a mapping relationship between the contact area and adjacent caustic soda entities can be established, providing a spatial positioning basis for subsequent analysis of the boundary features of the contact interface and identification of the caustic soda objects involved in the contact.
[0042] It can be understood that each pixel value in a depth image represents the radial distance of a scene point relative to the imaging plane. In the camera coordinate system, a smaller depth value corresponds to a spatial position closer to the optical center. For the identified contact areas and their corresponding adjacent caustic soda flake pairs, the depth value set corresponding to each caustic soda flake mask area in the depth image is extracted, and the depth statistics of each caustic soda flake (usually the arithmetic mean or median of the depth values of all pixels in the mask area) are calculated. By comparing the depth statistics of adjacent caustic soda flakes, the caustic soda flake with a smaller depth value (i.e., closer to the camera) is determined to be located in the upper layer, and the caustic soda flake with a larger depth value is determined to be located in the lower layer. This layering determination is based on the physical principle of gravitational stacking. The upper layer of caustic soda flakes, directly exposed to the atmosphere, is the primary recipient of moisture absorption. The liquid film formed on its surface after moisture absorption not only blurs the contact boundary due to capillary action but also penetrates into the internal matrix through gravity and dissolution-diffusion mechanisms. Therefore, the degree of blurring of the internal texture of the upper layer of caustic soda flakes accurately reflects the physical process of moisture absorption and penetration. In contrast, the lower layer of caustic soda flakes is shielded by the upper layer, and its internal state may be influenced by the seepage from the upper layer rather than direct moisture absorption. Therefore, identifying the upper layer of caustic soda flakes as the object for calculating the internal blurring index accurately establishes a causal relationship between the degree of boundary adhesion and the degree of internal moisture absorption, ensuring that the determination of the degree of agglomeration conforms to the mass transfer law of moisture absorption from the surface to the interior.
[0043] Optionally, before performing morphological dilation calculations on the masked regions of each caustic soda flake, the above-mentioned automatic classification method for the degree of caustic soda agglomeration based on image processing may further include: calculating the area of each caustic soda flake based on its masked region, and determining an area statistic based on the area; if the area statistic exceeds a preset threshold, directly determining the caustic soda agglomeration index as the maximum value, and classifying the degree of agglomeration based on the caustic soda agglomeration index; if the area statistic does not exceed the preset threshold, performing morphological dilation calculations on the masked regions of each caustic soda flake.
[0044] One possible implementation of the above-mentioned calculation of the area based on the mask region of each caustic soda flake is as follows: using the pixel set of each connected region in the labeled image, by counting the number of foreground pixels corresponding to each independent caustic soda flake identifier, the area of the connected region in pixels is obtained. This area represents the projection size of the caustic soda flake on the imaging plane. Then, based on the connected region area of all caustic soda flakes, an area statistic is calculated. This statistic is usually the arithmetic mean or median value of the area of all caustic soda flakes, which is used to characterize the overall size level of the current caustic soda flake sample.
[0045] In the above scheme, the pre-screening mechanism based on the area of caustic soda flakes establishes a rapid judgment channel based on the scale characteristics of caustic soda flake agglomeration evolution. Its working principle is to use area statistics as a macroscopic indicator of the overall adhesion state of caustic soda flakes. When caustic soda flakes undergo severe agglomeration, multiple flaky particles completely adhere to each other through the surface liquid film dissolution-recrystallization mechanism to form large-sized aggregates. At this time, the area of the connected domain will significantly exceed the baseline area of a single normal caustic soda flake. By setting a preset threshold based on the normal area multiple (such as 1.5 times or 2 times), the situation where the area statistics exceed the threshold can be directly classified as a severe agglomeration state, without performing complex calculation processes such as subsequent boundary fuzzy analysis, internal texture extraction, and correlation calculation. This two-level detection architecture achieves optimized allocation of computing resources: for obvious agglomeration samples with large-area adhesion, the maximum agglomeration index is quickly output through a single geometric feature, avoiding redundant verification of high-confidence conclusions; for samples with area statistics within the normal range, a refined morphological expansion and contact area analysis process is triggered to capture subtle feature changes in the early agglomeration stage. This mechanism ensures both the efficiency of determining severe clumping and the ability to accurately identify minor clumping or non-clumping states, realizing a hierarchical detection strategy from macroscopic geometric screening to microscopic feature analysis.
[0046] When setting the preset threshold, the geometric size benchmark of normal caustic soda flakes, the distinguishability of the agglomeration evolution stage, and the detection requirements of the actual production scenario can be comprehensively considered. Specifically: (1) The benchmark area of normal caustic soda flakes can be determined based on the process standard of caustic soda flake production. This benchmark can be obtained by statistically analyzing the average or median of the connected domain area of caustic soda flakes in normal production batches, and used as a reference system for judging the adhesion state. (2) The selection of the threshold multiple needs to establish a balance between detection sensitivity and false judgment rate. If the multiple is too low (e.g., below 1.3 times), it may cause slight overlap or area fluctuations caused by imaging noise to be misjudged as agglomeration, resulting in over-processing. If the multiple is too high (e.g., above 3 times), it may miss the intermediate state where substantial adhesion has occurred but no large agglomerates have yet formed. Therefore, 1.5 times to 2.0 times is usually selected as the empirical threshold range, which can filter out the area increase caused by the natural stacking of caustic soda flakes and reliably identify the serious agglomeration situation where large-area adhesion has occurred. (3) Adjust the threshold according to the specific application scenario of caustic soda flakes. For fine chemical applications with extremely high fluidity requirements, the threshold can be appropriately lowered to intervene in the treatment in advance. For coarse processing scenarios that can tolerate a certain degree of agglomeration, the threshold can be appropriately increased to avoid excessive crushing treatment.
[0047] Step S130: Determine the boundary fuzziness index of the contact area and the internal fuzziness index of at least one caustic soda flake among the adjacent caustic soda flakes.
[0048] The aforementioned boundary fuzziness index is a characteristic parameter used to quantify the clarity of the boundaries of the contact areas between caustic soda flakes. Its physical essence reflects the degree of edge sharpness loss caused by the liquid film formed on the caustic soda surface due to hygroscopic action. During the agglomeration process, as the caustic soda surface absorbs moisture and becomes sticky, capillary adhesion occurs between the contacting particles, causing the grayscale transition band at the contact interface to widen and the spatial frequency to decrease, manifesting as an increase in boundary fuzziness. This index, by comparing the boundary features of the contact area with the clear boundaries of the non-contact area, characterizes the tightness of the adhesion between caustic soda flakes in a relatively quantitative form, serving as an important basis for judging whether the caustic soda has entered the initial stage of agglomeration. The aforementioned internal fuzziness index is a characteristic parameter used to quantify the clarity of the internal texture details of the caustic soda entity. Its numerical change reflects the depth and intensity of hygroscopic penetration from the caustic soda surface into the internal matrix. During the agglomeration process, the concentrated alkaline solution formed by surface dissolution diffuses into the interior of the caustic soda flakes under capillary action, causing the internal crystal structure to become damp. This manifests as a decrease in the gradient amplitude of the surface texture, loss of detail information, and a reduction in spatial frequency components. This index characterizes the degree of structural deterioration caused by moisture absorption in the interior of the caustic soda flakes by evaluating the sharpness of the texture in the internal region. It is used to verify whether the blurring of the contact boundary is due to moisture absorption and penetration rather than external contamination, thereby helping to determine the true agglomeration state of the caustic soda flakes.
[0049] Optionally, step S130 above, which determines the boundary ambiguity index of the contact area, includes: extracting the boundaries of each caustic soda flake and identifying the contact boundary segments belonging to the contact area and the independent boundary segments belonging to the non-contact area; determining the edge ambiguity of each boundary segment; wherein the edge ambiguity is used to characterize the steepness of the gray-scale change at the corresponding boundary segment; and determining the boundary ambiguity index based on the minimum edge ambiguity in the independent boundary segments and the edge ambiguity of the contact boundary segments.
[0050] In the above scheme, extracting the boundaries of each caustic soda flake aims to obtain the set of outer contour pixels of the caustic soda flake on the image plane. This is usually achieved by chaining a binary mask using an eight-neighbor contour tracking algorithm, transforming continuous foreground edge pixels into ordered geometric curves. Based on this, the boundary pixels are strictly divided into two categories according to their local neighborhood attributes: contact boundary segments and independent boundary segments. Contact boundary segments refer to the set of pixels within a predetermined neighborhood (such as a 3×3 pixel window) of the boundary pixel that contain other caustic soda flake identifiers, corresponding to the interface region where two caustic soda flakes are in physical contact or overlap due to gravity. Independent boundary segments refer to the boundary portion within the neighborhood that contains only the pixels of the caustic soda flake itself or background pixels, representing the free edge of the caustic soda flake exposed to the environment but not adhering to other caustic soda flakes. It is understandable that the purpose of distinguishing between contact boundary segments and independent boundary segments is that: independent boundary segments usually maintain the clear edge characteristics of the original caustic soda production and can serve as a benchmark for a state that is not damp or sticky, while contact boundary segments may have capillary adhesion due to surface moisture absorption and stickiness, and their edge sharpness often deteriorates. By comparing the two, a relative ambiguity evaluation system can be established to avoid relying on an absolutely clear standard that is difficult to obtain.
[0051] In this embodiment of the application, the aforementioned edge ambiguity can be determined by at least one of the following methods:
[0052] The first method: Based on spatial domain grayscale profile analysis, the edge ambiguity is determined by quantifying the degree of widening of grayscale transition at the boundary.
[0053] In this method, sub-pixel-level grayscale sampling is performed on each pixel on the boundary segment along the normal direction perpendicular to the boundary direction to obtain a profile curve reflecting the change of grayscale value with spatial position. The width of the transition region, i.e., the pixel distance traversed by the grayscale value from the background value to the foreground value (or vice versa) in this profile, is used as a measure of edge blur. This width can be defined by various criteria, such as taking the position where the grayscale change rate reaches its maximum value as the edge center and measuring the distance between the half-width and half-height points on both sides, or directly calculating the pixel span required for the grayscale change to cover a specific proportion of the dynamic range. The wider the transition region, the smoother the grayscale change at the boundary, and the higher the edge blur.
[0054] The second approach is based on first-order gradient analysis, which assesses edge sharpness by calculating the gradient magnitude statistics of the local boundary region.
[0055] In this method, the Sobel, Prewitt, or Roberts operators can be used to perform convolution operations on the image to obtain the gray-level change rate components of each pixel in the horizontal and vertical directions, and then synthesize the gradient magnitude. For pixels on boundary segments, the average or maximum value of their gradient magnitudes is calculated as the reciprocal index of edge blur. The larger the gradient magnitude, the more drastic the gray-level change, the clearer the edge, and the lower the corresponding edge blur. This method has high computational efficiency and is suitable for detection scenarios with high real-time requirements.
[0056] The third approach: Based on the second-order differential properties of the Laplacian operator or the Gaussian-Laplacian operator, edge ambiguity is determined by detecting the sharpness or curvature of the zero-crossing points at the boundary.
[0057] In this method, a Laplacian convolution kernel is applied to pixels within the boundary neighborhood to calculate the second spatial derivative of the grayscale function. At ideal, sharp edges, the second derivative exhibits strong zero-crossing characteristics and a large peak amplitude, while at blurred edges, the extreme values of the second derivative decrease in amplitude, and the zero-crossing region widens. By statistically analyzing the amplitude of the extreme values of the second derivative or the width of the zero-crossing region on the boundary segment, the degree of edge blurring can be inferred. This method has a certain degree of noise suppression and is particularly suitable for boundary sharpness evaluation against complex texture backgrounds.
[0058] The fourth approach: Based on frequency domain analysis, the edge ambiguity is determined by examining the energy proportion of high-frequency components in the boundary neighborhood;
[0059] In this approach, a two-dimensional discrete Fourier transform or discrete cosine transform is performed on image patches in the neighborhood of the boundary segment to convert the spatial domain signal to the frequency domain. The energy ratio of high-frequency coefficients (corresponding to image details and edges) to low-frequency coefficients (corresponding to slowly changing background) is analyzed. The more blurred the edge, the more severe the attenuation of high-frequency components, and the lower the energy ratio. By setting an appropriate frequency threshold, the proportion of the total high-frequency energy above the threshold to the total energy is calculated as a quantitative indicator of edge blur. This method can effectively separate edge information from low-frequency background changes and is suitable for edge quality assessment in scenes with uneven illumination.
[0060] The fifth method: Determine the width of the transition region of grayscale changes through grayscale profiles, and then obtain the edge ambiguity of the boundary segment;
[0061] Optionally, determining the edge blur of each boundary segment includes: performing grayscale sampling along a direction perpendicular to the boundary for each pixel on the boundary segment to obtain a grayscale profile of each pixel; determining the edge width of each pixel based on the width of the transition region of grayscale change in the grayscale profile; and determining the average value of the edge width of each pixel on the boundary segment to obtain the edge blur of the boundary segment.
[0062] In the above scheme, the grayscale sampling operation for each pixel on the boundary segment aims to extract a one-dimensional signal sequence along the direction of the most dramatic grayscale change in the image, in order to quantify the boundary sharpness at that location. Since the boundary of an object in the image exhibits a step or ramp-like transition in grayscale values, and its gradient direction is perpendicular to the boundary direction, the sampling direction must strictly follow the boundary normal direction (i.e., the gradient direction) to ensure the capture of complete grayscale transition features. In practice, the boundary pixel can be used as the center, extending a set distance (e.g., 5 to 10 pixels each) along the normal direction to both sides. Bilinear interpolation or bicubic interpolation is used to extract sub-pixel-level grayscale values, generating a grayscale profile curve. The horizontal axis of this curve represents the distance from the sampling point to the boundary center, and the vertical axis represents the interpolated grayscale value at the corresponding location, reflecting the grayscale evolution process from the background to the foreground (or vice versa) at the boundary. Sub-pixel interpolation can improve the sampling accuracy to the sub-pixel level, avoiding the limitations of discrete pixel grids on fine edge width measurement.
[0063] When determining edge width based on grayscale profiles, the core lies in quantifying the spatial span experienced by grayscale as it transitions from a background steady-state value to a foreground steady-state value, i.e., the width of the transition region. This width physically corresponds to the convolution effect width of the point spread function at the boundary of an optical system, or the effective boundary broadening distance caused by the liquid film on the caustic soda surface. Determination methods can employ the full width at half maximum (FWHM) criterion: first, identify the maxima and minima of the grayscale profile, calculate their difference as the dynamic range, take the grayscale value corresponding to the midpoint of the dynamic range as the threshold, and measure the distance between the intersection of the grayscale profile and this threshold; or, use the first derivative method to smoothly differentiate the grayscale profile, taking the location of the derivative's maximum value as the edge center, and the width at half the derivative's peak value as the edge width. A wider transition region indicates a smoother grayscale change at the boundary, a more blurred edge, and a larger corresponding edge width value.
[0064] Taking the average edge width of each pixel on the boundary segment as the edge blur of that segment is a key step in suppressing local noise interference and obtaining a representative blur level based on the principle of statistical averaging. It is understandable that the edge width of a single pixel may have random deviations due to imaging noise, surface micro-texture, and local illumination fluctuations. By calculating the arithmetic mean (or weighted average, with weights set based on gradient confidence) of the edge widths of all pixels on the boundary segment, random errors can be effectively smoothed, resulting in a robust estimate of the overall blur level of that boundary segment. This average value, as the final output of the edge blur, has a clear physical meaning: its value is inversely proportional to the boundary sharpness. A larger value indicates a more significant widening effect of the caustic soda flake boundary due to moisture absorption and stickiness, providing a quantitative basis for subsequent comparison with the sharpness of independent boundaries.
[0065] It is understandable that an ideal sharp edge exhibits a step function characteristic in an image, while the surface liquid film and adhesion caused by moisture absorption degenerate the actual edge into a ramp function. The slope of the ramp (i.e., the width of the transition region) directly reflects the adhesion strength. The above scheme can accurately reconstruct the sub-pixel grayscale distribution of the edge through dense sampling and sub-pixel interpolation along the normal direction, and then quantify the degree of edge degradation by measuring the width of the transition region. The advantage of this method lies in its versatility and interpretability: it does not rely on specific edge model assumptions, and the degree of blurring can be evaluated solely through the geometric characteristics of the grayscale space distribution. It is applicable to boundary quality assessment under different lighting conditions and the reflective properties of caustic soda surface, and the physical intuitiveness of the transition region width helps to establish a physical correlation with the thickness of the liquid film on the caustic soda surface.
[0066] In a stacked caustic soda structure, the upper layer of caustic soda is directly exposed to the atmosphere. Its surface absorbs moisture from the air first, forming a liquid film that becomes sticky. This liquid film, under capillary action, not only blurs the contact boundary with the lower layer of caustic soda but also permeates according to the mass transfer law from the surface to the internal matrix. This allows the degree of blurring of the internal texture of the upper layer of caustic soda to truly and directly reflect the physical process and depth of moisture absorption and permeation. In contrast, the lower layer of caustic soda, being shielded by the upper layer, may have its internal state primarily derived from the gravitational permeation or contact wetting of the upper liquid film, rather than direct moisture absorption from contact with the air. Including the lower layer of caustic soda in the mandatory calculation of internal ambiguity indicators may introduce non-intrinsic ambiguity interference caused by interlayer liquid migration, obscuring the criteria for determining the degree of agglomeration. Therefore, by focusing on the internal fuzzy index calculation of at least one caustic soda flake (usually the upper layer caustic soda flake), it is possible to establish a causal relationship between the fuzziness of the contact boundary and internal penetration, verify the authenticity of the clumping signs, avoid redundant analysis of the lower layer caustic soda flake, optimize the allocation of computational resources, and ensure that the determination of the degree of clumping accurately reflects the essential characteristics of moisture absorption and penetration from the surface of the caustic soda flake into the interior.
[0067] In this embodiment of the application, the aforementioned internal fuzzy index can be determined by at least one of the following methods:
[0068] The first approach: Spatial domain analysis based on image gradient operators, which quantifies texture clarity by calculating the degree of drastic change in pixel grayscale within the caustic soda flakes;
[0069] In this method, first-order differential operators such as Sobel, Prewitt, or Roberts can be used to perform convolution operations on each pixel within the caustic soda mask area to obtain the gray-level change rate components in the horizontal and vertical directions. The gradient magnitude of each pixel is then calculated through vector synthesis. Furthermore, a central tendency index (such as the arithmetic mean or median) of the gradient magnitudes of all pixels within the area is statistically analyzed as an indicator of the sharpness of the caustic soda. Since texture blurring is essentially a loss of detail information, manifested as a decrease in the gray-level change rate, the sharpness index is converted into an internal blur index through a monotonically decreasing mathematical mapping (such as a negative exponential function or reciprocal relationship). This causes the index value to monotonically increase as texture sharpness decreases, thereby quantifying the degree of structural deterioration caused by moisture absorption within the caustic soda.
[0070] The second approach is a statistical texture analysis method based on the gray-level co-occurrence matrix, which assesses texture complexity by analyzing the spatial dependency of gray levels within the caustic soda flakes.
[0071] In this method, a gray-level co-occurrence matrix can be constructed within the caustic soda mask area at specific distances and directions (e.g., 0°, 45°, 90°, 135°). The frequency of pixel pairs with specific gray-level relationships is statistically analyzed. Texture feature parameters such as contrast, inverse moment, or entropy are extracted from this matrix. Contrast reflects the drasticness of local gray-level changes, while inverse moment reflects the uniformity of gray-level distribution. These parameters, such as contrast or inverse moment, are used as a sharpness measure and converted into an internal blur index through normalization and monotonic mapping. When the interior of the caustic soda becomes blurred due to moisture absorption, the contrast decreases while the inverse moment increases, and the corresponding blur index changes accordingly, thus characterizing the preservation of internal texture details.
[0072] The third approach is a frequency domain analysis method based on discrete Fourier transform or discrete cosine transform, which assesses texture clarity by examining the energy proportion of high-frequency components within the caustic soda flakes.
[0073] In this method, a two-dimensional frequency domain transformation is performed on the image block within the caustic soda mask area, converting the grayscale distribution in the spatial domain to the frequency domain. The energy distribution of high-frequency coefficients (corresponding to image details, edges, and texture) and low-frequency coefficients (corresponding to slowly changing brightness components) is analyzed. When the texture becomes blurred due to moisture absorption within the caustic soda flakes, the high-frequency detail components attenuate, and the proportion of high-frequency energy decreases. By calculating the proportion of high-frequency energy to the total spectral energy (or the ratio of high-frequency to low-frequency energy), a quantitative indicator of sharpness is obtained. Furthermore, an internal blur index is obtained through normalization and inversion mapping. This method exhibits a certain degree of robustness to illumination changes and can effectively distinguish between overall brightness changes and actual loss of texture details.
[0074] The fourth method: Determine the internal fuzzy index through gradient magnitude;
[0075] Optionally, step S130 above, which determines the internal blur index, includes: calculating the gradient magnitude of each pixel within the caustic soda area, and determining the sharpness index based on the statistics of the gradient magnitude; wherein the sharpness index is used to characterize the clarity of the internal texture of the caustic soda; and determining the internal blur index based on the sharpness index; wherein the internal blur index decreases as the sharpness index increases.
[0076] The image gradient described above characterizes the rate of change of grayscale values in the spatial dimension. Its magnitude, as a scalar measure, quantifies the intensity of grayscale changes at a specific pixel location, reflecting the richness of texture details or the salience of edges in the neighborhood of that point. In the visible light image of caustic soda flakes, the surface of normal, un-dampened caustic soda flakes exhibits a clear crystalline granular structure, with significant grayscale jumps at the particle boundaries, resulting in larger gradient magnitudes for the corresponding pixels. However, when caustic soda flakes absorb moisture, causing surface dissolution and destruction of the internal crystalline structure, the texture details tend to smooth out, grayscale changes become more gradual, and the gradient magnitude of the corresponding pixels decreases accordingly. To calculate the gradient magnitude of each pixel within the caustic soda flake region, a first-order differential operator (such as the Sobel operator, Prewitt operator, or Scharr operator) is typically used to perform convolution operations on the image, obtaining the grayscale partial derivative components in the horizontal and vertical directions respectively. The gradient magnitude is then synthesized by summing the Euclidean norm or absolute values, thereby suppressing noise interference while preserving edge and texture sensitivity.
[0077] The above scheme determines the sharpness index based on the statistics of gradient amplitude, aiming to aggregate a large number of discrete pixel-level gradient information within the caustic soda flake area into a single value characterizing the overall texture sharpness. Implementation methods for determining the sharpness index based on the statistics of gradient amplitude include: calculating the arithmetic mean of the gradient amplitudes of all pixels in the area to reflect the average contrast level within the caustic soda flake; or using the median statistic to reduce the interference of individual noisy pixels or local reflection anomalies on the overall evaluation; or calculating the proportion of pixels with gradient amplitudes exceeding a specific threshold to characterize the density of strong texture edges. This sharpness index is positively correlated with the sharpness of the texture within the caustic soda flake, i.e., the larger the index value, the more complete the internal crystal structure of the caustic soda flake is preserved, the sharper the texture, and the less moisture absorption and penetration; conversely, the smaller the index value, the more blurred the texture and the more severe the internal moisture absorption.
[0078] Determining the internal fuzziness index based on the sharpness index requires establishing a fuzziness metric that changes inversely to sharpness through a monotonically decreasing mathematical mapping. Possible forms of fuzziness metric include negative exponential mapping, where the sharpness index is used as the negative exponent of an exponential function, utilizing the decaying property of the exponential function to compress larger sharpness values to near-zero fuzziness, while amplifying smaller sharpness values to higher fuzziness; or reciprocal mapping, using the reciprocal of the sharpness index (smoothed to avoid division by zero) as the fuzziness, making fuzziness inversely proportional to sharpness; or linear normalization mapping, first normalizing the sharpness index to a standard range, then obtaining the fuzziness through complement operations (e.g., subtracting the normalized value from one). Regardless of the specific function form used, the core constraint is to ensure that the internal fuzziness index monotonically decreases as the sharpness index increases, thus guaranteeing consistency in physical meaning: that is, the sharper the fuzziness, the lower the fuzziness index; the more fuzzy the fuzziness, the higher the fuzziness index.
[0079] The aforementioned gradient statistics and mapping transformation scheme establishes a direct correspondence with the physical mechanism of caustic soda ash hygroscopic agglomeration. The agglomeration of caustic soda ash is essentially a dissolution and recrystallization process that occurs after sodium hydroxide crystals absorb moisture. This process directly leads to the smoothing of the surface microstructure and the dissolution of crystal boundaries, manifested as the attenuation of high-frequency components in the image texture. By capturing this high-frequency attenuation through gradient amplitude and suppressing random noise with statistical measures, and then converting it into an intuitive fuzzy index through monotonic mapping, it is possible not only to reliably quantify the degree of moisture absorption within the caustic soda ash, but also to facilitate subsequent correlation analysis and numerical comparison with the scalar boundary fuzzy index, which is also a scalar, thus achieving effective aggregation from pixel-level features to caustic soda ash-level state determination.
[0080] Step S140: Calculate the correlation index based on the boundary fuzzy index and the internal fuzzy index; wherein the correlation index is used to characterize the degree of correlation between the boundary fuzzy index and the internal fuzzy index.
[0081] The aforementioned correlation index is a characteristic parameter used to quantify the statistical correlation between the boundary blurring index of the contact area and the blurring index within adjacent caustic soda flakes. Its value characterizes the consistency between boundary degradation caused by moisture absorption and stickiness on the caustic soda surface and texture deterioration caused by moisture absorption in the internal matrix. In the physical process of caustic soda agglomeration, moisture absorption follows a mass transfer law from the surface to the interior, resulting in a monotonic correlation between the blurring degree of the contact boundary and the blurring degree of texture within the caustic soda flakes, exhibiting a co-evolutionary pattern. Therefore, by capturing this cross-scale characteristic correlation, the correlation index effectively verifies whether the observed boundary blurring originates from a genuine moisture absorption and penetration process, rather than an accidental phenomenon caused by external light interference or surface contamination, thus providing a physically consistent criterion for determining the degree of agglomeration.
[0082] In this application embodiment, at least one of the following methods can be used to calculate the correlation index:
[0083] The first approach is to use the Pearson product-moment correlation coefficient to quantify the linear dependence between boundary fuzzy indices and internal fuzzy indices based on the linear correlation measure of covariance analysis.
[0084] In this approach, the correlation coefficient, ranging from -1 to 1, is obtained by calculating the ratio of the covariance of two sets of indicators to their respective geometric mean standard deviations. Positive values indicate a positive correlation, while negative values indicate a negative correlation. The absolute value reflects the strength of the linear correlation. This method is suitable for scenarios where boundary ambiguity and internal ambiguity approximately change proportionally. It can accurately quantify the linearity of their coordinated changes, providing parameter basis for physical modeling of clumping levels. However, its effectiveness relies on the assumption that the variables approximately follow a joint normal distribution and that there are no significant outliers. Its sensitivity to nonlinear monotonic relationships is lower than that of the rank correlation method.
[0085] The second approach is to use mutual information measurement based on information theory to define a correlation index by utilizing the statistical dependence between boundary fuzzy indicators and internal fuzzy indicators.
[0086] In this approach, the mutual information value can be calculated by estimating the relative entropy of the joint probability density function and the marginal probability density function of the two variables. This value quantifies the reduction (or conversely, the reduction) in uncertainty of the internal fuzzy index after knowing the boundary fuzzy index. The mutual information method does not require a specific functional form between the variables and can simultaneously capture linear and nonlinear relationships. It is suitable for scenarios where uneven surface reflectivity of caustic soda flakes or changes in lighting conditions lead to complex nonlinear mappings between boundary features and internal textures. Furthermore, the maximum information coefficient can be used for normalization, standardizing the correlation index to the [0,1] interval, which facilitates numerical comparison with other feature indices.
[0087] The third approach is monotonic correlation analysis based on rank statistics, which quantifies the degree of monotonic correlation between the two by calculating the ranking consistency between the boundary fuzzy index and the internal fuzzy index.
[0088] Optionally, step S140 may include: sorting each contact region according to the boundary fuzziness index to obtain an ordered sequence of internal fuzziness indices; and calculating the monotonic correlation between the boundary fuzziness index and the internal fuzziness index based on the sorting relationship between the boundary fuzziness index and the internal fuzziness index to obtain the correlation index between the boundary fuzziness index and the internal fuzziness index.
[0089] Sort each contact region according to the boundary fuzziness index. Essentially, this establishes a rank sequence of boundary adhesion degrees. Through a permutation operation, discrete contact region samples are organized into monotonically increasing or decreasing ordered sets based on the degree of boundary degradation, thus obtaining the corresponding ordered sequence of internal fuzziness indices. This sequence reflects the accompanying change trajectory of the degree of internal texture fuzziness as the contact boundary between caustic soda flakes evolves from clear to fuzzy. If the caustic soda flakes are indeed in a gradual process of hygroscopic agglomeration, the ordered sequence should show a monotonically non-decreasing (or non-increasing, depending on the direction of the index definition) trend, that is, the more fuzzy the boundary, the more fuzzy the interior. Conversely, if the sequence shows random fluctuations or a reverse trend, it indicates that there is no physical correlation between boundary fuzziness and internal fuzziness, which may originate from noise interference or non-agglomeration factors.
[0090] Calculating the degree of monotonic correlation based on the ranking relationship between boundary fuzziness indices and internal fuzziness indices is a mathematical process that uses nonparametric statistical methods to quantify the monotonic consistency of two variables. Optional implementation methods include calculating the Spearman rank correlation coefficient, which assesses ranking consistency by comparing the sum of squared differences in the ranks of the two variables; its value ranges from [-1, 1], with values closer to 1 indicating a stronger positive monotonic correlation. Alternatively, the Kendall coefficient can be used, assessing ranking association by the difference in the number of statistically consistent and inconsistent pairs, exhibiting stronger robustness to outliers. These methods do not assume a linear relationship between variables, nor do they require the data to follow a specific distribution; they only need to verify whether the internal fuzziness index increases synchronously with the increase of the boundary fuzziness index, thereby capturing the co-evolutionary characteristics of surface degradation and internal deterioration during hygroscopic infiltration.
[0091] Compared to linear correlation methods that directly compare raw values, the rank statistics used in the above scheme are insensitive to imaging noise, differences in the surface reflectivity of caustic soda flakes, and local illumination fluctuations. This is because the ranking operation weakens the influence of absolute numerical fluctuations, retaining only the order information of relative magnitudes. Furthermore, the relationship between boundary ambiguity and internal ambiguity during caustic soda flake agglomeration may exhibit nonlinear acceleration or delay characteristics depending on environmental humidity, caustic soda flake thickness, and stacking pressure. Monotonic correlation analysis can capture this nonlinear but unidirectional dependency, ensuring reliable verification of the physical consistency of moisture absorption and permeation under various operating conditions, providing a solid physical basis for accurately determining the degree of agglomeration.
[0092] Step S150: Determine the distribution difference index based on the internal fuzzy index of each caustic soda flake; wherein, the distribution difference index is used to characterize the spatial distribution difference of the degree of moisture absorption inside the caustic soda flake.
[0093] The aforementioned distribution difference index is a characteristic parameter used to quantify the dispersion of fuzzy indicators among individual caustic soda flakes within a caustic soda pile. Its value characterizes the spatial heterogeneity and uneven distribution of moisture levels within the caustic soda group. In actual caustic soda storage environments, due to geometric differences in stacking locations, local defects in packaging sealing, and spatial gradients in environmental exposure, the sufficiency of contact between caustic soda and air varies in different areas, leading to asynchronous and non-uniform evolution of the moisture absorption and agglomeration process. This index quantifies this inconsistency in moisture absorption caused by environmental factors by capturing the deviation of fuzzy indicators within each caustic soda flake from the group's concentration trend, reflecting the mottled and gradual changes in the appearance of the caustic soda pile and the differences in local agglomeration states. As an important correction factor for determining the degree of agglomeration, the distribution difference index transforms spatial non-uniformity into numerical weights. When the difference in moisture levels among caustic soda flakes is large, this index amplifies the assessment value of the agglomeration degree, indicating that the caustic soda pile has entered a non-uniform agglomeration development stage, requiring targeted graded treatment measures.
[0094] In this embodiment of the application, the above step S150 can determine the distribution difference index by at least one of the following methods:
[0095] The first approach is to calculate robust statistics based on the range or interquartile range, quantifying the degree of difference by examining the range of values of internal fuzzy indicators or the distribution width of the middle 50% of the data.
[0096] In this approach, the range can be defined as the difference between the maximum and minimum values, which can intuitively reflect the extreme differences in the degree of moisture absorption among caustic soda flakes. The interquartile range is defined as the difference between the third quartile and the first quartile, eliminating the influence of outliers at both ends (such as abnormally blurred caustic soda flakes caused by accidental contamination), and more robustly representing the internal differences of the mainstream caustic soda flake group. These methods are highly robust to data that are not normally distributed or contain outliers, and are suitable for scenarios where there are individual severely damp or completely normal caustic soda flakes in a caustic soda flake pile, avoiding the excessive influence of extreme values on the assessment of overall distribution differences.
[0097] The second approach is based on the relative dispersion measure of the coefficient of variation. By using the ratio of the standard deviation to the mean as the distribution difference index, the influence of the absolute scale difference of the internal blur index under different batches or different imaging conditions can be eliminated.
[0098] In this approach, the coefficient of variation is used as a dimensionless relative indicator, making the unevenness of moisture absorption between different measurement scales or different types of caustic soda comparable. When the overall moisture absorption of the caustic soda population is relatively light (with a small mean) but the differences between individuals are relatively large, the coefficient of variation can effectively amplify this relative dispersion, indicating that even if the average degree of clumping is not high, there are already significant quality differences in local areas, and high-ambiguity caustic soda should be prioritized for treatment to prevent further quality deterioration.
[0099] The third method is to calculate the spatial distribution difference by quantifying the degree of dispersion of the internal fuzzy index of each caustic soda flake relative to the mean.
[0100] Optionally, step S150 above may include: statistically analyzing the internal fuzzy indices of each caustic soda flake to obtain a set of internal fuzzy indices; calculating the dispersion statistic of the set of internal fuzzy indices to obtain a distribution difference index; wherein, the dispersion statistic is used to quantify the spatial distribution difference of the internal moisture content of each caustic soda flake, reflecting the uneven moisture content caused by environmental factors during the caustic soda agglomeration process.
[0101] The aforementioned set of internal fuzzy indicators is a sample dataset composed of the internal fuzzy indicators of each caustic soda flake (usually the uppermost caustic soda flake corresponding to the contact area). Mathematically, it is a set of observed random variables reflecting the internal moisture state of the caustic soda flake group. The purpose of establishing this set is to aggregate the local state information of individual caustic soda flakes into group statistical characteristics. By analyzing the distribution pattern of the data within the set, the spatial heterogeneity of the moisture degree within the caustic soda flake pile can be revealed. The dispersion statistic is a parameter used to characterize the discrete characteristics of this dataset deviating from its central tendency (such as the arithmetic mean or median). Its value directly maps the consistency or difference in the internal fuzziness degree among the caustic soda flakes and is a core indicator for quantifying spatial distribution differences.
[0102] Several classical and robust statistical methods can be used to calculate the dispersion statistics: First, variance or standard deviation can be used. By calculating the squared mean (or corrected sample variance) of the deviations of each internal fuzzy index from the arithmetic mean and its positive square root, the fluctuation range of the data around the mean can be quantified. The standard deviation has the same dimension as the original data, making it easy to interpret intuitively. Second, the coefficient of variation, i.e., the ratio of the standard deviation to the mean, can be used as a dimensionless relative dispersion index. This is suitable for eliminating absolute scale differences caused by different batches or different specifications of caustic soda flakes, enabling comparable analysis of uneven moisture absorption across different scenarios. Third, the range or interquartile range can be used. The former is the difference between the maximum and minimum values, and the latter is the difference between the third quartile and the first quartile. These robust statistics are not sensitive to outliers (such as abnormally high fuzzy individuals caused by local contamination) and can more reliably reflect the internal difference level of the mainstream caustic soda flake population. Fourth, entropy based on information theory or the Gini coefficient in economics can also be used. By analyzing the probability distribution of internal fuzzy indicators, the unevenness or uncertainty of the distribution can be quantified.
[0103] It is understandable that in actual stacked storage environments, due to local defects in packaging sealing, geometric differences in stacking locations (such as differences in ventilation conditions between the edges and the center), and microscopic gradients in the distribution of ambient humidity, the absorption of moisture from the air by the caustic soda flakes is not synchronous and homogeneous, but rather exhibits significant spatiotemporal heterogeneity. Some caustic soda flakes become damp and blurred first due to sufficient exposure, while others remain dry and clear, resulting in a broad distribution characteristic of the internal fuzzy index set. The dispersion statistic captures the mottled gradual change phenomenon caused by environmental factors during the agglomeration process by numerically representing the spread of this distribution: the larger the statistic, the more uneven the degree of moisture absorption among the caustic soda flakes, and the more significant the spatial distribution differences, suggesting that the caustic soda flake pile is in a non-uniform gradual agglomeration stage; conversely, a smaller statistic indicates that the moisture state of each caustic soda flake is relatively consistent, possibly in a state of uniform moisture absorption or overall dryness.
[0104] The technical necessity of using the dispersion statistic as a distribution difference index in the above scheme lies in overcoming the information masking effect of a single central tendency indicator (such as the mean) and accurately identifying early characteristics of clumping. If only the mean of an internally ambiguous indicator is relied upon for judgment, it may be impossible to distinguish between two drastically different physical states: "all caustic soda flakes are uniformly moderately damp" and "some caustic soda flakes are severely damp while others are normal." The former may correspond to overall sealing failure, while the latter corresponds to localized leakage or early clumping. In fact, in the early stages of clumping, localized caustic soda flakes are often preferentially damp. At this time, the mean may not have increased significantly, but the dispersion has already increased significantly. By introducing the dispersion statistic as a distribution difference index and incorporating it into the final caustic soda clumping index calculation (e.g., as a multiplicative weight), the system can effectively amplify the influence of this non-uniformity on clumping judgment, thereby issuing an early warning in the early stages of clumping (when the boundaries are blurred but there is no large-scale adhesion), avoiding the lag caused by relying solely on the mean, and achieving a more comprehensive and sensitive quantitative assessment of the degree of caustic soda clumping.
[0105] Step S160: Based on the correlation index and the distribution difference index, determine the caustic soda caking index, and classify the degree of caking based on the caustic soda caking index.
[0106] The aforementioned caustic soda caking index is a comprehensive quantitative indicator that integrates multi-dimensional characteristics such as boundary adhesion properties, internal permeability consistency, and spatial distribution heterogeneity. After normalization, its value is typically mapped to a continuous range of 0 to 1, where 0 represents a completely normal, non-moisture-affected state, 1 represents severe caking, and intermediate values correspond to different degrees in the gradual caking process. This index establishes a non-linear mapping relationship from microscopic boundary characteristics to macroscopic caking states by integrating the moisture absorption and permeability physical consistency verified by the correlation index and the moisture unevenness reflected by the distribution difference index. It can sensitively capture the early caking stage of caustic soda, where it still maintains a loose, flaky structure but has already shown surface moisture absorption and adhesion, providing a quantitative decision-making basis for automated caking degree grading.
[0107] Optionally, step S160 above may include: calculating the statistics of the boundary ambiguity index, and determining the intermediate agglomeration index based on the product of the statistics and the correlation index; wherein the intermediate agglomeration index is used to characterize the preliminary agglomeration degree determined based on the correlation between boundary adhesion and internal permeability; and determining the caustic soda flake agglomeration index based on the intermediate agglomeration index and the distribution difference index.
[0108] The aforementioned boundary ambiguity index statistics are central tendency parameters obtained by aggregating the boundary ambiguity indices of each contact area, aiming to quantify the average degradation level of the overall boundary adhesion of the caustic soda flake population. This statistic is typically expressed as an arithmetic mean, obtained by summing the boundary ambiguity indices of all contact areas and dividing by the sample size, reflecting the typical level of boundary ambiguity in the caustic soda flake pile. Alternatively, a weighted average can be used, with the area of the contact area or the importance of the caustic soda flakes as weights, highlighting the contribution of large-area contact interfaces to the overall clumping state; or the median can be used to suppress the outlier effects of individual abnormal contact areas. This statistic serves as a macroscopic representation of the severity of hygroscopic adhesion on the caustic soda flake surface; a smaller value indicates more severe overall boundary adhesion, providing a basic quantitative basis for determining the initial degree of clumping. The intermediate clumping index is a transitional comprehensive index constructed by integrating the boundary ambiguity index statistics and correlation indices. Its physical connotation characterizes the initial degree of clumping verified based on the consistency between surface boundary degradation and internal permeation. The calculation mechanism of this index reflects a hierarchical structure of causality verification: the boundary fuzziness index statistic provides a quantitative description of the adhesion state of the caustic soda flakes, while the correlation index provides confidence verification of whether this surface degradation originates from the actual hygroscopic permeation process; multiplying the two (or performing other monotonic combination operations) makes it so that when the value of the intermediate clumping index is high, it indicates both severe boundary adhesion and a highly consistent physical correlation between this adhesion and internal permeation, thus confirming it as a real clumping sign rather than an illusion.
[0109] The above scheme determines the final caustic soda caking index based on the intermediate caking index and the distribution difference index, employing a phased fusion strategy to comprehensively characterize the spatial heterogeneity of the caking state. Its working principle is as follows: the intermediate caking index reflects the average caking level and physical consistency of the caustic soda flake population, but it cannot distinguish between uniform caking and locally severe caking; the distribution difference index quantifies the spatial dispersion of moisture levels among caustic soda flakes. When a caustic soda pile enters the early stage of caking, some caustic soda flakes are preferentially moistened while others remain normal, leading to a significant increase in distribution difference. By multiplicatively combining the intermediate caking index and the distribution difference index (or performing other augmentation operations), the final caustic soda caking index is significantly amplified when the spatial distribution difference is large, thus sensitively capturing the non-uniform characteristics of the early stage of caking; conversely, if all caustic soda flakes are uniformly moistened and the distribution difference index is small, the caking index is mainly determined by the intermediate caking index. This hierarchical architecture ensures that the determination of the degree of clumping considers both the overall average state and the local extreme risks, achieving a progressive fusion from macroscopic consistency to microscopic heterogeneity, and improving the detection sensitivity and determination reliability in the early clumping stage.
[0110] To facilitate understanding of the working principle of the above-described automatic caustic soda flake agglomeration degree classification method based on image processing, this application embodiment also provides a specific application example of this method in a certain application scenario. In this application scenario, the above-described automatic caustic soda flake agglomeration degree classification method based on image processing mainly includes:
[0111] Step 1: Acquisition of caustic soda flake image data;
[0112] Visible light and depth images of the caustic soda flake stacking scene were simultaneously acquired using an RGB-D camera. The visible light image was used to capture the texture and boundary details of the caustic soda surface, while the depth image was used to record the distance information of each pixel relative to the imaging plane. During the acquisition process, illumination conditions were controlled to ensure uniform diffuse illumination and avoid specular reflection and shadow interference. Median filtering for noise reduction and histogram equalization for contrast enhancement were performed on the visible light image to suppress noise and enhance the grayscale differences at the edges of the caustic soda flakes. Pixel-level registration (alignment) was performed between the depth image and the visible light image to establish a mapping relationship between two-dimensional image coordinates and three-dimensional spatial coordinates, providing a data foundation for subsequent layering determination.
[0113] Step 2: Sodium hydroxide flakes segmentation and area pre-screening;
[0114] The preprocessed visible light image is processed using Otsu's adaptive threshold segmentation method or a pre-trained deep learning semantic segmentation model to generate a binary mask to distinguish the foreground and background of caustic soda flakes. Eight-neighbor connected component analysis is performed on the binary mask, assigning a unique identifier to each independent caustic soda flake region to obtain a labeled image. The pixel area of each connected component is statistically analyzed, and area statistics (such as arithmetic mean or median) are calculated. If the area statistics exceed a preset threshold (usually 1.5 to 2.0 times the normal caustic soda flake area), the caustic soda flake agglomeration index is directly determined to be the maximum value of 1, indicating that large-area adhesion and agglomeration of the caustic soda flakes has occurred, and the agglomeration degree is graded based on this index. If the threshold is not exceeded, it is determined to be a potentially slight agglomeration state, and the process proceeds to subsequent fine quantification.
[0115] Step 3: Identification of contact areas and determination of adjacent caustic soda flakes;
[0116] Morphological dilation operations (typically using 3×3 square structural elements) are performed on the masked regions of each caustic soda flake. A logical AND operation is then performed on the dilated caustic soda flake masks. The contact areas between caustic soda flakes are detected through mask intersection, and the identification information of adjacent caustic soda flakes constituting these contact areas is recorded. Based on the aligned depth images, depth statistics (such as average depth values) are extracted from the masked regions of each adjacent caustic soda flake. By comparing the depth values, the caustic soda flake located in the upper layer (with the smaller depth value) is determined. This upper-layer caustic soda flake is used as the object for calculating the internal fuzzy index, ensuring that subsequent analysis conforms to the physical causal relationship of moisture absorption from the surface to the interior.
[0117] Step 4: Determine the ambiguity index of the contact area boundary;
[0118] Contour tracing is performed on each caustic soda mask to extract the boundary pixel set. Based on pixel neighborhood attributes, contact boundary segments belonging to the contact area and independent boundary segments belonging to the non-contact area are identified. For each boundary segment, sub-pixel-level grayscale sampling is performed along the direction perpendicular to the boundary to obtain a grayscale profile. The edge width of each pixel is determined based on the width of the transition region (e.g., full width at half maximum) of grayscale changes in the grayscale profile. The average edge width of each pixel on the boundary segment is taken as the edge blur of that boundary segment. The minimum edge blur value is selected from all independent boundary segments as the global sharpest boundary benchmark. The ratio of this benchmark value to the edge blur of each contact boundary segment is calculated to obtain the boundary blur index of each contact area. The smaller the index, the more severe the blur caused by boundary adhesion.
[0119] Step 5: Determining the fuzzy indicators within the upper layer of caustic soda flakes;
[0120] For each upper layer of caustic soda flakes determined in step three, the Sobel operator is used to calculate the gradient magnitude of each pixel within its mask area. The average gradient magnitude of all pixels is then used as the sharpness index (this index characterizes the clarity of the internal texture of the caustic soda flakes and is positively correlated with the gradient magnitude). Based on the sharpness index, an internal blur index is determined through a monotonically decreasing mapping (such as a negative exponential function), ensuring that the internal blur index decreases as the sharpness index increases. That is, the clearer the interior of the caustic soda flakes, the lower the blur index; the more severe the internal moisture, the higher the blur index.
[0121] Step 6: Calculate the correlation index and intermediate block index;
[0122] Boundary ambiguity indices and internal ambiguity indices of the upper caustic soda flakes were collected for all contact areas. The contact areas were then sorted according to their boundary ambiguity indices to obtain an ordered sequence of corresponding internal ambiguity indices. Based on the sorting relationship between the boundary ambiguity indices and the internal ambiguity indices, the Spearman rank correlation coefficient or Kendall's concordance coefficient was used to calculate the monotonic correlation between them, obtaining a correlation index (the closer the index is to 1, the stronger the monotonic positive correlation between boundary ambiguity and internal ambiguity, and the more consistent it is with the physical process of hygroscopic infiltration). The arithmetic mean of the boundary ambiguity indices of all contact areas was calculated as a statistic. This statistic was multiplied by the correlation index to determine the intermediate agglomeration index, characterizing the preliminary agglomeration degree verified based on the correlation between boundary adhesion and internal infiltration.
[0123] Step 7: Determine the distribution difference index and the caustic soda caking index;
[0124] The internal fuzzy indices of all upper-layer caustic soda flakes are statistically analyzed to form an internal fuzzy index set. The dispersion statistics of this set (such as variance, standard deviation, or coefficient of variation) are calculated as a distribution difference index. This index is used to quantify the spatial distribution differences in the degree of moisture absorption within each caustic soda flake, reflecting the unevenness of moisture absorption caused by environmental factors. The intermediate clumping index obtained in step six is multiplicatively combined (or weighted fusion) with the distribution difference index to determine the final caustic soda flake clumping index. The distribution difference index serves as a weighting factor to amplify the influence of unevenness on clumping determination, so that when the difference in the degree of moisture absorption between caustic soda flakes is significant, the final clumping index increases accordingly, sensitively capturing the non-uniform characteristics of early clumping.
[0125] Step 8: Grading of clumping degree and post-processing;
[0126] Based on the caustic soda caking index (range 0 to 1, where 0 represents completely normal and 1 represents complete caking) determined in step seven, a three-level classification is implemented: when the index is below 0.3, it is considered slightly damp, and an immediate sealing and packaging strategy is adopted, prioritizing its use; when the index is between 0.3 and 0.7, it is considered moderately caking, and mechanical crushing, sieving to remove surface deteriorated powder, and consumption within a specified time are carried out; when the index is above 0.7, it is considered severely deteriorated and caking, and sampling and testing of the effective component content are performed, with a decision made based on the results to downgrade its use or dispose of it according to hazardous waste regulations. This classification result can automatically trigger the corresponding post-processing procedures, realizing automated monitoring and differentiated management of caustic soda caking status.
[0127] like Figure 4 As shown, based on the same inventive concept, this application also provides an automatic grading system 200 for the degree of caustic soda agglomeration based on image processing, including: a host computer 210 and an image acquisition device 220 communicatively connected to the host computer 210, wherein:
[0128] Image acquisition device 220 is used to acquire image data of caustic soda flakes and send it to host computer 210;
[0129] The host computer 210 is used to acquire image data of caustic soda flakes; identify the contact areas between caustic soda flakes and the adjacent caustic soda flakes corresponding to the contact areas; determine the boundary fuzziness index of the contact areas and the internal fuzziness index of at least one of the adjacent caustic soda flakes; calculate the correlation index based on the boundary fuzziness index and the internal fuzziness index; wherein the correlation index is used to characterize the degree of correlation between the boundary fuzziness index and the internal fuzziness index; determine the distribution difference index based on the internal fuzziness index of each caustic soda flake; wherein the distribution difference index is used to characterize the spatial distribution difference of the moisture content inside the caustic soda flakes; determine the caustic soda flake agglomeration index based on the correlation index and the distribution difference index, and classify the degree of agglomeration based on the caustic soda flake agglomeration index.
[0130] It is understood that the host computer 210 described above can realize any function of the automatic grading method for the degree of caustic soda agglomeration based on image processing provided in the embodiments of this application. The method embodiment section describes the way it realizes each function and the working principle. The system embodiment section will not repeat the description.
[0131] This invention is now complete.
[0132] In summary, in this embodiment, image data of caustic soda is acquired; contact areas between caustic soda flakes and adjacent caustic soda flakes corresponding to the contact areas are identified; boundary fuzziness indices of the contact areas and internal fuzziness indices of at least one of the adjacent caustic soda flakes are determined; a correlation index is calculated based on the boundary fuzziness index and the internal fuzziness index; wherein the correlation index is used to characterize the degree of correlation between the boundary fuzziness index and the internal fuzziness index; a distribution difference index is determined based on the internal fuzziness index of each caustic soda flake; wherein the distribution difference index is used to characterize the spatial distribution difference of the internal moisture content of the caustic soda flakes; and a clumping index of caustic soda flakes is determined based on the correlation index and the distribution difference index, and the degree of clumping is graded based on the clumping index.
[0133] This invention analyzes the correlation between the ambiguity of the boundary of the contact area of caustic soda flakes and the ambiguity of the internal texture of adjacent caustic soda flakes. Combined with the spatial distribution differences in moisture levels among the caustic soda flakes, it achieves quantitative identification of the early stage of caustic soda agglomeration. This overcomes the problem of missed early agglomeration caused by traditional methods relying solely on agglomerate size, thus improving the accuracy of agglomeration degree grading. Furthermore, based on the correlation index calculated from boundary ambiguity and internal ambiguity indices, it can verify the physical process of moisture absorption and penetration from the caustic soda surface. By quantifying the monotonic correlation between boundary adhesion and internal moisture, it effectively distinguishes between genuine agglomeration signs caused by moisture and accidental surface contamination or light interference, enhancing the identification of agglomeration. The reliability of the degree of agglomeration determination is improved. On the one hand, by calculating the distribution difference index of fuzzy indicators within each caustic soda flake, the unevenness of moisture absorption caused by environmental factors within the caustic soda flake pile is quantified. The discrete characteristics of the spatial distribution of fuzziness degree during the agglomeration process are used as a weighting factor for the agglomeration degree, so that the grading results can reflect the actual non-uniform deterioration state of the caustic soda flakes, thus optimizing the quantitative accuracy of the agglomeration degree. On the other hand, based on image processing technology, automatic detection and grading of the agglomeration degree of caustic soda flakes are realized. By replacing manual observation with machine vision, subjective judgment differences are eliminated, and objective quantification of the subtle adhesion and texture changes on the surface of caustic soda flakes is achieved, providing technical support for the automated monitoring of the storage quality of caustic soda flakes.
[0134] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An automatic flake caustic agglomerate degree grading method based on image processing, characterized by, The method includes: Acquire image data of caustic soda flakes; Identify the contact areas between caustic soda flakes and the adjacent caustic soda flakes corresponding to the contact areas; Determine the boundary fuzziness index of the contact area and the internal fuzziness index of at least one of the adjacent caustic soda flakes, wherein determining the boundary fuzziness index of the contact area specifically includes: Extract the boundaries of each caustic soda flake, and identify the contact boundary segments belonging to the contact area and the independent boundary segments belonging to the non-contact area within the boundaries; Determine the edge ambiguity of each boundary segment; wherein the edge ambiguity is used to characterize the steepness of the gray-scale change at the corresponding boundary segment; The boundary ambiguity index is determined based on the minimum edge ambiguity in the independent boundary segment and the edge ambiguity of the contact boundary segment; Based on the boundary fuzziness index and the internal fuzziness index, a correlation index is calculated; wherein, the correlation index is used to characterize the degree of correlation between the boundary fuzziness index and the internal fuzziness index. Based on the internal fuzzy index of each caustic soda flake, a distribution difference index is determined; wherein, the distribution difference index is used to characterize the spatial distribution difference of the degree of moisture absorption inside the caustic soda flake. Based on the correlation index and the distribution difference index, the caustic soda caking index is determined, specifically including: Calculate the statistics of the boundary ambiguity index, and determine the intermediate clumping index based on the product of the statistics and the correlation index; wherein the intermediate clumping index is used to characterize the initial clumping degree determined based on the correlation between boundary adhesion and internal penetration. Based on the intermediate agglomeration index and the distribution difference index, the caustic soda agglomeration index is determined. The caustic soda agglomeration index is a comprehensive quantitative index that integrates three multi-dimensional characteristic information: boundary adhesion characteristics, internal permeability consistency, and spatial distribution heterogeneity. Its value is normalized and mapped to a continuous range of 0 to 1. 0 represents that the caustic soda is in a completely normal, non-moisture state, 1 represents that the caustic soda has undergone severe agglomeration, and intermediate values correspond to different degrees in the agglomeration process. The degree of caking is graded based on the caustic soda caking index.
2. The method for automatic classification of the degree of cake lumps according to claim 1, characterized in that, The identification of the contact area between caustic soda flakes and the adjacent caustic soda flakes corresponding to the contact area includes: The image data is segmented to obtain the mask area of each caustic soda flake and its corresponding identification information; A morphological expansion operation is performed on the masked area of each caustic soda flake. The contact area between the caustic soda flakes is determined based on the intersection between the expanded masked areas, and the identification information of the adjacent caustic soda flakes constituting the contact area is recorded. Based on the depth information in the image data, the caustic soda flakes located in the upper layer among the adjacent caustic soda flakes are identified as the objects for calculating the internal fuzziness index.
3. The method for automatic classification of the degree of cake lumps according to claim 2, characterized in that, Before performing the morphological expansion calculation on the masked region of each caustic soda flake, the method further includes: Based on the masked area of each caustic soda flake, the area of each caustic soda flake is calculated, and an area statistic is determined based on the area. If the area statistics exceed the preset threshold, the caustic soda caking index is directly determined to be the maximum value, and the degree of caking is graded based on the caustic soda caking index. If the area statistics do not exceed the preset threshold, then morphological dilation calculation is performed on the mask region of each caustic soda flake.
4. The automatic image processing based flake caustic agglomerate level classification method according to claim 1, wherein, Determining the edge ambiguity of each boundary segment includes: For each pixel on the boundary segment, grayscale sampling is performed along the direction perpendicular to the boundary to obtain the grayscale profile of each pixel; The edge width of each pixel is determined based on the width of the transition region of grayscale change in the grayscale profile. Determine the average edge width of each pixel on the boundary segment to obtain the edge blur of the boundary segment.
5. The automatic grading method for the degree of caustic soda agglomeration based on image processing according to claim 1, characterized in that, The method for determining the internal fuzzy index includes: Calculate the gradient magnitude of each pixel within the caustic soda flake region, and determine the sharpness index based on the statistics of the gradient magnitude; wherein, the sharpness index is used to characterize the sharpness of the texture inside the caustic soda flake. Based on the sharpness index, the internal blur index is determined; wherein the internal blur index decreases as the sharpness index increases.
6. The automatic grading method for the degree of caustic soda agglomeration based on image processing according to claim 1, characterized in that, The calculation of the correlation index based on the boundary fuzziness index and the internal fuzziness index includes: Each contact region is sorted according to the boundary fuzziness index to obtain an ordered sequence of the internal fuzziness index; Based on the ranking relationship between the boundary fuzziness index and the internal fuzziness index, the monotonic correlation between the boundary fuzziness index and the internal fuzziness index is calculated, and the correlation index between the boundary fuzziness index and the internal fuzziness index is obtained.
7. The automatic grading method for the degree of caustic soda agglomeration based on image processing according to claim 1, characterized in that, The determination of the distribution difference index based on the internal fuzzy index of each caustic soda flake includes: The internal fuzzy indices of each caustic soda flake are statistically analyzed to obtain the set of internal fuzzy indices; Calculate the dispersion statistic of the internal fuzzy index set to obtain the distribution difference index; wherein, the dispersion statistic is used to quantify the spatial distribution difference of the moisture content within each caustic soda flake, reflecting the uneven moisture content caused by environmental factors during the caustic soda agglomeration process.
8. An automatic grading system for the degree of caustic soda agglomeration based on image processing, characterized in that, It includes a host computer and an image acquisition device that is communicatively connected to the host computer, wherein: The image acquisition device is used to acquire image data of caustic soda flakes and send it to the host computer; The host computer is used to acquire image data of caustic soda flakes; Identify the contact areas between caustic soda flakes and the adjacent caustic soda flakes corresponding to the contact areas; Determine the boundary fuzziness index of the contact area and the internal fuzziness index of at least one of the adjacent caustic soda flakes, wherein determining the boundary fuzziness index of the contact area specifically includes: Extract the boundaries of each caustic soda flake, and identify the contact boundary segments belonging to the contact area and the independent boundary segments belonging to the non-contact area within the boundaries; Determine the edge ambiguity of each boundary segment; wherein the edge ambiguity is used to characterize the steepness of the gray-scale change at the corresponding boundary segment; The boundary ambiguity index is determined based on the minimum edge ambiguity in the independent boundary segment and the edge ambiguity of the contact boundary segment; Based on the boundary fuzziness index and the internal fuzziness index, a correlation index is calculated; wherein, the correlation index is used to characterize the degree of correlation between the boundary fuzziness index and the internal fuzziness index. Based on the internal fuzzy index of each caustic soda flake, a distribution difference index is determined; wherein, the distribution difference index is used to characterize the spatial distribution difference of the degree of moisture absorption inside the caustic soda flake. Based on the correlation index and the distribution difference index, the caustic soda caking index is determined, specifically including: Calculate the statistics of the boundary ambiguity index, and determine the intermediate clumping index based on the product of the statistics and the correlation index; wherein the intermediate clumping index is used to characterize the initial clumping degree determined based on the correlation between boundary adhesion and internal penetration. Based on the intermediate agglomeration index and the distribution difference index, the caustic soda agglomeration index is determined. The caustic soda agglomeration index is a comprehensive quantitative index that integrates three multi-dimensional characteristic information: boundary adhesion characteristics, internal permeability consistency, and spatial distribution heterogeneity. Its value is normalized and mapped to a continuous range of 0 to 1. 0 represents that the caustic soda is in a completely normal, non-moisture state, 1 represents that the caustic soda has undergone severe agglomeration, and intermediate values correspond to different degrees in the agglomeration process. The degree of caking is graded based on the caustic soda caking index.