A flour impurity screening method and system based on image processing

By constructing texture response values ​​and gradient information, utilizing the grayscale standard deviation and local information entropy within a sliding window, and combining structural tensor decomposition and morphological reconstruction, the problem of detecting near-color impurities and minute impurities in flour production is solved, enabling effective detection in high-dust environments and improving the purity and safety of flour.

CN121391882BActive Publication Date: 2026-04-17SHAANXI HUAXIANG FOOD (GRP) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHAANXI HUAXIANG FOOD (GRP) CO LTD
Filing Date
2025-12-26
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In the existing technology, due to the high dust environment and the fact that the background grayness of the flour is close to that of impurities during the flour production process, it is difficult to effectively detect near-colored impurities and minute impurities, which affects the purity and safety of the finished flour product.

Method used

By constructing texture response values ​​and gradient information, and using the grayscale standard deviation and local information entropy within a sliding window to obtain texture response values, combined with structural tensor decomposition and morphological reconstruction, impurities and background can be distinguished, thus enabling the detection of similar-colored impurities.

Benefits of technology

In high-dust environments, it can accurately distinguish between areas of fine flour and areas of coarse impurities, improving the detection rate of minute impurities and enhancing the purity and safety of the flour.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121391882B_ABST
    Figure CN121391882B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of image processing, and particularly relates to a flour impurity screening method and system based on image processing, which comprises the following steps: obtaining a surface gray image; obtaining a texture response value according to the gray standard deviation and local information entropy in the neighborhood of a pixel point; adjusting the basic gradient amplitude by using the texture response value to obtain an enhanced gradient value; obtaining an impurity probability value according to the difference of the eigenvalues of the structure tensor and the enhanced gradient value; constructing a background base by using morphological reconstruction, and obtaining a saliency index according to the difference between the impurity probability value and the background base; and performing segmentation and connected domain screening according to the saliency index. The present application effectively filters out dust noise and flour natural fluctuation interference while retaining the impurity edge signal, and improves the accuracy of the detection of near-color impurities on the surface of flour.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology. More specifically, this invention relates to a method and system for screening flour impurities based on image processing. Background Technology

[0002] During the production, processing, and packaging of flour, impurities such as woven bag fragments, plastic pieces, and lumps of flour often get mixed in due to equipment wear, environmental dust, or human error. These impurities not only affect the quality and taste of the flour but also seriously relate to food safety, potentially posing a threat to consumers' health. Therefore, impurity detection during the flour production process is particularly important.

[0003] In related technologies, machine vision-based foreign object detection systems are commonly used to monitor materials on flour conveyor belts in real time. These systems typically include an industrial camera, a light source, and an image processing unit. By acquiring image data of the flour flow, they utilize grayscale thresholding or simple gradient edge detection algorithms to identify areas in the image where the grayscale values ​​differ significantly from those of normal flour, thereby determining the presence of impurities. For example, by setting a global grayscale threshold, dark areas with grayscale values ​​below that threshold are marked as potential impurities.

[0004] However, current technologies primarily rely on grayscale differences or simple edge features for detection, neglecting the high dust levels in flour production environments and the fact that similar-colored impurities have extremely similar grayscale values ​​to the flour background. In actual production, the natural undulations of the flour surface also create shadows, the grayscale values ​​of which are often similar to those of impurities, making threshold-based segmentation methods prone to false detections. Simultaneously, high-concentration dust environments introduce significant noise, rendering simple edge detection algorithms ineffective in distinguishing impurity edges from noise interference. These limitations result in the inability to effectively detect similar-colored and minute impurities, thus affecting the purity and safety of the finished flour product. Summary of the Invention

[0005] To address the technical problem that the existing technologies mainly rely on grayscale differences or simple edge features, which makes it impossible to effectively detect similar-colored impurities and minute impurities in the high-dust environment and natural fluctuations of flour production, the present invention provides solutions in the following aspects.

