Lotus root hole sludge detection method based on machine vision
By constructing an adaptive feature extraction model for lotus root pores, combining multi-dimensional feature fusion and intelligent cleaning strategies, the problem of insufficient adaptability in lotus root pores silt detection is solved, efficient and accurate silt detection and cleaning is achieved, and the processing quality and production efficiency of lotus roots are improved.
Patent Information
- Application Number
- CN202510512048.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-08-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art mostly relies on a single image feature in the detection of lotus root pore silt, and does not fully combine core indicators such as shape contour and edge clarity, resulting in poor adaptability to complex structures, difficulty in accurately identifying silt, and the detection and cleaning links are out of touch, lack of intelligent matching.
A adaptive feature extraction model for the lotus holes is constructed, and through the multi-dimensional feature fusion of roundness, gray mean and edge density, combined with real-time feedback from the visual interface, the cleaning strategy is dynamically adjusted to realize intelligent detection and efficient cleaning of the sludge distribution inside the lotus holes.
It significantly improves the quality control level of lotus root processing, enhances the adaptability to complex scenarios, realizes an efficient closed loop from detection to production decisions, and promotes the development of agricultural product processing to precision and intelligence.
Smart Images

Figure CN120451067A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of silt detection, in particular to a silt detection method for lotus root holes based on machine vision. Background Art
[0002] Lotus root is an important aquatic economic crop in my country. The efficient detection of silt inside the lotus root hole during its processing is a key link to ensure product quality. The lotus root hole structure is slender and curved, and silt is easily retained on the inner wall. If it is not cleaned thoroughly, it will directly affect the edible safety and processing quality of the lotus root. Traditional detection methods mainly rely on manual visual or probe detection, which has problems such as low efficiency, high missed detection rate, and high labor intensity. It is difficult to meet the needs of automated detection in large-scale production. With the application and promotion of machine vision technology in the field of agricultural inspection, silt detection methods based on image analysis have gradually emerged. However, the detection of the special structure of lotus root hole still faces many technical challenges, and the complex structure is not adaptable enough: lotus root The holes are irregularly tubular with diverse inner wall textures. Traditional machine vision methods find it difficult to accurately extract complex features such as shape deformation, grayscale changes, and edge blurring caused by silt adhesion, and are easily affected by factors such as uneven lighting and individual differences in lotus root holes. Lack of multi-dimensional feature fusion: Existing technologies mostly rely on single image features for detection, and fail to fully combine multi-dimensional information such as the shape contour and edge clarity of the lotus root holes, resulting in insufficient recognition of complex conditions such as mild siltation and local blockage. Detection and cleaning links are disconnected: There is a lack of an intelligent matching mechanism between detection results and cleaning strategies, and it is impossible to provide targeted treatment suggestions based on the specific circumstances of silt distribution, affecting the efficiency and effectiveness of subsequent cleaning processes.
[0003] However, the current common solutions have many shortcomings, including: existing technologies mostly rely on single image features for silt detection, fail to fully combine core indicators such as the shape contour and edge clarity of the lotus root hole, and have poor adaptability to complex structures. Traditional machine vision methods usually use fixed thresholds or preset models, and lack adaptive adjustment mechanisms for lotus root holes of different varieties, sizes, and curvatures. Faced with naturally irregular lotus root holes or special textures formed by the growth environment, existing methods are prone to misjudging normal structures as silt anomalies, or missing actual siltation areas. Summary of the Invention
[0004] The purpose of this section is to summarize some aspects of the embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the abstract and title of this application to avoid obscuring the purpose of this section, the abstract and the title of the invention, and such simplifications or omissions should not be used to limit the scope of the present invention.
[0005] In view of the problems existing in the above-mentioned existing method for detecting silt in lotus root holes based on machine vision, the present invention is proposed.
[0006] Therefore, the purpose of the present invention is to provide a lotus root hole silt detection method based on machine vision, which is suitable for solving the problem that the existing technology mostly relies on single image features for silt detection, does not fully combine core indicators such as the shape contour and edge clarity of the lotus root hole, and has poor adaptability to complex structures.
[0007] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0008] In the first aspect, an embodiment of the present invention provides a method for detecting silt in lotus root holes based on machine vision, which includes using a sensor to collect lotus root hole image data and preprocessing it; constructing a lotus root hole adaptive feature extraction model based on the lotus root hole image data and performing feature extraction on the lotus root hole image data; detecting the silt distribution inside the lotus root hole according to the feature extraction result; and generating feedback information in real time according to the silt distribution inside the lotus root hole and informing the user through a visual interface.
[0009] As a preferred solution of the lotus root hole silt detection method based on machine vision described in the present invention, the sensor is a high-resolution camera; the lotus root hole image data includes shape and contour information, grayscale information, and edge and texture information.
[0010] As a preferred embodiment of the lotus root hole silt detection method based on machine vision of the present invention, a lotus root hole adaptive feature extraction model is constructed based on the lotus root hole image data, comprising the following steps: labeling and dividing the lotus root hole image data; calculating the circularity, grayscale mean, and edge density of the lotus root hole based on the lotus root hole image data; and calculating the circularity of the lotus root hole area by binarizing the lotus root hole image data. The specific formula is as follows:
[0011]
[0012] Where R is the circularity; C is the perimeter of the lotus root hole area; A is the area of the lotus root hole area;
[0013] By traversing all pixels in the hole area, the grayscale mean is obtained. The specific formula is as follows:
[0014]
[0015] Among them, I mean is the grayscale mean; I(x,y) is the grayscale value of the pixel with coordinates (x,y) in the lotus hole area; Ω is the lotus hole area; A is the area of the lotus hole area;
[0016] Use the edge detection algorithm to detect the edge of the image and calculate the clarity of the edge of the lotus root hole. The specific formula is as follows:
[0017]
[0018] Among them, E d is the edge density; n e is the number of edge pixels; A is the area of the lotus hole area;
[0019] The circularity, grayscale mean and edge density are fused to construct a lotus root hole adaptive feature extraction model.
[0020] As a preferred solution of the lotus root hole silt detection method based on machine vision of the present invention, the specific steps of the lotus root hole adaptive feature extraction model are as follows:
[0021] F total =w1·R+w2·I mean +w3·E d ;
[0022] Among them, F total is a comprehensive index; w1, w2 and w3 are weight coefficients, corresponding to the importance of the three features of circularity, grayscale mean and edge density respectively; R is circularity; I mean is the grayscale mean; E d is the edge density.
[0023] As a preferred embodiment of the lotus root hole silt detection method based on machine vision described in the present invention, the silt distribution inside the lotus root hole is detected according to the feature extraction result, including the following steps: when the comprehensive index is greater than the first moderate threshold, it indicates that the circularity, grayscale mean and edge density are all in the normal range, the lotus root hole contour is smooth, and there is no obvious depression or bulge; when the comprehensive index is less than the first moderate threshold and greater than the first severe threshold, it indicates that there is a moderate abnormality in the feature and further analysis is required: if the circularity is less than the second moderate threshold and greater than the second severe threshold, it indicates that the local contour of the lotus root hole deviates from the regular circle, unilateral depression or irregular bulge occurs, and deformation caused by silt accumulation occurs; if the grayscale mean is less than the third moderate threshold and greater than the third severe threshold, it indicates that the grayscale value of the local area is lower than the normal range and is displayed as a dark tone, indicating that silt coverage reduces the surface reflectivity, and it is necessary to combine image partitioning technology to lock the specific low grayscale segment, and there is silt coverage; if the edge density is less than the fourth When the moderate threshold is greater than the fourth severe threshold, it indicates that the edge is blurred or discontinuous, and the boundary between the silt and the lotus root hole is not clear, indicating that it is partially covered by silt, resulting in a decrease in boundary recognition; when the comprehensive index is less than the first severe threshold, it indicates that the advanced detection strategy needs to be activated for further analysis: if the circularity is less than the second severe threshold, it indicates that the lotus root hole contour is severely deformed and the morphology is significantly damaged. The shape of the lotus root hole deviates from the natural regular circular structure and presents multiple irregular depressions, protrusions or distortions; if the grayscale mean is less than the third severe threshold, it indicates that the lotus root hole is dark as a whole and the reflectivity is extremely low. Affected by the large area of silt coverage, the grayscale value of the lotus root hole area presents a global low brightness feature. The inside of the lotus root hole can be seen to be dark gray and gray-brown by naked eye, which is in sharp contrast to the light gray and milky white of the clean lotus root hole; if the edge density is less than the fourth severe threshold, it indicates that the boundary of the lotus root hole is blurred, and the interface between the silt and the lotus root hole wall loses its clear boundary due to heavy coverage. The edge detection algorithm can only capture sporadic discontinuous edges, and there is no edge signal at all in the large area of silt.
[0024] As an optimal solution of the lotus root hole silt detection method based on machine vision described in the present invention, the specific situation of the dynamic adjustment of the edge computing strategy is as follows: feedback information is generated in real time according to the silt distribution inside the lotus root hole and notified to the user through a visual interface, including the following steps: based on the interval to which the comprehensive indicator belongs and the single feature abnormality type, a standardized detection conclusion is generated: no significant silt: the lotus root hole is clean as a whole, and all feature parameters are in the normal range; partial area siltation: there is mild siltation in the lotus root hole, which manifests as irregular contour / local decrease in reflectivity / blurred edges; severe siltation or blockage: there is severe siltation in the lotus root hole, and the cross-sectional area is significantly reduced, and it is recommended to carry out deep cleaning immediately; a three-color light is set at the top of the interface, corresponding to no siltation / partial siltation / severe siltation, to quickly convey the overall status; the circularity, grayscale mean, and edge density of each segment are listed in a table, and the degree of abnormality is marked with color scale; the cleaning strategy is automatically matched based on the standardized detection conclusion; severe siltation is highlighted by flashing red light and buzzer alarm.
[0025] As a preferred solution of the lotus root pore silt detection method based on machine vision described in the present invention, the specific contents of the cleaning strategy are as follows: no siltation: prompt "no special treatment is required, you can proceed to the next process"; partial siltation: it is recommended to "use a medium-pressure water gun to flush, focusing on areas with irregular contours"; severe siltation: trigger an alarm and display "immediately enable high-pressure cleaning mode, it is recommended to manually review the blocked section."
[0026] In the second aspect, in order to further solve the above-mentioned technical problems, the embodiment of the present invention provides a lotus root hole silt detection system based on machine vision, which includes: a data acquisition module for collecting lotus root hole image data and performing preprocessing; a model construction module for constructing a lotus root hole adaptive feature extraction model and performing feature extraction on the lotus root hole image data; a result detection module for detecting the silt distribution inside the lotus root hole according to the feature extraction results; and a situation display module for generating feedback information on the silt distribution inside the lotus root hole in real time and informing the user through a visual interface.
[0027] In a third aspect, an embodiment of the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the lotus root hole silt detection method based on machine vision as described in the first aspect of the present invention is implemented.
[0028] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the lotus root hole silt detection method based on machine vision as described in the first aspect of the present invention.
[0029] The beneficial effects of the present invention are as follows: the present invention solves the problem of misjudgment of irregular lotus root holes by traditional fixed threshold detection methods by constructing an adaptive feature extraction model for lotus root holes, so that the detection system can adapt to a variety of lotus root varieties and morphological changes without manual calibration, significantly enhancing the adaptability to complex scenes, breaking through the limitations of single feature detection, and realizing three-dimensional cognition of the internal state of lotus root holes. Through automation and intelligent design, an efficient closed loop from detection to production decision-making is constructed. This method not only improves the quality control level of lotus root processing, but also provides a popularizable technical path for the application of machine vision in the field of agricultural product processing, and promotes the development of the industry towards precision and intelligence. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive effort. Among them:
[0031] Figure 1 This is a flow chart for implementing the present invention in Example 1.
[0032] Figure 2 Flowchart of the cleaning strategy in Example 1.
[0033] Figure 3 This is a flow chart of the advanced detection strategy in Example 1. DETAILED DESCRIPTION
[0034] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0035] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0036] Secondly, the term "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in various places throughout this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive of other embodiments.
[0037] Example 1
[0038] Reference Figure 1 、 Figure 2 and Figure 3 , which is the first embodiment of the present invention, provides a method for detecting silt in lotus root holes based on machine vision, comprising the following steps:
[0039] S1: Use the sensor to collect lotus root hole image data and perform preprocessing.
[0040] Preferably, the sensor is a plurality of high-resolution cameras, which are arranged at different angles to achieve 360° coverage of the lotus root holes without blind spots.
[0041] Furthermore, the lotus root hole image data includes shape and contour information, grayscale information, and edge and texture information.
[0042] Specifically, the preprocessing of lotus root hole image data includes multi-view image fusion, illumination compensation and denoising, image enhancement and contrast optimization, and dynamic information processing, providing high-quality data for subsequent feature extraction.
[0043] S2: Construct a lotus root hole adaptive feature extraction model based on the lotus root hole image data and perform feature extraction on the lotus root hole image data.
[0044] Furthermore, a lotus root hole adaptive feature extraction model is constructed based on the lotus root hole image data, including the following steps: labeling and dividing the lotus root hole image data.
[0045] The circularity, grayscale mean and edge density of the lotus root hole are calculated based on the lotus root hole image data.
[0046] The circularity of the lotus root hole area is calculated by binarizing the lotus root hole image data. The specific formula is as follows:
[0047]
[0048] Among them, R is the circularity, which is a parameter used to describe the shape characteristics of the lotus root hole. The closer the circularity is to 1, the more regular the shape of the lotus root hole; C is the circumference of the lotus root hole area; A is the area of the lotus root hole area.
[0049] By traversing all pixels in the hole area, the grayscale mean is obtained. The specific formula is as follows:
[0050]
[0051] Among them, I mean is the grayscale mean, reflecting the average brightness of the lotus root hole surface; I(x,y) is the grayscale value of the pixel with coordinates (x,y) in the lotus root hole area; Ω is the lotus root hole area; A is the area of the lotus root hole area.
[0052] Use the edge detection algorithm to detect the edge of the image and calculate the clarity of the edge of the lotus root hole. The specific formula is as follows:
[0053]
[0054] Among them, E d is the edge density, which is used to describe the clarity of the edge of the lotus root hole; n e is the number of edge pixels; A is the area of the lotus root hole region, which is used to associate the number of edge pixels with the size of the lotus root hole region.
[0055] The circularity R and grayscale mean I mean and the edge density E d Perform feature fusion and build a lotus root hole adaptive feature extraction model.
[0056] Specifically, the edge detection algorithm is used to extract pixel information of the edge of the lotus root hole, quantify the clarity and completeness of the edge of the lotus root hole, and provide key feature parameters for silt detection.
[0057] Preferably, the specific steps of the lotus root hole adaptive feature extraction model are as follows:
[0058] F total =w1·R+w2·I mean +w3·E d ;
[0059] Among them, F total is a comprehensive index; w1, w2 and w3 are weight coefficients, corresponding to circularity R, grayscale mean I mean and the edge density E d The importance of the three features; R is circularity; I mean is the grayscale mean; E d is the edge density.
[0060] It should be noted that the weight coefficients of w1, w2 and w3 are dynamically allocated according to the discrimination of features for silt detection and scene requirements, that is, the weight allocation mechanism to achieve effective fusion of multiple features.
[0061] Furthermore, the comprehensive indicator formula transforms the three independent indicators of shape, grayscale and edge into a unified silt detection criterion through linear weighted fusion of multi-dimensional complementary features. The weight distribution mechanism ensures that the model can dynamically adapt to the scene, and ultimately achieves efficient and reliable detection of lotus root hole silt.
[0062] It should be noted that the circularity R and grayscale mean I are selected mean and edge density E d As a feature, it is because it accurately quantifies the contour distortion, grayscale difference and edge blur caused by silt from three complementary dimensions: the shape regularity of the lotus root hole, the surface brightness and the edge clarity, thereby realizing multi-dimensional and efficient detection of lotus root hole silt.
[0063] Preferably, the circularity is used to identify the contour deformation caused by silt, the grayscale mean is used to locate the abnormal reflective area, and the edge density is used to judge the degree of boundary blur. The cross-validation of the three effectively eliminates environmental interference and significantly improves the detection reliability in complex scenes.
[0064] S3: Detect the silt distribution inside the lotus root hole based on the feature extraction results.
[0065] Preferably, the detection of the silt distribution inside the lotus hole according to the feature extraction result includes the following steps: when the comprehensive index F total When it is greater than the first moderate threshold, it indicates that the circularity R and grayscale mean I mean and edge density E d They are all in the normal range, the lotus root hole contours are smooth, without obvious depressions or protrusions, the lotus root hole wall surface is clean, the light reflection is consistent, the grayscale value is in the normal range, there is no large area of low-reflective area, the edges of the lotus root hole boundary and the internal structure are sharp, the boundary between the silt and the hole wall is obvious, and the edge detection algorithm can identify continuous and complete contours.
[0066] When the comprehensive index F total When the value is less than the first moderate threshold and greater than the first severe threshold, it indicates that there is a moderate abnormality in the feature and further analysis is required:
[0067] If the roundness R is less than the second moderate threshold and greater than the second severe threshold, it indicates that the local contour of the lotus root hole deviates from the regular circle, with unilateral depression or irregular protrusion, and there is deformation caused by silt accumulation, resulting in an imbalance in the ratio of circumference to area. The deformed area should be locked and marked, and local flushing or mechanical dredging should be performed as a priority.
[0068] If the grayscale mean I mean When it is less than the third moderate threshold and greater than the third severe threshold, it indicates that the grayscale value of the local area is lower than the normal range and appears as a dark tone, indicating that the silt coverage has reduced the surface reflectivity. It is necessary to combine image partitioning technology to lock the specific low-grayscale segment. If there is silt coverage, the low-grayscale area should be cleaned in a targeted manner. After cleaning, the grayscale value should be re-tested to see if it has returned to normal.
[0069] If the edge density E d When it is less than the fourth moderate threshold and greater than the fourth severe threshold, it indicates that the edge is blurred or discontinuous, the boundary between the silt and the lotus root hole is not clear, and the edge pixels recognized by the edge detection algorithm are reduced, indicating that it is partially covered by silt, resulting in a decrease in boundary recognition. Use a soft brush to lightly brush the blurred edge area to remove the loose silt attached, and then re-detect the edge density.
[0070] When the comprehensive index F total When it is less than the first severe threshold, it indicates that an advanced detection strategy needs to be activated, such as Figure 3 , further analysis:
[0071] If the roundness R is less than the second severe threshold, it means that the outline of the lotus root hole deviates seriously from the standard circle, with a large number of depressions and protrusions, resulting in a significant increase in the circumference and a significant decrease in the area. There are many bends and twists, and the original regular circular structure is severely damaged. The overall shape becomes extremely irregular, far beyond the range of variation of the normal lotus root hole shape. The morphology is significantly damaged, and the shape of the lotus root hole deviates from the natural regular circular structure, showing multiple irregular depressions, protrusions or twists. For severely deformed areas, a high-pressure water gun is used for deep dredging, and the integrity of the internal structure is checked through manual intervention.
[0072] If the grayscale mean I mean When it is less than the third severe threshold, it indicates that the lotus root hole is dark as a whole and has extremely low reflectivity. Affected by large-area silt coverage, the grayscale value of the lotus root hole area presents a global low-brightness feature. Observation with the naked eye shows that the inside of the lotus root hole is dark gray and gray-brown, which is in sharp contrast to the light gray and milky white of the clean lotus root hole. According to the grayscale value distribution, high-intensity cleaning is given priority to the high-dark areas, and the treatment is carried out in stages until the grayscale value returns to the normal range.
[0073] If the edge density E d When it is less than the fourth severe threshold, it indicates that the boundary of the lotus root hole is blurred, and the interface between the silt and the hole wall loses its clear boundary due to heavy coverage. The edge detection algorithm can only capture sporadic discontinuous edges. There is no edge signal at all in the large area of silt. Use a probe to contact the inner wall of the lotus root hole, and judge the degree of silt adhesion through resistance feedback. The area without edge signal is thoroughly rinsed, and chemical solvents are used to soften stubborn silt. After cleaning, the effect is verified by edge density recovery.
[0074] Preferably, differentiated cleaning strategies are adopted for different degrees of siltation, which saves resources and shortens cleaning time.
[0075] S4: Generate feedback information in real time based on the silt distribution inside the lotus hole and inform the user through a visual interface.
[0076] Preferably, the feedback information is generated in real time according to the distribution of silt inside the lotus root hole and notified to the user through a visual interface, including the following steps: generating a standardized detection conclusion according to the interval to which the comprehensive indicator belongs and the single characteristic abnormality type:
[0077] No significant silt: The lotus root holes are generally clean, and all characteristic parameters are within the normal range.
[0078] Siltation in some areas: There is slight siltation in the lotus root holes, which manifests as irregular outlines / decreased local reflectivity / blurred edges.
[0079] Severe siltation or blockage: There is heavy siltation in the lotus root hole, and the cross-sectional area is significantly reduced. It is recommended to conduct a deep cleaning immediately.
[0080] A three-color light is set at the top of the interface, corresponding to no siltation / partial siltation / serious siltation, to quickly convey the overall status.
[0081] The circularity, grayscale mean, and edge density of each segment are listed in a table, and the degree of abnormality is marked with color scale.
[0082] Automatically match cleaning strategies based on standardized test conclusions.
[0083] Severe mud conditions are highlighted with a flashing red light and buzzer alarm.
[0084] Specifically, the cleaning strategy is as follows: No accumulation: prompt "No special treatment is required, you can proceed to the next process."
[0085] Partial sedimentation: It is recommended to "use medium-pressure water gun to flush, focusing on areas with irregular contours."
[0086] Severe congestion: triggers an alarm and displays "Enable high-pressure cleaning mode immediately, and manual review of the blocked section is recommended."
[0087] For example, in a lotus root processing plant, a lotus root hole silt detection system based on machine vision is operating efficiently. When processing a batch of lotus roots, the system detected that the comprehensive indicators of some lotus root holes were not lower than the first severe threshold, and characteristic parameters such as roundness and edge density showed slow but continuous changes. The system continued to track these parameters. When the change time reached 4 hours and the rate was significantly accelerated, it automatically sent an early warning to the maintenance personnel, indicating that there may be an abnormality in the image acquisition link. The maintenance personnel quickly checked and found that one of the multi-view cameras had an angle offset due to slight vibration of the equipment, affecting the integrity and accuracy of the image. After timely adjustment and calibration, the camera restored the normal shooting angle, and the system regained high-quality lotus root hole image data, ensuring the accuracy of subsequent feature extraction and silt detection, avoiding misjudgment of silt due to image acquisition deviation, preventing silt from being undetected and flowing into the next process, and avoiding excessive cleaning due to misjudgment, thereby ensuring the quality and production efficiency of lotus root processing.
[0088] It should be noted that in the embodiment of the present application, the first moderate threshold and the first severe threshold are calculated by collecting thousands of groups of normal lotus root hole data to calculate comprehensive indicators, and then collecting comprehensive indicators of moderately and severely silted lotus root holes, and using statistical methods to divide the interval boundaries of normal, moderately abnormal, and severely abnormal, thereby determining the first moderate threshold and the first severe threshold; the second moderate threshold and the second severe threshold are measured for the circularity of a large number of normal lotus root holes, and their normal fluctuation ranges are counted, and the circularity of the lotus root holes with silt accumulation and deformation is calculated, and the changing rules of the circularity under different deformation degrees are analyzed, and by comparing normal and abnormal data, combined with the definition requirements of "moderate deformation" and "severe deformation" in actual detection, the second moderate threshold and the second severe threshold are determined; The third moderate threshold and the third severe threshold are the grayscale mean range of the statistically cleaned lotus root holes, the grayscale mean is measured for the lotus root holes covered with silt, and the changes in grayscale values under different coverage degrees are analyzed. Through a large amount of data comparison, combined with the visual and quantitative judgment standards of "partial silt coverage" and "severe silt coverage" in actual detection, the third moderate threshold and the third severe threshold are determined; the fourth moderate threshold and the fourth severe threshold are determined by calculating the edge density of normal lotus root holes, calculating the edge density of lotus root holes covered with silt, analyzing the law of edge pixel reduction under different coverage degrees, and comparing normal and abnormal data, combined with the boundary judgment of "partial coverage" and "severe coverage" in actual detection.
[0089] In summary, the present invention solves the problem of misjudgment of irregular lotus root holes by traditional fixed threshold detection methods by constructing an adaptive feature extraction model for lotus root holes, so that the detection system can adapt to a variety of lotus root varieties and morphological changes without manual calibration, significantly enhancing the adaptability to complex scenes, breaking through the limitations of single feature detection, and realizing three-dimensional cognition of the internal state of lotus root holes. Through automation and intelligent design, an efficient closed loop from detection to production decision-making is constructed. This method not only improves the quality control level of lotus root processing, but also provides a popularizable technical path for the application of machine vision in the field of agricultural product processing, and promotes the development of the industry towards precision and intelligence.
[0090] Example 2 is an embodiment of the present invention, which provides a lotus root hole silt detection system based on machine vision, including: a data acquisition module, used to collect lotus root hole image data and perform preprocessing; a model construction module, used to construct a lotus root hole adaptive feature extraction model and perform feature extraction on the lotus root hole image data; a result detection module, used to detect the silt distribution inside the lotus root hole according to the feature extraction results; and a situation display module, used to generate feedback information on the silt distribution inside the lotus root hole in real time and inform the user through a visual interface.
[0091] Example 3 is an embodiment of the present invention, which is different from the previous embodiment in that:
[0092] This embodiment also provides a computer device, which is suitable for a lotus root hole silt detection method based on machine vision, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute computer-executable instructions to implement a lotus root hole silt detection method based on machine vision as proposed in the above embodiment.
[0093] The computer device may be a terminal, comprising a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a button, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse.
[0094] This embodiment also provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for detecting silt in lotus root holes based on machine vision as proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk or optical disk.
[0095] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for detecting silt in lotus root holes based on machine vision, characterized in that: include: Use sensors to collect lotus root hole image data and perform preprocessing; constructing a lotus root hole adaptive feature extraction model based on the lotus root hole image data and performing feature extraction on the lotus root hole image data; Detecting the silt distribution inside the lotus root hole according to the feature extraction result; Feedback information is generated in real time based on the silt distribution inside the lotus root hole and is notified to the user through a visual interface.
2. The method for detecting silt in lotus root holes based on machine vision according to claim 1, wherein: The sensor is a high-resolution camera; The lotus root hole image data includes shape and contour information, grayscale information, and edge and texture information.
3. The method for detecting silt in lotus root holes based on machine vision according to claim 1, wherein: Constructing a lotus root hole adaptive feature extraction model based on the lotus root hole image data includes the following steps: Marking and dividing the lotus root hole image data; Calculate the circularity, grayscale mean and edge density of the lotus root hole according to the lotus root hole image data; The circularity of the lotus root hole area is calculated by binarizing the lotus root hole image data. The specific formula is as follows: Where R is the circularity; C is the perimeter of the lotus root hole area; A is the area of the lotus root hole area; By traversing all pixels in the hole area, the grayscale mean is obtained. The specific formula is as follows: Among them, I mean is the grayscale mean; I(x,y) is the grayscale value of the pixel with coordinates (x,y) in the lotus hole area; Ω is the lotus hole area; A is the area of the lotus hole area; Use the edge detection algorithm to detect the edge of the image and calculate the clarity of the edge of the lotus root hole. The specific formula is as follows: Among them, E d is the edge density; n e is the number of edge pixels; A is the area of the lotus hole area; The circularity, grayscale mean and edge density are fused to construct a lotus root hole adaptive feature extraction model.
4. The method for detecting silt in lotus root holes based on machine vision according to claim 3, wherein: The specific steps of the lotus root hole adaptive feature extraction model are as follows: F total =w1·R+w2·I mean +w3·E d ; Among them, F total is a comprehensive index; w1, w2 and w3 are weight coefficients, corresponding to the importance of the three features of circularity, grayscale mean and edge density respectively; R is circularity; I mean is the grayscale mean; E d is the edge density.
5. The method for detecting silt in lotus root holes based on machine vision according to claim 4, characterized in that: Detecting the silt distribution inside the lotus root hole according to the feature extraction result includes the following steps: When the comprehensive index is greater than the first moderate threshold, it indicates that the circularity, grayscale mean, and edge density are all within the normal range, and the lotus root hole contour is smooth without obvious depressions or protrusions; When the composite index is less than the first moderate threshold and greater than the first severe threshold, it indicates that there is a moderate abnormality in the feature and further analysis is required: If the circularity is less than the second moderate threshold and greater than the second severe threshold, it indicates that the local contour of the lotus root hole deviates from the regular circle, with unilateral depression or irregular protrusion, indicating that deformation has occurred due to silt accumulation. If the grayscale mean is less than the third moderate threshold and greater than the third severe threshold, it indicates that the grayscale value of the local area is lower than the normal range and appears dark, indicating that silt coverage has reduced the surface reflectivity. It is necessary to combine image partitioning technology to locate the specific low-grayscale segment and the presence of silt coverage. If the edge density is less than the fourth moderate threshold and greater than the fourth severe threshold, it indicates that the edge is fuzzy or discontinuous, and the boundary between the silt and the lotus root hole is not clear, indicating that it is partially covered by silt, resulting in reduced boundary recognition; When the comprehensive index is lower than the first severe threshold, it indicates that the advanced detection strategy needs to be activated for further analysis: If the circularity is less than the second severe threshold, it indicates that the lotus root hole contour is severely deformed and the morphology is significantly damaged. The lotus root hole shape deviates from the natural regular circular structure and presents multiple irregular depressions, protrusions or distortions. If the grayscale mean is less than the third severe threshold, it indicates that the lotus root hole is dark and has extremely low reflectivity. Affected by the large area of silt, the grayscale value of the lotus root hole area presents a global low brightness feature. Observation with the naked eye shows that the inside of the lotus root hole is dark gray or gray-brown, which forms a sharp contrast with the light gray and milky white of the clean lotus root hole. If the edge density is less than the fourth severity threshold, it indicates that the boundary of the lotus root hole is blurred, and the interface between the silt and the lotus root hole wall loses its clear boundary due to heavy coverage. The edge detection algorithm can only capture sporadic discontinuous edges, and there is no edge signal at all in large areas of silt.
6. The method for detecting silt in lotus root holes based on machine vision according to claim 1, wherein: Generating feedback information in real time based on the silt distribution inside the lotus root hole and informing the user through a visual interface includes the following steps: Generate standardized detection conclusions based on the interval of comprehensive indicators and the type of single characteristic anomaly: No significant silt: The lotus root holes are generally clean, and all characteristic parameters are within the normal range; Siltation in some areas: Slight siltation exists in the lotus root holes, manifested as irregular outlines, decreased local reflectivity, and blurred edges. Severe siltation or blockage: There is heavy siltation in the lotus root hole, and the cross-sectional area is significantly reduced. It is recommended to perform deep cleaning immediately; A three-color light is set at the top of the interface, corresponding to no siltation / partial siltation / serious siltation, to quickly convey the overall status; The circularity, grayscale mean, and edge density of each segment are listed in a table, and the degree of abnormality is marked with color scale; Automatically match cleaning strategies based on standardized test results; Severe mud conditions are highlighted with a flashing red light and buzzer alarm.
7. The method for detecting silt in lotus root holes based on machine vision according to claim 6, wherein: The specific contents of the cleaning strategy are as follows: No siltation: prompt "No special treatment required, proceed to the next process"; For some siltation, it is recommended to "use medium-pressure water guns to flush, focusing on areas with irregular contours"; Severe congestion: triggers an alarm and displays "Enable high-pressure cleaning mode immediately, manual review of the blocked section is recommended." 8. A lotus root hole silt detection system based on machine vision, based on the lotus root hole silt detection method based on machine vision according to any one of claims 1 to 7, characterized in that: include, Data acquisition module, used to collect lotus root hole image data and perform preprocessing; A model building module is used to build a lotus root hole adaptive feature extraction model and perform feature extraction on lotus root hole image data; The result detection module is used to detect the silt distribution inside the lotus root hole based on the feature extraction results; The situation display module is used to generate real-time feedback information on the silt distribution inside the lotus hole and inform the user through a visual interface.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for detecting silt in lotus root holes based on machine vision according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for detecting silt in lotus root holes based on machine vision according to any one of claims 1 to 7 are implemented.