A sheep dung conveying blockage identification method and system based on machine vision
By constructing a visual interference index and a stability mask, we first identify and block the illumination interference during sheep manure transportation, and then perform inter-frame difference. This solves the problem of inaccurate blockage identification caused by pseudo-motion interference during sheep manure transportation, and achieves higher identification accuracy and robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHAANXI YATAI DAIRY CO LTD
- Filing Date
- 2026-02-28
- Publication Date
- 2026-05-01
AI Technical Summary
In the process of transporting sheep manure, the existing inter-frame difference method cannot effectively distinguish between real material movement and pseudo-motion interference caused by light, resulting in insufficient accuracy and reliability of blockage identification.
By constructing a visual interference index and a stability mask, interference areas such as highlights and shadows are first identified and blocked. Then, inter-frame difference is performed to generate a robust motion feature map, extract static connected components, and calculate the blockage score.
It improves the accuracy and robustness of identifying blockages in sheep manure transport, reduces interference from spurious motion signals, and enhances the accuracy and environmental adaptability of identification.
Smart Images

Figure CN121767934B_ABST
Abstract
Description
A machine vision-based method and system for identifying blockages in sheep manure conveying systems Technical Field
[0001] This invention relates to the field of image recognition technology. More specifically, this invention relates to a machine vision-based method and system for identifying blockages in sheep manure conveying systems. Background Technology
[0002] In modern large-scale farms, the automated treatment and transportation of waste such as sheep manure is a crucial link in ensuring environmental hygiene and production efficiency. The conveyor belt system, as a core piece of equipment, is vital for stable operation. However, due to the heterogeneous and sticky nature of sheep manure, it is prone to adhesion and accumulation during transportation, eventually leading to blockages in the conveyor pipes or belts. Failure to detect and address these blockages in a timely manner can not only disrupt production but also damage equipment, resulting in economic losses. Therefore, real-time, automated blockage monitoring of the transportation process has significant application value.
[0003] To address the aforementioned issues, existing technologies typically employ machine vision for non-contact monitoring. Among these, the inter-frame difference method (IFD) is a commonly used approach for detecting material motion due to its simple computation and good real-time performance. This method determines the motion of an object by comparing the pixel differences between consecutive frames in a video sequence. Theoretically, when materials are being transported normally, the image will continuously change; however, when a blockage occurs, the material stops moving, and the image change approaches zero. However, in the actual scenario of transporting sheep manure, the wet and uneven surface of the material easily forms large areas of high-intensity reflective spots and deep shadows under industrial lighting. These bright and shadow areas flicker violently with slight deformations of the material or minor vibrations of the light source, generating strong pseudo-motion signals. Traditional IFD methods cannot effectively distinguish between genuine material motion and this pseudo-motion interference caused by illumination, leading to frequent misjudgments and missed detections when determining whether the material is truly stationary, making it difficult to meet the accuracy and reliability requirements for blockage identification in actual production. Summary of the Invention
[0004] To address the aforementioned technical problem of insufficient accuracy in identifying blockages in sheep manure transport, this invention provides solutions in the following aspects.
[0005] In a first aspect, the present invention provides a machine vision-based method for identifying blockages in sheep manure transport, comprising:
[0006] The video stream of the conveying process is captured by an industrial camera at a preset frame rate and decoded into a grayscale image sequence.
[0007] The brightness deviation and gradient magnitude features within the local neighborhood of any pixel in an arbitrary grayscale image are weighted and fused to obtain the visual interference index of the pixel; based on the visual interference index, a stability mask for identifying reliable material regions is obtained by comparing it with a preset interference threshold.
[0008] Spatial gating of the inter-frame difference results of grayscale images is performed using a material stability mask to shield interference regions and generate robust motion feature maps; stationary connected components in the robust motion feature maps are extracted, and blockage scores are calculated based on their area and average stationarity.
[0009] The congestion index of any candidate congestion region in any grayscale image is compared with the congestion decision threshold. If the congestion index of at least one candidate congestion region in the grayscale image is greater than the congestion decision threshold, the system is determined to be congested. In response to the congestion determination result, the system generates a response signal.
[0010] This invention uses visual interference index and stability mask features to first identify and mask unreliable interference areas such as highlights and shadows in an image. Then, it performs inter-frame difference analysis only in reliable material areas to analyze motion state. This strategy of first identifying and eliminating interference before performing motion analysis reduces the interference level of pseudo-motion signals. Compared with existing technologies that directly perform motion detection, this invention improves the accuracy and robustness of blockage identification.
[0011] Preferably, the acquisition of the grayscale image sequence includes:
[0012] Set the acquisition frame rate; continuously acquire the video stream during the transmission process and decode the video stream into a series of time-ordered image frames; perform grayscale processing on each image frame and construct a grayscale image sequence in chronological order.
[0013] Preferably, the step of weightedly fusing the brightness deviation and gradient magnitude features within the local neighborhood of any pixel in an arbitrary grayscale image to obtain the visual interference index of the pixel includes:
[0014] For any pixel in any grayscale image, define a local neighborhood window centered on the pixel; calculate the grayscale mean and grayscale standard deviation of all pixels within the local neighborhood window; use the Sobel operator to calculate the gradient magnitude of the pixel, and obtain the maximum gradient magnitude of all pixels in the grayscale image;
[0015] The visual interference index of the pixel is positively correlated with the difference between the gray value and the mean gray value of the pixel, positively correlated with the gradient magnitude of the pixel, and negatively correlated with the gray standard deviation.
[0016] This invention, by weighting and fusing the local brightness deviation of pixels with the gradient magnitude, can more comprehensively and accurately quantify the common features of highlights and shadows, two typical visual disturbances, thereby more accurately identifying unreliable areas in an image.
[0017] Preferably, the visual interference index of the pixel satisfies the expression:
[0018] ;
[0019] In the formula, This represents the visual interference index of the j-th pixel in the i-th grayscale image; This represents the gray value of the j-th pixel in the i-th grayscale image; This represents the mean gray value within the local neighborhood window of the j-th pixel in the i-th grayscale image; This represents the standard deviation of gray levels within the local neighborhood window of the j-th pixel in the i-th grayscale image; This represents the gradient magnitude of the j-th pixel in the i-th grayscale image; This represents the maximum gradient magnitude of the i-th grayscale image; It represents a tiny positive value.
[0020] This invention normalizes and effectively combines brightness deviation and gradient magnitude, so that the assessment of interference level is no longer a vague qualitative judgment, but a precise numerical calculation, thus ensuring the stability and reliability of the algorithm.
[0021] Preferably, the step of comparing the visual interference index with a preset interference threshold to obtain a stability mask for identifying reliable material regions includes:
[0022] Calculate the mean and standard deviation of the visual interference index for all pixels in any grayscale image;
[0023] Set a preset interference threshold;
[0024] For any pixel in the grayscale image, if the visual interference index of the pixel is greater than or equal to a preset interference threshold, the pixel is marked as 0; if the visual interference index of the pixel is less than the preset interference threshold, the pixel is marked as 1, thus obtaining the material stability mask of the grayscale image.
[0025] Preferably, the preset interference threshold is k times the standard deviation of the visual interference index of all pixels plus the mean of the visual interference index of all pixels; k is a sensitivity adjustment factor used to control the strictness of the threshold.
[0026] Preferably, the step of spatially gating the inter-frame difference results of the grayscale image using a material stability mask to shield interference regions and generate a robust motion feature map includes:
[0027] The robust inter-frame difference value of any pixel satisfies the expression:
[0028] ;
[0029] In the formula, This represents the robust inter-frame difference value of the j-th pixel in the i-th grayscale image; This represents the gray value of the j-th pixel in the i-th grayscale image; This represents the gray value of the j-th pixel in the (i-1)-th grayscale image; The material stability mask value of the j-th pixel in the i-th grayscale image is represented; the robust inter-frame difference values of all pixels in the i-th grayscale image constitute the robust motion feature map of the i-th grayscale image.
[0030] This invention enables the inter-frame difference value to be zeroed in the region identified as interference, thereby obtaining a robust motion feature map that does not contain pseudo-motion information such as specular flicker, which can more cleanly and realistically reflect the actual motion state of the material.
[0031] Preferably, obtaining the congestion index includes:
[0032] Binarize the robust motion feature map of the i-th grayscale image, set a motion threshold, and all pixels with robust inter-frame difference values lower than the motion threshold constitute the stagnant region of the i-th grayscale image; obtain the candidate stagnation region of the i-th grayscale image.
[0033] ;
[0034] In the formula, This represents the congestion index of the k-th candidate congestion region in the i-th grayscale image; This represents the number of pixels in the k-th candidate blocking region of the i-th grayscale image; This represents the robust inter-frame difference value of the q-th pixel in the k-th candidate congestion region of the i-th grayscale image; The maximum grayscale value of the image; This represents the natural logarithm function.
[0035] The congestion index of this invention not only considers the size of the static area, but also the average degree of stillness within that area, thereby more accurately distinguishing between small areas of complete stillness and large areas of slow movement, resulting in a more comprehensive evaluation and a lower misjudgment rate.
[0036] Preferably, the acquisition of the candidate blocking region of the i-th grayscale image includes:
[0037] The pixels in the stagnant region are denoted as stagnant pixels. An 8-connectivity-based connected component analysis algorithm is used to merge spatially adjacent stagnant pixels into several candidate stagnant regions.
[0038] Secondly, the present invention provides a machine vision-based sheep manure conveying blockage identification system, 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 machine vision-based sheep manure conveying blockage identification method is implemented.
[0039] By adopting the above technical solution, a computer program for identifying blockages in sheep manure transportation based on machine vision is generated and stored in a memory for loading and execution by a processor. This allows for the creation of a terminal device based on the memory and processor, facilitating its use.
[0040] The beneficial effects of this invention are as follows: This invention constructs a visual interference index to evaluate pseudo-motion signal sources such as highlights and shadows, and generates a stability mask to spatially shield them. Based on this, motion state analysis and blockage index calculation are then performed on the purified reliable material area. This strategy of first identifying and eliminating interference before performing target analysis reduces the difficulty of visual detection under complex lighting conditions and improves the accuracy and environmental adaptability of blockage identification. Attached Figure Description
[0041] Figure 1 is a flowchart schematically illustrating a machine vision-based method for identifying blockages in sheep manure transport according to the present invention;
[0042] Figure 2 is a schematic diagram illustrating a grayscale image;
[0043] Figure 3 is a schematic diagram showing the trend of the visual interference index;
[0044] Figure 4 is a schematic diagram showing the changes in the number of candidate congestion areas. Detailed Implementation
[0045] This invention discloses a machine vision-based method for identifying blockages in sheep manure transport, referring to Figure 1, and includes steps S1-S4:
[0046] S1: Use an industrial camera to capture the video stream of the transmission process at a preset frame rate and decode it into a grayscale image sequence.
[0047] It should be noted that this invention aims to solve the problem of material blockage monitoring in automated conveying processes. The first step is to acquire raw data that accurately reflects the material flow status. Two key technical trade-offs exist in this process: First, the contradiction between the real-time nature of data acquisition and computational resource consumption. While an excessively high frame rate can capture minute dynamics, it generates a large amount of redundant data, increasing the burden on subsequent processing units. Conversely, an excessively low frame rate may miss the initial stage of a blockage event. Second, the contradiction between the effectiveness and complexity of image information. Raw color images contain rich color information, but for blockage identification tasks that rely on motion or stillness as the core criterion, color information is not only an ineffective feature, but its variation under different lighting conditions can also introduce noise. Therefore, this invention constructs a computationally efficient and feature-focused analytical foundation by setting a balanced acquisition frame rate and performing grayscale preprocessing.
[0048] Specifically, the process involves using an industrial camera to capture video streams of the transportation process at a preset frame rate and decoding them into a grayscale image sequence, including:
[0049] Industrial cameras are deployed at key monitoring points of the sheep manure conveying system. It should be noted that the cameras' shooting area completely covers the working surface of the conveyor belt.
[0050] Set the acquisition frame rate. It should be noted that the frame rate setting must be based on the typical operating speed of the conveyor belt. Preferably, by tracking the material under normal conveying conditions, the lowest frame rate is selected that ensures the material's displacement between adjacent frames does not exceed 1 / 3 of its average size. In this embodiment, the conveyor belt speed is 0.5 m / s, and the average material size is 5 cm; therefore, the acquisition frame rate is set to 10 fps.
[0051] The video stream of the continuous transport process is acquired and decoded into a series of time-ordered image frames. Each image frame is then converted to grayscale and arranged in chronological order to form a grayscale image sequence. It should be noted that Figure 2 is a schematic diagram of the grayscale images, showing images acquired during the sheep manure transport process.
[0052] At this point, the grayscale image sequence has been obtained.
[0053] S2: Weighted fusion of the brightness deviation and gradient magnitude features in the local neighborhood of any pixel in an arbitrary grayscale image to obtain the visual interference index of the pixel; Based on the comparison of the visual interference index with a preset interference threshold, obtain a stability mask for identifying reliable material regions.
[0054] It should be noted that visual interference originating from the physical environment exists in grayscale image sequences. During transport, non-homogeneous, wet, and sticky materials like sheep manure easily form bright reflective spots on their surface under illumination, while the wrinkles created by material stacking cast deep shadows. These highlight and shadow areas are typical visual interferences, with pixel grayscale values that are either high or low, and they flicker violently with disturbances caused by the light source or slight deformation of the material. If motion analysis is performed directly, they will be misjudged as high-speed movement, thus masking the true static state of the material. To eliminate these pseudo-motion signals, it is necessary to identify the credibility of each pixel in the image. Considering that highlights and shadows share common characteristics in images, both manifesting as local brightness outliers and drastic edge changes, this invention combines the degree of local brightness outliers and the severity of edge changes of each pixel to obtain the visual interference index of all pixels in the grayscale image sequence.
[0055] Specifically, the brightness deviation within the local neighborhood of any pixel in an arbitrary grayscale image is weighted and fused with gradient magnitude features to obtain the visual interference index of the pixel, including:
[0056] For any pixel in an arbitrary grayscale image, a local neighborhood window centered on that pixel is defined. It should be noted that the choice of window size requires a trade-off between noise suppression and detail preservation. An excessively large window will smooth out the texture details of the material itself, while an excessively small window will be insufficient to reflect the local environmental characteristics of the highlight spots. For example, the size of the local neighborhood window is set to... Pixel.
[0057] Calculate the mean gray value and standard deviation of gray values of all pixels within the local neighborhood window.
[0058] The Sobel operator is used to calculate the gradient magnitude of the pixels, and the maximum gradient magnitude of all pixels in the grayscale image is obtained. It should be noted that the Sobel operator is chosen because it provides good gradient approximation while maintaining high computational efficiency, making it suitable for real-time processing scenarios.
[0059] It should be noted that, regarding the outlier degree of local brightness and the severity of edge changes of a pixel, a larger deviation between the pixel's grayscale value and the average value of its local environment indicates a greater degree of local brightness outlier, and a larger gradient magnitude indicates a more severe edge change. Therefore, this invention combines the deviation between the pixel's grayscale value and the average value of its local environment with the pixel's gradient magnitude to obtain the visual interference index of the pixel.
[0060] The visual interference index of any pixel satisfies the expression:
[0061] ;
[0062] In the formula, This represents the visual interference index of the j-th pixel in the i-th grayscale image; This represents the gray value of the j-th pixel in the i-th grayscale image; This represents the mean gray value within the local neighborhood window of the j-th pixel in the i-th grayscale image; This represents the standard deviation of gray levels within the local neighborhood window of the j-th pixel in the i-th grayscale image; This represents the gradient magnitude of the j-th pixel in the i-th grayscale image; This represents the maximum gradient magnitude of the i-th grayscale image; This indicates a small positive value, used to prevent the denominator from being zero. For example... .
[0063] In the formula, This represents the grayscale difference between the j-th pixel in the i-th grayscale image and its local neighborhood window; The degree of brightness abnormality of the pixel is reflected by calculating the normalized deviation between the gray value of the j-th pixel in the i-th grayscale image and the average value of its neighborhood. The larger the value, the greater the possibility that the pixel is a highlight or a shadow. This indicates that the gradient magnitude of the j-th pixel in the i-th grayscale image is normalized by the maximum gradient magnitude of the i-th grayscale image. It reflects the degree of grayscale change of the pixel. The larger the value, the greater the probability that the pixel belongs to the edge region of highlight or shadow.
[0064] It should be noted that Figure 3 shows the trend of visual interference index, which shows the range of visual interference index for all pixels in each frame, as well as the average visual interference index for each frame, reflecting the trend of visual interference index as the sheep manure is transported.
[0065] At this point, the visual interference index of each pixel in each grayscale image has been obtained.
[0066] It should be noted that the visual interference index is a continuous value that describes the distribution of interference probability, and is not a direct basis for decision-making. Therefore, this invention further introduces thresholding processing to generate a binary material stability mask.
[0067] Preferably, the stability mask for identifying reliable material regions is obtained by comparing the visual interference index with a preset interference threshold, including:
[0068] Calculate the mean and standard deviation of the visual interference index for all pixels in any grayscale image.
[0069] The sum of k times the standard deviation and the mean is denoted as the preset interference threshold, where k is a sensitivity adjustment factor used to control the stringency of the threshold. For example, k is 2.5.
[0070] For any pixel in the grayscale image, if the visual interference index of the pixel is greater than or equal to a preset interference threshold, the pixel is marked as 0; if the visual interference index of the pixel is less than the preset interference threshold, the pixel is marked as 1, thus obtaining the material stability mask of the grayscale image. It should be noted that pixels marked as 1 belong to stable regions, and pixels marked as 0 belong to interference regions.
[0071] Thus, the material stability mask was obtained.
[0072] S3: Spatial gating of the inter-frame difference results of the grayscale image is performed using a material stability mask to shield the interference region and generate a robust motion feature map; static connected components in the robust motion feature map are extracted, and the blockage index is calculated based on their area and average staticity.
[0073] It should be noted that the material stability mask can distinguish reliable materials from visual interference, thereby enabling motion analysis and blockage identification. While traditional inter-frame difference methods can detect image changes, they cannot differentiate between blockages and normal slow flow, and are susceptible to interference from pseudo-motion signals such as specular flicker. Therefore, this invention first uses a stability mask to spatially weight and filter the inter-frame difference results, ensuring that motion analysis is performed only within reliable material regions. Subsequently, by performing threshold segmentation and morphological analysis on the filtered difference image, all stationary pixels are extracted and aggregated into spatially continuous candidate blockage regions.
[0074] Specifically, spatial gating is performed on the inter-frame difference results of grayscale images using a material stability mask to shield interference regions and generate robust motion feature maps, including:
[0075] It should be noted that, in order to filter out visual interference in inter-frame differential, this invention uses a material stability mask as a spatial gate. By multiplying the differential result with the mask pixel by pixel, the difference values of all pixels located in unreliable areas can be reduced to zero, thereby achieving the purpose of shielding pseudo motion signals.
[0076] The robust inter-frame difference value of any pixel satisfies the expression:
[0077] ;
[0078] In the formula, This represents the robust inter-frame difference value of the j-th pixel in the i-th grayscale image; This represents the gray value of the j-th pixel in the i-th grayscale image; This represents the gray value of the j-th pixel in the (i-1)-th grayscale image; This represents the material stability mask value of the j-th pixel in the i-th grayscale image.
[0079] In the formula, This represents the calculation of the absolute value of the original grayscale difference at the same pixel position in two adjacent frames. This value reflects the total amount of motion at that point, including both real and pseudo-motion signals. This indicates that the original motion quantities are weighted using a stability mask, when... When the result is 0, the result is zero, thus obtaining a robust inter-frame difference value that only reflects the actual material movement.
[0080] The robust inter-frame difference values of all pixels in the i-th grayscale image constitute the robust motion feature map of the i-th grayscale image.
[0081] Preferably, the static connected components in the robust motion feature map are extracted, and a congestion index is calculated based on their area and average static degree, including:
[0082] The robust motion feature map of the i-th grayscale image is binarized, and a motion threshold is set. Pixels with robust inter-frame differences lower than the motion threshold constitute the stationary region of the i-th grayscale image. It should be noted that due to sensor noise, even the difference value in stationary regions is not zero; therefore, a motion threshold is set to define stationarity. Preferably, the Otsu method is used to analyze the histogram of the robust motion feature image to obtain the motion threshold.
[0083] Pixels in stagnant regions are designated as stagnant pixels. An 8-connectivity-based connected component analysis algorithm is used to merge spatially adjacent stagnant pixels into several candidate congestion regions. It should be noted that Figure 4 shows the change in the number of candidate congestion regions in each frame, illustrating the trend of change in the number of candidate congestion regions as sheep manure transport changes.
[0084] It should be noted that, in order to assess the congestion risk of each candidate congestion region, a scoring function that can simultaneously reflect its size and degree of stillness needs to be constructed. The size can be characterized by the pixel area of the candidate congestion region, while the degree of stillness can be characterized by the average robust inter-frame difference value within the candidate congestion region. Therefore, the congestion index of each candidate congestion region is obtained by combining the area of the candidate congestion region and the robust inter-frame difference value.
[0085] The congestion index of any candidate congestion region satisfies the expression:
[0086] ;
[0087] In the formula, This represents the congestion index of the k-th candidate congestion region in the i-th grayscale image; This represents the number of pixels in the k-th candidate blocking region of the i-th grayscale image; This represents the robust inter-frame difference value of the q-th pixel in the k-th candidate congestion region of the i-th grayscale image; The maximum grayscale value of the image; This represents the natural logarithm function. For example, .
[0088] In the formula, The scale factor increases with the number of pixels. The weight increases with the increase of the value, and is used to assign higher weights to large static areas. This means summing up the robust inter-frame difference values of all pixels within the k-th candidate blocking region to obtain the total motion within that region. The theoretical upper limit of the maximum total motion that the k-th candidate blockage region of the i-th grayscale image can reach is represented and used as the normalized denominator. This represents the normalized average motion within the calculation area. The value is between 0 and 1, and the smaller the value, the more static the area. This means that multiplying the scale factor by the average stillness factor results in a significantly higher congestion index for areas with large areas and high stillness.
[0089] Thus, the congestion index of each candidate congestion region in each grayscale image has been obtained.
[0090] S4: Compare the congestion index of each candidate congestion region in any grayscale image with a preset decision threshold to determine the congestion event and generate a response signal.
[0091] It should be noted that this invention establishes a congestion decision threshold and constructs a decision boundary. When the congestion index of any candidate congestion area is greater than the decision boundary, it indicates that the system switches from a normal monitoring state to an abnormal response state.
[0092] Specifically, the congestion index of each candidate congestion region in an arbitrary grayscale image is compared with a preset decision threshold to determine congestion events and generate response signals, including:
[0093] The system compares the blockage index of any candidate blockage region in an arbitrary grayscale image with a blockage decision threshold. If the blockage index of at least one candidate blockage region in the grayscale image is greater than the blockage decision threshold, the system determines that the conveyor system is blocked. In response to the blockage determination, the system generates a response signal. For example, this response signal is a high-level pulse or a specific CAN bus message used to drive downstream industrial automation equipment. For instance, the signal is sent to a programmable logic controller (PLC), which executes a preset linkage program, such as immediately stopping the conveyor belt motor, activating on-site audible and visual alarms, or pushing alarm information to an upper-level monitoring system via industrial Ethernet. For example, the blockage decision threshold is set to 0.5.
[0094] Thus, the machine vision-based identification and response to blockages in sheep manure transport was completed.
[0095] This invention also discloses a machine vision-based sheep manure conveying blockage identification system, including a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement a machine vision-based sheep manure conveying blockage identification method according to the present invention.
[0096] 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.
[0097] While this specification has shown and described numerous embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.
Claims
1. A machine vision-based method for identifying blockages in sheep manure transport, characterized in that, include: The video stream of the conveying process is acquired using an industrial camera at a preset frame rate and decoded into a grayscale image sequence. The brightness deviation and gradient magnitude features in the local neighborhood of any pixel in any grayscale image are weighted and fused to obtain the visual interference index of the pixel. The visual interference index is compared with a preset interference threshold to obtain a stability mask that identifies reliable material areas. The inter-frame difference results of the grayscale image are spatially gated using the material stability mask to shield interference areas and generate robust motion feature maps. Extracting stationary connected components from the robust motion feature map and calculating the congestion index based on their area and average stationarity includes: binarizing the robust motion feature map of the i-th grayscale image, setting a motion threshold, and identifying all pixels with robust inter-frame differences lower than the motion threshold as stagnant regions of the i-th grayscale image; and obtaining candidate congestion regions of the i-th grayscale image. , This represents the congestion index of the k-th candidate congestion region in the i-th grayscale image; This represents the number of pixels in the k-th candidate blocking region of the i-th grayscale image; This represents the robust inter-frame difference value of the q-th pixel in the k-th candidate congestion region of the i-th grayscale image; The maximum grayscale value of the image; The function represents the natural logarithm. The congestion index of any candidate congestion region in any grayscale image is compared with the congestion decision threshold. If the congestion index of at least one candidate congestion region in the grayscale image is greater than the congestion decision threshold, then the conveying system is determined to be congested. In response to the congestion determination result, the system generates a response signal.
2. The machine vision-based method for identifying blockages in sheep manure transport according to claim 1, characterized in that, The acquisition of the grayscale image sequence includes: setting the acquisition frame rate; continuously acquiring the video stream during the transmission process and decoding the video stream into a series of image frames ordered by time; performing grayscale processing on each image frame and constructing a grayscale image sequence in chronological order.
3. The machine vision-based method for identifying blockages in sheep manure transport according to claim 1, characterized in that, The step of weightedly fusing the brightness deviation and gradient magnitude features within the local neighborhood of any pixel in an arbitrary grayscale image to obtain the visual interference index of the pixel includes: defining a local neighborhood window centered on any pixel in an arbitrary grayscale image; calculating the mean grayscale value and standard deviation of all pixels within the local neighborhood window; calculating the gradient magnitude of the pixel using the Sobel operator, and obtaining the maximum gradient magnitude of all pixels in the grayscale image; the visual interference index of the pixel is positively correlated with the difference between the grayscale value and the mean grayscale value of the pixel, positively correlated with the gradient magnitude of the pixel, and negatively correlated with the standard deviation of the grayscale value.
4. The machine vision-based method for identifying blockages in sheep manure transport according to claim 3, characterized in that, The visual interference index of the pixel satisfies the expression: In the formula, This represents the visual interference index of the j-th pixel in the i-th grayscale image; This represents the gray value of the j-th pixel in the i-th grayscale image; This represents the mean gray value within the local neighborhood window of the j-th pixel in the i-th grayscale image; This represents the standard deviation of gray levels within the local neighborhood window of the j-th pixel in the i-th grayscale image; This represents the gradient magnitude of the j-th pixel in the i-th grayscale image; This represents the maximum gradient magnitude of the i-th grayscale image; It represents a tiny positive value.
5. The machine vision-based method for identifying blockages in sheep manure transport according to claim 1, characterized in that, The step of comparing the visual interference index with a preset interference threshold to obtain a stability mask for identifying reliable material regions includes: calculating the mean and standard deviation of the visual interference index of all pixels in an arbitrary grayscale image; setting a preset interference threshold; for any pixel in the grayscale image, if the visual interference index of the pixel is greater than or equal to the preset interference threshold, then the pixel is marked as 0; if the visual interference index of the pixel is less than the preset interference threshold, then the pixel is marked as 1, thereby obtaining the material stability mask of the grayscale image.
6. The machine vision-based method for identifying blockages in sheep manure transport according to claim 5, characterized in that, The preset interference threshold is k times the standard deviation of the visual interference index of all pixels plus the mean of the visual interference index of all pixels; k is a sensitivity adjustment factor used to control the strictness of the threshold.
7. The machine vision-based method for identifying blockages in sheep manure transport according to claim 1, characterized in that, The method of spatially gating the inter-frame difference results of the grayscale image using a material stability mask to shield interference areas and generate robust motion feature maps includes: the robust inter-frame difference value of any pixel satisfies the expression: In the formula, This represents the robust inter-frame difference value of the j-th pixel in the i-th grayscale image; This represents the gray value of the j-th pixel in the i-th grayscale image; This represents the gray value of the j-th pixel in the (i-1)-th grayscale image; The material stability mask value of the j-th pixel in the i-th grayscale image is represented; the robust inter-frame difference values of all pixels in the i-th grayscale image constitute the robust motion feature map of the i-th grayscale image.
8. The machine vision-based method for identifying blockages in sheep manure transport according to claim 1, characterized in that, The acquisition of candidate blocked regions of the i-th grayscale image includes: recording the pixels of the stagnant region as stagnant pixels, and using an 8-connected connected component analysis algorithm to merge spatially adjacent stagnant pixels into several candidate blocked regions.
9. A machine vision-based sheep manure conveying blockage identification system, characterized in that, include: A processor and a memory, wherein the memory stores computer program instructions that, when executed by the processor, implement a machine vision-based method for identifying blockages in sheep manure transport according to any one of claims 1-8.
Citation Information
Patent Citations
Visual identification method and system for surface physical damage of MBR flat membrane
CN121599993A