[0006] In a first aspect, the present invention provides a flour impurity screening method based on image processing, comprising: acquiring a surface grayscale image during flour transport; taking any pixel in the surface grayscale image as a target pixel, acquiring the texture response value of the target pixel based on the standard deviation of the grayscale value within a sliding window of the target pixel and the local information entropy within the sliding window of the target pixel; acquiring the basic gradient magnitude of the target pixel, acquiring the enhanced gradient value of the target pixel based on the basic gradient magnitude and the texture response value; constructing a structure tensor based on the original gradient direction and the enhanced gradient value, and decomposing the structure tensor to obtain two feature values, acquiring the impurity probability value of the target pixel based on the difference between the two feature values ​​and the enhanced gradient value; subtracting a preset peak height threshold from the impurity probability value to obtain a seed label value, and performing morphological reconstruction on the seed label value using the impurity probability value to obtain a background substrate; acquiring the saliency index of the target pixel based on the difference between the impurity probability value and the background substrate; performing threshold segmentation and connected component extraction on the saliency index, and screening flour impurities based on the statistical results of the saliency index within the connected components.

[0007] This invention utilizes the grayscale standard deviation and local information entropy within a sliding window to construct a texture response value, measuring the grayscale fluctuation amplitude and disorder level of local image regions. This allows for accurate differentiation between fine flour areas and impurity areas with coarse textures. Furthermore, the invention uses the texture response value to adjust the gain of the base gradient amplitude, amplifying the edge signals of impurity areas while preserving the original gradient of smooth flour regions. It also analyzes the directional consistency of local gradients through structural tensor eigenvalue decomposition, distinguishing between true impurity edges with linear extension characteristics and randomly oriented dust noise. Finally, the invention constructs a background base using morphological reconstruction and performs a difference operation with the impurity probability value, effectively filtering out low-frequency background fluctuations caused by flour accumulation. This ensures that the saliency index only shows high values ​​at impurity locations, enabling the detection and screening of near-colored impurities on the flour surface under dust interference and low-contrast environments.

[0008] Preferably, the step of acquiring the surface grayscale image during the flour conveying process includes: using a camera to continuously scan the moving flour flow to acquire original image data, and using a Gaussian filter to remove high-frequency dust noise to obtain the surface grayscale image.

[0009] Preferably, the texture response value satisfies the following relationship: In the formula, coordinates The texture response value of a pixel. For The standard deviation of the grayscale values ​​of pixels within the centered sliding window. coordinates Local information entropy of a pixel It is the natural logarithm function.

[0010] This invention constructs a texture response value that reflects the physical properties of an object's surface by fusing the grayscale standard deviation and local information entropy within a pixel sliding window. It can simultaneously capture the physical undulations of the impurity surface and the complexity of the texture pattern, thus successfully distinguishing impurities with woven textures or rough surfaces from a smooth flour background when the grayscale values ​​are similar.

[0011] Preferably, obtaining the basic gradient magnitude of the target pixel includes: processing the target pixel using the Sobel operator to obtain the basic gradient magnitude of the target pixel.

[0012] Preferably, the enhanced gradient value satisfies the following relationship: In the formula, coordinates Enhanced gradient value at pixel location coordinates The basic gradient magnitude of the pixel. coordinates The texture response value of a pixel. This is the gain sensitivity coefficient. It is the hyperbolic tangent function.

[0013] This invention utilizes texture response values ​​to adjust the base gradient magnitude, achieving selective gradient enhancement. In areas with complex textures and impurities, the base gradient is significantly amplified, strengthening the contour signal of the impurities; while in areas with flat textures and flour, the gradient value remains at a low level. This effectively suppresses the false edges of shadows caused by natural accumulation on the flour surface, highlighting the true boundaries of impurities.

[0014] Preferably, the impurity probability value satisfies the following relationship: In the formula, coordinates The impurity probability value of a pixel. coordinates Enhanced gradient value at pixel location and Coordinates The pixel at this location corresponds to the larger and smaller feature values ​​of the two feature values. To prevent constants with a denominator of zero.

[0015] This invention utilizes the difference between two eigenvalues ​​obtained from structural tensor decomposition to measure the directional consistency of the gradient. By weighting the enhanced gradient value using this difference index, it is possible to distinguish between rigid impurity edges with directional extension characteristics and random noise points with disorder, effectively filtering out interference signals caused by high concentrations of dust in the production environment, and making the detection results point to real solid impurities.

