Loquat damage detection method and system based on vision and medium
Through vision-based loquat damage detection methods, including image preprocessing, feature extraction and damage detection model analysis, the problem of difficulty in accurately detecting loquat damage types and damage levels in the prior art is solved, and higher detection accuracy and more accurate evaluation are achieved.
Patent Information
- Application Number
- CN202510179097.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-06-24
AI Technical Summary
The existing loquat damage detection methods are difficult to accurately detect the type and degree of damage, which affects the detection accuracy and leads to false detection.
Vision-based detection methods are used to obtain loquat images for pre-processing, extract image features, build damage detection models, analyze loquat sample data, output detection results, and evaluate damage type and damage level through the evaluation system.
It improves the accuracy and effectiveness of loquat damage detection, reduces the false detection rate, and can more accurately evaluate the damage type and degree of loquat.
Smart Images

Figure CN120198360A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of fruit damage detection. Specifically, it relates to a vision-based loquat damage detection method, system, and medium. Background Art
[0002] After fruits go through processes such as harvesting, packaging, storage, and transportation, they are easily affected by mechanical loads such as collision, extrusion, vibration, and friction, resulting in mechanical damage phenomena such as fruit deformation, juice loss, and damage to the peel and pulp. This further leads to hazards such as bacterial infection and pulp rot, and even infects healthy fruits, posing a potential food safety risk and seriously affecting the economic benefits of the fruit industry. Compared with traditional detection technologies such as manual, mechanical, or chemical methods, optical detection technology has advantages such as non-contact, low cost, and high speed, and has gradually become an important means for detecting the quality of fruits and vegetables.
[0003] Existing loquat damage detection methods are difficult to accurately detect the damage types and degrees of loquats, thus affecting the detection accuracy and causing false detections. Summary of the Invention
[0004] The purpose of the embodiments of this application is to provide a vision-based loquat damage detection method, system, and medium. By constructing a damage detection model to analyze loquat samples, the loquat damage results can be accurately obtained, and the damage types and degrees of loquats can be evaluated based on the loquat damage results, improving the detection effect.
[0005] The embodiments of this application also provide a vision-based loquat damage detection method, including:
[0006] Obtain loquat images based on vision technology, preprocess the loquat images to obtain preprocessed images;
[0007] Extract the image features of the preprocessed images, analyze the edge information of the loquats based on the image features to obtain loquat sample data;
[0008] Construct a damage detection model, input the loquat sample data into the damage detection model, and output the detection results;
[0009] Evaluate the detection results based on an evaluation system to obtain evaluation information;
[0010] Analyze the loquat damage types and damage levels based on the evaluation information.
[0011] Optionally, in the vision-based loquat damage detection method described in the embodiments of this application, obtaining loquat images based on vision technology and preprocessing the loquat images to obtain preprocessed images specifically includes:
[0012] Real-time collect images of loquats from different angles based on multiple cameras to obtain multiple loquat images;
[0013] Perform grayscale processing on multiple loquat images to obtain grayscale images;
[0014] Analyze pixel noise based on the grayscale images, eliminate the pixel noise, and analyze the image resolution;
[0015] Judge whether the image resolution meets the set condition information;
[0016] If the set condition information is met, obtain a preprocessed image;
[0017] If the set condition information is not met, perform enhancement processing on the grayscale images to obtain a preprocessed image.
[0018] Optionally, in the vision-based loquat damage detection method described in the embodiments of the present application, extract the image features of the preprocessed image, analyze the loquat edge information based on the image features, and obtain loquat sample data, specifically including:
[0019] Obtain image features, and screen out background features and loquat features based on the image features;
[0020] Screen out edge features based on the loquat features, and connect all the edge features;
[0021] Smooth the connected features to obtain a loquat edge line;
[0022] Analyze the area located inside the loquat edge line based on the loquat edge line to obtain a loquat area;
[0023] Obtain the loquat features within the loquat area, and decode the loquat features within the loquat area to obtain loquat sample data.
[0024] Optionally, in the vision-based loquat damage detection method described in the embodiments of the present application, construct a damage detection model, input the loquat sample data into the damage detection model, and output a detection result, specifically including:
[0025] Obtain a number of sample images of different damage types, where the sample images include scratch sample images, crack sample images, and rot sample images;
[0026] Establish a training set from the scratch sample images, crack sample images, and rot sample images according to a set quantity ratio;
[0027] Select an initial model framework, input the training set into the initial model framework for training to obtain a training result;
[0028] Dynamically adjust the hyperparameters of the model based on the training result until the model converges to obtain a damage detection model;
[0029] Analyze the loquat sample data based on the damage detection model and output the detection results.
[0030] Optionally, in the vision-based loquat damage detection method described in the embodiments of the present application, evaluate the detection results based on an evaluation system to obtain evaluation information, specifically including:
[0031] Analyze the detection results based on the evaluation system to obtain the number of rotten, bruised, normal, and cracked loquats;
[0032] Calculate the rotting rate based on the number of rotten loquats and the total number of detections;
[0033] Calculate the bruising rate based on the number of bruised loquats and the total number of detections;
[0034] Calculate the cracking rate based on the number of cracked loquats and the total number of detections;
[0035] Calculate the normal rate based on the number of normal loquats and the total number of detections;
[0036] Generate evaluation information based on the rotting rate, bruising rate, cracking rate, and normal rate.
[0037] Optionally, in the vision-based loquat damage detection method described in the embodiments of the present application, analyze the loquat damage type and damage level based on the evaluation information, specifically including:
[0038] Analyze the loquat damage status information based on the evaluation information, where the loquat damage status information includes bruising, cracking, and rotting;
[0039] Analyze the loquat damage type based on the loquat damage status information;
[0040] Calculate the bruised area, the number of cracks, the crack depth, the crack width, and the rotting area respectively;
[0041] Compare the bruised area, the number of cracks, the crack depth, the crack width, and the rotting area with the set bruised condition information, crack condition information, and rotting condition information respectively to obtain the bruised level, crack level, and rotting level;
[0042] Generate the damage level based on the bruised level, crack level, and rotting level.
[0043] In a second aspect, the embodiments of the present application provide a vision-based loquat damage detection system, which includes: a memory and a processor. The memory includes a program of the vision-based loquat damage detection method. When the program of the vision-based loquat damage detection method is executed by the processor, the following steps are implemented:
[0044] Obtain a loquat image based on vision technology, preprocess the loquat image to obtain a preprocessed image;
[0045] Extract the image features of the preprocessed image, analyze the edge information of the loquat based on the image features, and obtain the loquat sample data;
[0046] Construct a damage detection model, input the loquat sample data into the damage detection model, and output the detection result;
[0047] Evaluate the detection result based on the evaluation system to obtain the evaluation information;
[0048] Analyze the damage type and damage level of the loquat based on the evaluation information.
[0049] Optionally, in the vision-based loquat damage detection system described in the embodiments of the present application, obtain the loquat image based on vision technology, preprocess the loquat image to obtain the preprocessed image, which specifically includes:
[0050] Collect images of the loquat from different angles in real time based on multiple cameras to obtain multiple loquat images;
[0051] Perform grayscale processing on the multiple loquat images to obtain grayscale images;
[0052] Analyze the pixel noise based on the grayscale image, eliminate the pixel noise, and analyze the image resolution;
[0053] Determine whether the image resolution meets the set condition information;
[0054] If the set condition information is met, obtain the preprocessed image;
[0055] If the set condition information is not met, perform enhancement processing on the grayscale image to obtain the preprocessed image.
[0056] Optionally, in the vision-based loquat damage detection system described in the embodiments of the present application, extract the image features of the preprocessed image, analyze the edge information of the loquat based on the image features, and obtain the loquat sample data, which specifically includes:
[0057] Obtain the image features, and filter out the background features and loquat features based on the image features;
[0058] Filter out the edge features based on the loquat features, and connect all the edge features;
[0059] Perform smoothing processing on the connected features to obtain the loquat edge line;
[0060] Analyze the area located inside the loquat edge line based on the loquat edge line to obtain the loquat area;
[0061] Obtain the loquat features within the loquat area, and decode the loquat features within the loquat area to obtain the loquat sample data.
[0062] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, which includes a program for a vision-based loquat damage detection method. When the program for the vision-based loquat damage detection method is executed by a processor, the steps of the vision-based loquat damage detection method as described in any one of the above are implemented.
[0063] As can be seen from the above, a vision-based loquat damage detection method, system and medium provided by an embodiment of the present application obtain a loquat image through vision technology, preprocess the loquat image to obtain a preprocessed image; extract the image features of the preprocessed image, analyze the edge information of the loquat based on the image features to obtain loquat sample data; construct a damage detection model, input the loquat sample data into the damage detection model, and output a detection result; evaluate the detection result based on an evaluation system to obtain evaluation information; analyze the loquat damage type and damage level based on the evaluation information; analyze the loquat sample through the constructed damage detection model, so as to accurately obtain the loquat damage result, and evaluate the loquat damage type and degree according to the loquat damage result, improving the detection effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required to be used in the embodiments of the present application. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0065] Figure 1 It is a flowchart of the vision-based loquat damage detection method provided by an embodiment of the present application;
[0066] Figure 2 It is a flowchart of the preprocessing of the loquat image in the vision-based loquat damage detection method provided by an embodiment of the present application;
[0067] Figure 3 It is a flowchart of the method for obtaining loquat sample data in the vision-based loquat damage detection method provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0068] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application claimed, but merely represents the selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative efforts belong to the scope of protection of the present application.
[0069] It should be noted that similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of the present application, the terms "first", "second", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.
[0070] Please refer to Figure 1 , Figure 1 is a flowchart of a vision-based loquat damage detection method in some embodiments of the present application. This vision-based loquat damage detection method is used in a terminal device. The vision-based loquat damage detection method includes the following steps:
[0071] S101, acquiring a loquat image based on vision technology, preprocessing the loquat image to obtain a preprocessed image;
[0072] S102, extracting the image features of the preprocessed image, analyzing the edge information of the loquat based on the image features to obtain loquat sample data;
[0073] S103, constructing a damage detection model, inputting the loquat sample data into the damage detection model, and outputting a detection result;
[0074] S104, evaluating the detection result based on an evaluation system to obtain evaluation information;
[0075] S105, analyzing the loquat damage type and damage level based on the evaluation information.
[0076] It should be noted that the loquat image is collected in real time through vision technology to obtain loquat sample data, and the loquat sample data is analyzed by a damage detection model, so as to accurately obtain the loquat damage situation and improve the detection accuracy.
[0077] Please refer to Figure 2 , Figure 2It is a flowchart of loquat image preprocessing for a vision-based loquat damage detection method in some embodiments of the present application. According to the embodiments of the present invention, loquat images are obtained based on vision technology, and the loquat images are preprocessed to obtain preprocessed images, specifically including:
[0078] S201, Real-time collect images of loquats from different angles based on multiple cameras to obtain multiple loquat images;
[0079] S202, Perform gray-scale processing on the multiple loquat images to obtain gray-scale images;
[0080] S203, Analyze pixel noise based on the gray-scale images, eliminate the pixel noise, and analyze the image resolution;
[0081] S204, Determine whether the image resolution meets the set condition information;
[0082] S205, If the set condition information is met, obtain the preprocessed image; if the set condition information is not met, perform enhancement processing on the gray-scale image to obtain the preprocessed image.
[0083] It should be noted that by obtaining images of loquats from multiple angles and performing color removal, noise removal, and resolution enhancement on the loquat images, the loquat features in the images can be accurately displayed, reducing the analysis error.
[0084] Please refer to Figure 3 , Figure 3 It is a flowchart of a method for obtaining loquat sample data for a vision-based loquat damage detection method in some embodiments of the present application. According to the embodiments of the present invention, the image features of the preprocessed images are extracted, and the edge information of the loquats is analyzed based on the image features to obtain loquat sample data, specifically including:
[0085] S301, Obtain image features, and screen out background features and loquat features based on the image features;
[0086] S302, Screen out edge features based on the loquat features and connect all the edge features;
[0087] S303, Smooth the connected features to obtain a loquat edge line;
[0088] S304, Analyze the area located inside the loquat edge line based on the loquat edge line to obtain a loquat area;
[0089] S305, Obtain the loquat features within the loquat area, and decode the loquat features within the loquat area to obtain loquat sample data.
[0090] It should be noted that by analyzing the image features, the background area and the loquat area are accurately segmented. By analyzing the loquat area, the edge information of the loquat is obtained, and thus the sample data within the loquat area is accurately acquired.
[0091] According to an embodiment of the present invention, a damage detection model is constructed. The loquat sample data is input into the damage detection model, and a detection result is output, which specifically includes:
[0092] Obtain a number of sample images of different damage types, where the sample images include scratch sample images, crack sample images, and rot sample images;
[0093] Establish a training set from the scratch sample images, crack sample images, and rot sample images according to a set quantity ratio;
[0094] Select an initial model framework, input the training set into the initial model framework for training, and obtain a training result;
[0095] Dynamically adjust the hyperparameters of the model based on the training result until the model converges, and obtain a damage detection model;
[0096] Analyze the loquat sample data based on the damage detection model and output a detection result.
[0097] It should be noted that by selecting sample images of multiple different damage types as training data and continuously training the model according to the training data, the output accuracy of the model is improved, and then the loquat detection result is accurately output according to the damage detection model.
[0098] According to an embodiment of the present invention, the detection result is evaluated based on an evaluation system to obtain evaluation information, which specifically includes:
[0099] Analyze the detection result based on the evaluation system to obtain the rot quantity, scratch quantity, normal quantity, and crack quantity of the loquats;
[0100] Calculate the rot rate based on the rot quantity and the total detection quantity;
[0101] Calculate the scratch rate based on the scratch quantity and the total detection quantity;
[0102] Calculate the crack rate based on the crack quantity and the total detection quantity;
[0103] Calculate the normal rate based on the normal quantity and the total detection quantity;
[0104] Generate evaluation information based on the rot rate, scratch rate, crack rate, and normal rate.
[0105] It should be noted that according to the evaluation system, the rot condition, scratch condition, and crack condition of the loquats are accurately analyzed to obtain evaluation information, improving the evaluation accuracy.
[0106] According to an embodiment of the present invention, analyzing the loquat damage type and damage level based on the evaluation information specifically includes:
[0107] Analyzing the loquat damage status information based on the evaluation information, where the loquat damage status information includes abrasions, cracks, and rot;
[0108] Analyzing the loquat damage type based on the loquat damage status information;
[0109] Calculating the abrasion area, the number of cracks, the crack depth, the crack width, and the rot area respectively;
[0110] Comparing the abrasion area, the number of cracks, the crack depth, the crack width, and the rot area with the set abrasion condition information, crack condition information, and rot condition information respectively to obtain the abrasion level, crack level, and rot level;
[0111] Generating a damage level based on the abrasion level, crack level, and rot level.
[0112] It should be noted that by analyzing the loquat damage status information, the loquat damage type is obtained, and for loquats of different damage types, the abrasion area, crack depth, and rot area are analyzed to obtain the damage level.
[0113] In a second aspect, an embodiment of the present application provides a vision-based loquat damage detection system, which includes: a memory and a processor. The memory includes a program of a vision-based loquat damage detection method. When the program of the vision-based loquat damage detection method is executed by the processor, the following steps are implemented:
[0114] Obtaining a loquat image based on vision technology, and preprocessing the loquat image to obtain a preprocessed image;
[0115] Extracting the image features of the preprocessed image, and analyzing the loquat edge information based on the image features to obtain loquat sample data;
[0116] Constructing a damage detection model, inputting the loquat sample data into the damage detection model, and outputting a detection result;
[0117] Evaluating the detection result based on an evaluation system to obtain evaluation information;
[0118] Analyzing the loquat damage type and damage level based on the evaluation information.
[0119] It should be noted that by using vision technology to collect loquat images in real time and obtain loquat sample data, and analyzing the loquat sample data through a damage detection model, the loquat damage situation can be accurately obtained, improving the detection accuracy.
[0120] According to an embodiment of the present invention, loquat images are acquired based on vision technology, and the loquat images are preprocessed to obtain preprocessed images, which specifically include:
[0121] Based on multiple cameras, images of loquats from different angles are collected in real time to obtain multiple loquat images;
[0122] The multiple loquat images are grayscale processed to obtain grayscale images;
[0123] Based on the grayscale images, pixel noise is analyzed, the pixel noise is removed, and the image resolution is analyzed;
[0124] It is judged whether the image resolution meets the set condition information;
[0125] If the set condition information is met, a preprocessed image is obtained;
[0126] If the set condition information is not met, the grayscale image is enhanced to obtain a preprocessed image.
[0127] It should be noted that by acquiring images of loquats from multiple angles and performing color removal, noise removal, and resolution enhancement on the loquat images, the loquat features in the images can be accurately displayed, and the analysis error can be reduced.
[0128] According to an embodiment of the present invention, the image features of the preprocessed image are extracted, and the edge information of the loquat is analyzed based on the image features to obtain loquat sample data, which specifically include:
[0129] Image features are obtained, and background features and loquat features are screened out based on the image features;
[0130] Edge features are screened out based on the loquat features, and all the edge features are connected;
[0131] The connected features are smoothed to obtain a loquat edge line;
[0132] Based on the loquat edge line, the area inside the loquat edge line is analyzed to obtain a loquat area;
[0133] The loquat features within the loquat area are obtained, and the loquat features within the loquat area are decoded to obtain loquat sample data.
[0134] It should be noted that by analyzing the image features, the background area and the loquat area are accurately segmented, the loquat area is analyzed to obtain the loquat edge information, and thus the sample data within the loquat area is accurately obtained.
[0135] According to an embodiment of the present invention, a damage detection model is constructed, and the loquat sample data is input into the damage detection model to output a detection result, which specifically includes:
[0136] Obtain sample images of several different damage types, where the sample images include abrasion sample images, crack sample images, and rot sample images;
[0137] Establish a training set from the abrasion sample images, crack sample images, and rot sample images according to a set quantity ratio;
[0138] Select an initial model framework, input the training set into the initial model framework for training, and obtain a training result;
[0139] Dynamically adjust the hyperparameters of the model based on the training result until the model converges to obtain a damage detection model;
[0140] Analyze the loquat sample data based on the damage detection model and output a detection result.
[0141] It should be noted that by selecting sample images of multiple different damage types as training data and continuously training the model according to the training data, the output accuracy of the model is improved, and then the loquat detection result is accurately output according to the damage detection model.
[0142] According to the embodiment of the present invention, evaluate the detection result based on an evaluation system to obtain evaluation information, specifically including:
[0143] Analyze the detection result based on the evaluation system to obtain the rot quantity, abrasion quantity, normal quantity, and crack quantity of the loquats;
[0144] Calculate the rot rate based on the rot quantity and the total detection quantity;
[0145] Calculate the abrasion rate based on the abrasion quantity and the total detection quantity;
[0146] Calculate the crack rate based on the crack quantity and the total detection quantity;
[0147] Calculate the normal rate based on the normal quantity and the total detection quantity;
[0148] Generate evaluation information based on the rot rate, abrasion rate, crack rate, and normal rate.
[0149] It should be noted that accurately analyze the rot condition, abrasion condition, and crack condition of the loquats according to the evaluation system to obtain evaluation information and improve the evaluation accuracy.
[0150] According to the embodiment of the present invention, analyze the damage type and damage level of the loquats based on the evaluation information, specifically including:
[0151] Analyze the damage state information of the loquats based on the evaluation information, where the damage state information of the loquats includes abrasion, crack, and rot;
[0152] Analyze the damage type of the loquats based on the damage state information of the loquats;
[0153] Calculate the abrasion area, the number of cracks, the crack depth, the crack width, and the rotted area respectively;
[0154] Compare the abrasion area, the number of cracks, the crack depth, the crack width, and the rotted area with the set abrasion condition information, crack condition information, and rotted condition information respectively to obtain the abrasion grade, the crack grade, and the rotted grade;
[0155] Generate a damage grade based on the abrasion grade, the crack grade, and the rotted grade.
[0156] It should be noted that by analyzing the damage state information of loquats, the damage types of loquats are obtained, and the abrasion area, the crack depth, and the rotted area are analyzed for loquats of different damage types to obtain the damage grade.
[0157] The third aspect of the present invention provides a computer-readable storage medium. The readable storage medium includes a program for a vision-based loquat damage detection method. When the program for the vision-based loquat damage detection method is executed by a processor, the steps of the vision-based loquat damage detection method as described in any one of the above are implemented.
[0158] A vision-based loquat damage detection method, system, and medium disclosed by the present invention obtain a loquat image through vision technology, preprocess the loquat image to obtain a preprocessed image; extract the image features of the preprocessed image, analyze the loquat edge information based on the image features to obtain loquat sample data; construct a damage detection model, input the loquat sample data into the damage detection model, and output a detection result; evaluate the detection result based on an evaluation system to obtain evaluation information; analyze the loquat damage type and damage grade based on the evaluation information; analyze the loquat sample through constructing a damage detection model, so as to accurately obtain the loquat damage result, and evaluate the loquat damage type and damage degree according to the loquat damage result, thereby improving the detection effect.
[0159] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0160] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0161] In addition, each functional unit in the embodiments of the present invention may be fully integrated in a processing unit, or each unit may be separately used as a unit, or two or more units may be integrated in one unit; the above integrated units may be implemented in the form of hardware or in the form of a combination of hardware and software functional units.
[0162] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a readable storage medium. When the program is executed, it performs the steps including the above method embodiments; and the foregoing storage medium includes: removable storage devices, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other various media that can store program codes.
[0163] Alternatively, if the above integrated units of the present invention are implemented in the form of software functional modules and sold or used as independent products, they can also be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of the present invention, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. The software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the embodiments of the present invention. And the foregoing storage medium includes: removable storage devices, ROM, RAM, magnetic disks or optical disks and other various media that can store program codes.
Claims
1. A vision-based loquat damage detection method, characterized in that: include: Acquire loquat images based on visual technology, preprocess the loquat images to obtain preprocessed images; Extract image features of the preprocessed image, analyze loquat edge information based on the image features, and obtain loquat sample data; Construct a damage detection model, input loquat sample data into the damage detection model, and output the detection results; Evaluate the test results based on the evaluation system to obtain evaluation information; Analyze loquat damage types and damage levels based on assessment information.
2. The method for detecting loquat damage based on vision according to claim 1, characterized in that: The loquat image is obtained based on visual technology, and the loquat image is preprocessed to obtain a preprocessed image, which specifically includes: Based on multiple cameras, images of loquats at different angles are collected in real time to obtain multiple loquat images; grayscale processing is performed on a plurality of loquat images to obtain a grayscale image; Analyze pixel noise based on grayscale image, remove pixel noise, and analyze image resolution; Determine whether the image resolution meets the set condition information; If the set condition information is met, the preprocessed image is obtained; If the set condition information is not met, the grayscale image is enhanced to obtain a preprocessed image.
3. The visual-based loquat damage detection method according to claim 2, characterized in that: Extract the image features of the preprocessed image, analyze the loquat edge information based on the image features, and obtain loquat sample data, including: Obtain image features, and filter out background features and loquat features based on the image features; Filter out edge features based on loquat features and connect all edge features; The connected features are smoothed to obtain the loquat edge line; Based on the loquat edge line, the area inside the loquat edge line is analyzed to obtain the loquat area; The loquat features in the loquat area are obtained, and the loquat features in the loquat area are decoded to obtain loquat sample data.
4. The visual-based loquat damage detection method according to claim 3, characterized in that: Construct a damage detection model, input loquat sample data into the damage detection model, and output the detection results, including: Acquire a number of sample images with different damage types, including a scratch sample image, a crack sample image, and a decay sample image; The scratch sample images, crack sample images and decay sample images are used to establish a training set according to a set quantity ratio; Select an initial model framework, input the training set into the initial model framework for training, and obtain the training results; Dynamically adjust the model's hyperparameters based on the training results until the model converges to obtain a damage detection model; The loquat sample data is analyzed based on the damage detection model and the detection results are output.
5. The vision-based loquat damage detection method according to claim 4, characterized in that: Evaluate the test results based on the evaluation system to obtain evaluation information, including: The test results were analyzed based on the evaluation system to obtain the number of rotten, bruised, normal and cracked loquats; The decay rate was calculated based on the number of decays and the total number of tests; Calculate the scratch rate based on the number of scratches and the total number of inspections; Calculate the crack rate based on the number of cracks and the total number of inspections; The normal rate was calculated based on the normal number and the total number of tests; Generate assessment information based on rot, scratch, crack and normal rates.
6. The vision-based loquat damage detection method according to claim 5, characterized in that: The damage types and damage levels of loquats were analyzed based on the assessment information, including: Analyze the damage status information of loquat based on the evaluation information, and the damage status information of loquat includes abrasion, crack and rot; Analyze loquat damage types based on loquat damage status information; The abrasion area, number of cracks and crack depth, crack width and decay area were calculated respectively; The scratch area, the number of cracks and the crack depth, the crack width and the decay area are compared with the set scratch condition information, the crack condition information and the decay condition information respectively to obtain the scratch grade, the crack grade and the decay grade; Generates damage levels based on scratch levels, crack levels, and decay levels.
7. A vision-based loquat damage detection system, characterized in that: The system includes: a memory and a processor, wherein the memory includes a program of a vision-based loquat damage detection method, and when the program of the vision-based loquat damage detection method is executed by the processor, the following steps are implemented: Acquire loquat images based on visual technology, preprocess the loquat images to obtain preprocessed images; Extract image features of the preprocessed image, analyze loquat edge information based on the image features, and obtain loquat sample data; Construct a damage detection model, input loquat sample data into the damage detection model, and output the detection results; Evaluate the test results based on the evaluation system to obtain evaluation information; Analyze loquat damage types and damage levels based on assessment information.
8. The vision-based loquat damage detection system according to claim 7, characterized in that: The loquat image is obtained based on visual technology, and the loquat image is preprocessed to obtain a preprocessed image, which specifically includes: Based on multiple cameras, images of loquats at different angles are collected in real time to obtain multiple loquat images; grayscale processing is performed on a plurality of loquat images to obtain a grayscale image; Analyze pixel noise based on grayscale image, remove pixel noise, and analyze image resolution; Determine whether the image resolution meets the set condition information; If the set condition information is met, the preprocessed image is obtained; If the set condition information is not met, the grayscale image is enhanced to obtain a preprocessed image.
9. The vision-based loquat damage detection system according to claim 8, characterized in that: Extract the image features of the preprocessed image, analyze the loquat edge information based on the image features, and obtain loquat sample data, including: Obtain image features, and filter out background features and loquat features based on the image features; Filter out edge features based on loquat features and connect all edge features; The connected features are smoothed to obtain the loquat edge line; Based on the loquat edge line, the area inside the loquat edge line is analyzed to obtain the loquat area; The loquat features in the loquat area are obtained, and the loquat features in the loquat area are decoded to obtain loquat sample data.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a vision-based loquat damage detection method program. When the vision-based loquat damage detection method program is executed by a processor, the steps of the vision-based loquat damage detection method as described in any one of claims 1 to 6 are implemented.