[0016] Preferably, the step of using impurity probability values ​​to perform morphological reconstruction of seed marker values ​​to obtain the background substrate includes: using the matrix composed of impurity probability values ​​as a mask matrix, performing morphological dilation on the seed marker matrix composed of seed marker values, correcting the part of the dilated value that exceeds the mask matrix to the value corresponding to the mask matrix, repeating the dilation and correction operations until the value of the seed marker matrix no longer changes, thereby obtaining the background substrate.

[0017] Preferably, the significance index satisfies the following relationship: In the formula, coordinates The saliency index of a pixel. coordinates The impurity probability value of a pixel. Background base coordinates The value of the pixel at that location.

[0018] This invention extracts background signals, including variations in flour thickness and uneven lighting, from the detection data by calculating the difference between the impurity probability value and the background substrate. This makes the final saliency index no longer affected by the shape of the flour accumulation, and only retains abnormal mutation signals that exceed the natural background. This enables the saliency extraction of small or low-contrast impurities in complex backgrounds.

[0019] Preferably, the step of screening flour impurities based on the statistical results of the saliency index within the connected region includes: calculating the sum of the saliency indices of each pixel within each connected region; and determining the connected region as an impurity region if the sum of the saliency indices of each pixel within any connected region is greater than a preset energy threshold.

[0020] Secondly, the present invention provides a flour impurity screening system based on image processing, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned flour impurity screening method based on image processing is implemented.

[0021] By adopting the above technical solution, a computer program is generated from the above-mentioned image processing-based flour impurity screening method and stored in the memory so that it can be loaded and executed by the processor. In this way, a terminal device can be made based on the memory and the processor for convenient use.

[0022] The beneficial effects of this invention are as follows: By constructing texture response and gradient information to obtain texture response values, this invention can still utilize the amplifying effect of the rough texture of the impurity surface on the gradient, even when the gray values ​​of impurities and flour backgrounds are similar, effectively transforming weak visual differences into significant signal features, thus effectively solving the problem of heterogeneous targets of the same color system. This invention addresses the harsh imaging environment of flour production workshops with high dust and noise by utilizing the linear extension of real impurity edges, while dust noise exhibits an isotropic distribution, thus achieving high-frequency noise filtering. This invention establishes a background substrate through morphological reconstruction, improving the adaptive capability to changes in flour flow morphology. Regardless of the thickness variation or natural accumulation undulations of the flour on the conveyor belt, it can fit the corresponding illumination and morphological reference surface, and remove these non-defect background fluctuations through differential operations. It can focus on capturing abnormal abrupt changes beyond natural undulations, thereby significantly improving the detection rate of small, low-contrast impurities without lowering detection standards, providing a reliable guarantee for food safety production. Attached Figure Description

[0023] Figure 1 This is a flowchart illustrating an image processing-based flour impurity screening method according to the present invention;

[0024] Figure 2 This is a schematic illustration of a surface grayscale image in the present invention;

[0025] Figure 3 This is a schematic diagram illustrating the significance index distribution in this invention. Detailed Implementation

[0026] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0027] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0028] This invention discloses a flour impurity screening method based on image processing, referring to... Figure 1 This includes steps S1-S6:

[0029] S1. Obtain the surface grayscale image during the flour conveying process.

[0030] It should be noted that flour is distributed in a continuous, fluid powder form on the conveyor belt, and the production workshop is usually accompanied by a high concentration of dust, which can easily lead to reduced contrast or blurred details in the image. In order to capture the subtle texture details on the surface of similar colored impurities, high signal-to-noise ratio image data is required.

[0031] Specifically, a camera mounted above the conveyor belt continuously scans the moving flour stream to acquire raw image data. A Gaussian filter is then used to remove high-frequency dust noise, resulting in a grayscale image of the surface.

[0032] S2. Obtain the texture response value based on the grayscale distribution dispersion within the neighborhood of a pixel in the surface grayscale image.

[0033] It should be noted that normal flour areas exhibit a fine, powdery accumulation, with local grayscale variations that, while fluctuating, transition smoothly. In contrast, impurities, including woven bags, plastic sheets, or clumps of flour, often have rough physical structures or woven textures, resulting in disordered and abrupt changes in local grayscale distribution. Therefore, this invention obtains a texture complexity response map based on the dispersion of grayscale distribution within the neighborhood of each pixel in the surface grayscale image.

[0034] Specifically, taking any pixel in the surface grayscale image as the target pixel, a sliding window centered on the target pixel is set, and the standard deviation of the grayscale values ​​of pixels within the sliding window is calculated. Simultaneously, the probability of each grayscale level occurring within the sliding window is calculated to obtain the local information entropy of the target pixel. The texture response value of the target pixel is then obtained based on the standard deviation and local information entropy.

[0035] For example, the size of the sliding window is The implementers can determine the size of the sliding window based on the actual situation.

[0036] Specifically, the texture response values ​​satisfy the following relationship:

[0037] ;

[0038] In the formula, coordinates The texture response value of a pixel. For The standard deviation of the grayscale values ​​of pixels within the centered sliding window. coordinates Local information entropy of a pixel It is the natural logarithm function.

[0039] in, This represents the fluctuation range of grayscale values ​​in a local area. The larger the value, the more drastic the change in pixel brightness in the neighborhood of the pixel, thus indicating that there may be physical protrusions or depressions in the area. The smaller the value, the more uniform the pixel brightness in the neighborhood of the pixel, which appears as a flat color area, thus indicating that the area is a uniform accumulation of flour. This value represents the degree of disorder in the grayscale distribution of a local area. The larger the value, the richer and more uniform the grayscale levels contained in the neighborhood, indicating that the area may contain complex woven textures. The smaller the value, the simpler or more regular the grayscale distribution in the neighborhood, indicating low information content, indicating that the area is a background or a monotonous shadow.

[0040] Using logarithmic functions The processing limits the excessive growth of texture response values, preventing them from overflowing and masking features under extreme lighting conditions such as strong reflective spots. At the same time, it stretches the contrast of low-response areas, so that subtle texture feature differences can be effectively preserved and enhanced.

[0041] S3. Obtain the enhancement gradient value based on the texture response value and the surface grayscale image.

[0042] It should be noted that the natural undulations of the flour surface will generate gradient changes, manifesting as shadow edges, which introduces false edge interference when directly acquiring the gradient. Furthermore, impurities, including woven bags, typically possess both rough surface and physical edge characteristics. Therefore, this invention utilizes texture response values ​​as weights to adjust the gradient acquisition process of the original image, obtaining enhanced gradient values.

[0043] Specifically, the Sobel operator is used to process the target pixel to obtain its basic gradient magnitude and original gradient direction. The enhanced gradient value of the target pixel is then obtained based on its basic gradient magnitude and texture response value. The enhanced gradient values ​​of all pixels constitute the texture enhancement gradient matrix.

[0044] Specifically, the enhancement gradient values ​​satisfy the following relationship:

[0045] ;

[0046] In the formula, coordinates Enhanced gradient value at pixel location coordinates The basic gradient magnitude of the pixel. coordinates The texture response value of a pixel. This is the gain sensitivity coefficient. The function is the hyperbolic tangent function, as shown in this embodiment. The value is 5, and the implementers can determine the number based on the actual situation. The value of .

[0047] in, This represents the basic edge strength of a pixel. A larger value indicates that there is significant gray-level truncation in the neighborhood of the pixel, thus indicating that the area may be an object edge or a shadow boundary; a smaller value indicates that the gray-level transition in the neighborhood of the pixel is smooth, thus indicating that the area is a continuous flour surface. This represents the texture weight at a pixel. A larger value indicates a more complex texture at that location, leading to... A value close to 1 indicates that the area contains rough impurities; a smaller value indicates a smoother texture at that location, resulting in... The value approaches 0, thus indicating that the area contains normal flour. (Using...) The base edge strength is adjusted, and the base gradient amplitude is increased in areas with complex textures to enhance the edge signal of impurities. At the same time, the original gradient is not amplified in areas with smooth textures, thus avoiding the incorrect enhancement of simple flour shadow contours.

[0048] S4. Obtain the impurity probability value based on the directional consistency of the local range of the texture enhancement gradient matrix.

[0049] It should be noted that while texture enhancement enhances the edge signal of impurities, some high-frequency noise, including dust noise, still remains. To further distinguish between real physical edges and isolated noise, since the edges of solid impurities typically exhibit extension and directional consistency within a local range, while the gradient directions of noise or scattered flour clumps are randomly diverging, this invention obtains the impurity probability value based on the directional consistency within a local range of the texture enhancement gradient matrix.

[0050] Specifically, the gradient magnitude is taken as the value of each pixel in the texture enhancement gradient matrix, and the original gradient direction corresponding to the pixel is taken as the gradient direction. The horizontal and vertical gradient components of each pixel are obtained, and the structure tensor corresponding to each point in the texture enhancement gradient matrix is ​​obtained based on these components. Eigenvalue decomposition is performed on the structure tensor of each pixel to obtain two eigenvalues ​​corresponding to the pixel. The impurity probability value of the pixel is obtained based on the difference between the corresponding eigenvalues ​​and the enhancement gradient value.

[0051] Specifically, the impurity probability values ​​satisfy the following relationship:

[0052] ;

[0053] In the formula, coordinates The impurity probability value of a pixel. coordinates Enhanced gradient value at pixel location and Coordinates The pixel at this location corresponds to the larger and smaller feature values ​​of the two feature values. To prevent constants with a denominator of zero.

[0054] in, This represents the coherence of a pixel. A larger value indicates higher coherence. Greater than This means that the local gradient of a pixel mainly points in one dominant direction, indicating the presence of a significant linear edge in the region, which is more likely to be a rigid boundary corresponding to impurities; the smaller the value, the more likely it is to indicate that the local gradient of the pixel points in a dominant direction. The closer to This means that the local gradient direction of a pixel is disordered, such as isotropic noise, indicating that the region corresponding to the pixel is more likely to be a non-edge region. The gradient value is adjusted to achieve the final impurity probability value. Higher values ​​are only found in areas that have both rough textures and sharp, rigid edges.

[0055] S5. Construct the background basis and obtain the significance index based on the impurity probability value and the background basis.

[0056] It should be noted that the highest points or extreme reflective points of flour accumulation may still generate some low-amplitude pseudo-peak noise. Traditional thresholding is difficult to completely remove these background fluctuations while retaining weak impurities. Since real impurities appear as prominent local peaks in the data distribution, while background noise appears as gentle base fluctuations, this invention constructs a background base and obtains a significance index based on the impurity probability value and the background base.

[0057] Specifically, a matrix composed of impurity probability values ​​is used as the mask matrix. A preset peak height threshold is subtracted from the impurity probability values ​​to determine the seed label values. The seed label values ​​of each pixel constitute the seed label matrix. Morphological dilation is performed on the seed label matrix, correcting any values ​​exceeding the mask matrix values ​​to their corresponding mask matrix values. This dilation and correction operation is repeated until the values ​​in the seed label matrix no longer change, resulting in the background base. A saliency index is obtained based on the impurity probability values ​​and the background base.

[0058] For example, the peak height threshold is 15.

[0059] Specifically, the significance index satisfies the following relationship:

[0060] ;

[0061] In the formula, coordinates The saliency index of a pixel. coordinates The impurity probability value of a pixel. Background base coordinates The value of the pixel at that location.

[0062] in, This represents the reconstruction result of the base after the top was cut off from the probabilistic topographic map. By utilizing the properties of morphological reconstruction, it is possible to identify and fill in the space below those steep peaks that have been removed, thereby fitting a reference surface that retains the natural undulating trend of flour accumulation but eliminates local abrupt impurity signals.

[0063] Through calculation With background base The difference was filtered out to remove background signal fluctuations caused by the natural accumulation of flour during transport. At the same time, the signals of impurity areas such as white woven bags or plastic sheets were preserved, so that the final output saliency index only showed high values ​​at the coordinates where the impurities were present. Thus, while removing background interference from flour, the extraction of impurity targets with extremely low visual contrast was completed.

[0064] For example, Figure 2 This is the surface grayscale image in this invention. Figure 3 The figure shows the significance index distribution of the present invention. As can be seen from the figure, the present invention effectively suppresses dust noise against a smooth flour background, and can distinguish between messy noise points and weakly textured impurity edges with extension, thereby extracting the impurity target.

[0065] S6. Screen flour for impurities based on significance index.

[0066] Specifically, an adaptive threshold segmentation is performed on the matrix composed of saliency indices to generate a binary mask. Morphological closing operations are performed on the mask to connect broken debris fragments, and all connected components are extracted. The area of ​​each connected component and the sum of the saliency indices of each pixel within the component are calculated.

[0067] In one embodiment, in response to the sum of the saliency indices of all pixels in any connected region being greater than a preset energy threshold, the connected region is determined to be an impurity region, thereby achieving the screening of flour impurities, for example, an energy threshold of 500.

[0068] This invention also discloses an image processing-based flour impurity screening system, including a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement an image processing-based flour impurity screening method according to the present invention.

[0069] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.

Claims

1. A method for screening of impurities in flour based on image processing, characterized in that, include: Acquire surface grayscale images during the flour conveying process; Taking any pixel in the surface grayscale image as the target pixel, the texture response value of the target pixel is obtained based on the standard deviation of the grayscale value within the sliding window of the target pixel and the local information entropy within the sliding window of the target pixel. Obtain the base gradient magnitude and original gradient direction of the target pixel. Obtain the enhanced gradient value of the target pixel based on the base gradient magnitude and texture response value. Construct a structure tensor based on the original gradient direction and enhanced gradient value, and decompose the structure tensor to obtain two feature values. Obtain the impurity probability value of the target pixel based on the difference between the two feature values ​​and the enhanced gradient value. The seed label value is obtained by subtracting the impurity probability value from the preset peak height threshold. The background substrate is obtained by morphological reconstruction of the seed label value using the impurity probability value. The saliency index of the target pixel is obtained based on the difference between the impurity probability value and the background substrate. Threshold segmentation and connected component extraction are performed on the significance index, and flour impurities are screened based on the statistical results of the significance index within the connected component. The enhanced gradient values ​​satisfy the following relationship: In the formula, coordinates Enhanced gradient value at pixel location coordinates The basic gradient magnitude of the pixel. coordinates The texture response value of a pixel. This is the gain sensitivity coefficient. It is the hyperbolic tangent function; The impurity probability values ​​satisfy the following relationship: In the formula, coordinates The impurity probability value of a pixel. coordinates Enhanced gradient value at pixel location and Coordinates The pixel at this location corresponds to the larger and smaller feature values ​​of the two feature values. To prevent constants with a denominator of zero.

2. The flour impurity screening method based on image processing according to claim 1, characterized in that, The process of obtaining a surface grayscale image during the flour conveying process includes: using a camera to continuously scan the moving flour flow to obtain raw image data, and using a Gaussian filter to remove high-frequency dust noise to obtain a surface grayscale image.

3. The flour impurity screening method based on image processing according to claim 1, characterized in that, The texture response values ​​satisfy the following relationship: ; In the formula, coordinates The texture response value of a pixel. For The standard deviation of the grayscale values ​​of pixels within the centered sliding window. coordinates Local information entropy of a pixel. It is the natural logarithm function.

4. The flour impurity screening method based on image processing according to claim 1, characterized in that, The step of obtaining the basic gradient magnitude of the target pixel includes: processing the target pixel using the Sobel operator to obtain the basic gradient magnitude of the target pixel.

5. The flour impurity screening method based on image processing according to claim 1, characterized in that, The method of using impurity probability values ​​to perform morphological reconstruction of seed marker values ​​to obtain the background substrate includes: using the matrix composed of impurity probability values ​​as a mask matrix, performing morphological dilation on the seed marker matrix composed of seed marker values, correcting the part of the dilated value that exceeds the mask matrix to the value corresponding to the mask matrix, repeating the dilation and correction operation until the value of the seed marker matrix no longer changes, thereby obtaining the background substrate.

6. The flour impurity screening method based on image processing according to claim 1, characterized in that, The significance index satisfies the following relationship: ; In the formula, coordinates The saliency index of a pixel. coordinates The impurity probability value of a pixel. Background base coordinates The value of the pixel at that location.

7. The flour impurity screening method based on image processing according to claim 1, characterized in that, The step of screening flour impurities based on the statistical results of the saliency index within connected regions includes: summing the saliency index of each pixel within each connected region; and determining that the connected region is an impurity region if the sum of the saliency index of each pixel within any connected region is greater than a preset energy threshold.

8. A flour impurity screening system based on image processing, characterized in that, include: A processor and a memory, the memory storing computer program instructions that, when executed by the processor, implement a flour impurity screening method based on image processing according to any one of claims 1-7.

Citation Information

Patent Citations

  • Dough kneading impurity detection method and system

    CN118096545A

  • Fiber impurity detection method based on machine vision

    CN120279009A