Loquat maturity detection method and system based on vision and medium

By conducting color image analysis on loquats and combining color and size information, high-precision detection of loquat maturity is achieved, solving the problems of low detection accuracy and large error in the prior art.

CN120147234APending Publication Date: 2025-06-13TAIZHOU VOCATIONAL & TECHN COLLEGE +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510179098.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-18
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The existing loquat maturity detection methods cannot effectively match the color and size of loquats, resulting in low detection accuracy and large errors.

Method used

By obtaining the color image of loquat, performing HSI image mode conversion, analyzing the color value to generate color maturity information, and obtaining area information through grayscale processing, establishing an external rectangular box to calculate the size information, and finally integrating the color and size information to determine the maturity of loquat.

Benefits of technology

It improves the accuracy of loquat maturity analysis, reduces analysis errors, and provides more accurate maturity detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120147234A_ABST
    Figure CN120147234A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a loquat maturity degree detection method and system based on vision and a medium, and the method comprises the steps: obtaining a loquat color image, carrying out the mode conversion of the loquat color image, and generating an HSI image; analyzing the chromatic value of the loquat based on the HSI image to obtain chromatic value distribution information, and generating loquat color maturity information based on the chromatic value distribution information; performing gray processing on the loquat color image to obtain a gray image, and obtaining loquat region information based on the gray image; establishing an external rectangular frame based on the loquat region information, and calculating loquat size information according to the external rectangular frame; generating loquat size maturity information based on the loquat size information, and fusing the loquat size maturity information with the loquat color maturity information to obtain the loquat maturity; the loquat maturity is analyzed at different angles by analyzing the color and size of the loquat, so that the analysis precision is improved, and the loquat maturity analysis error is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of fruit maturity, and specifically, to a method, system, and medium for detecting the maturity of loquats based on vision. Background Art

[0002] As a large agricultural country, China's fruit output accounts for 6% of the global total output. China has broad geographical advantages and rich natural conditions, which have contributed to a rich variety of characteristic fruits, among which loquats are one of the representative fruits. Fruits are indispensable in people's daily lives. The nutritional elements in fruits are rich and can provide various nutrients required for human life activities. Many fresh fruits are good sources of vitamin C. Fruits contain rich substances such as vitamins, dietary fiber, and organic acids. Different fruits contain different substances and have different nutritional values. In the existing methods for detecting the maturity of loquats, it is impossible to perform matching detection on the color and size of loquats, thus affecting the detection accuracy and causing a large detection error. Summary of the Invention

[0003] The purpose of the embodiments of this application is to provide a method, system, and medium for detecting the maturity of loquats based on vision. By analyzing the color and size of loquats, the maturity of loquats is analyzed from different angles, the analysis accuracy is improved, and the error in analyzing the maturity of loquats is reduced.

[0004] The embodiments of this application also provide a method for detecting the maturity of loquats based on vision, including:

[0005] Obtain a color image of a loquat, perform a mode conversion on the color image of the loquat to generate an HSI image;

[0006] Analyze the chromaticity value of the loquat based on the HSI image to obtain the chromaticity value distribution information, and generate the color maturity information of the loquat based on the chromaticity value distribution information;

[0007] Perform gray processing on the color image of the loquat to obtain a gray image, and obtain the loquat region information based on the gray image;

[0008] Establish a circumscribed rectangle based on the loquat region information, and calculate the size information of the loquat according to the circumscribed rectangle;

[0009] Generate the size maturity information of the loquat based on the size information of the loquat, and fuse the size maturity information of the loquat with the color maturity information of the loquat to obtain the maturity of the loquat.

[0010] Optionally, in the method for detecting the maturity of loquats based on vision described in the embodiments of this application, obtaining a color image of a loquat and performing a mode conversion on the color image of the loquat to generate an HSI image specifically includes:

[0011] Obtain a color image of a loquat and analyze the colors of the R, G, and B channels;

[0012] Perform R, G, and B channel mode conversions according to the colors of the R, G, and B channels to obtain the conversion results;

[0013] Analyze the chromaticity, saturation, and brightness of the image according to the conversion results;

[0014] Generate an HSI image based on the chromaticity, saturation, and brightness of the image, where H represents chromaticity, S represents saturation, and I represents brightness.

[0015] Optionally, in the vision-based loquat maturity detection method described in the embodiments of the present application, analyze the chromaticity value of the loquat based on the HSI image to obtain the chromaticity value distribution information, and generate the loquat color maturity information based on the chromaticity value distribution information, specifically including:

[0016] Obtain multiple loquat color images, and use the pixels with a region size of 10*10 mm extracted along the center point in each loquat image as feature points to form 2 groups of feature pixels;

[0017] Statistically analyze the gray-scale distribution of the H components of the 2 groups of feature pixel points respectively to obtain the chromaticity distribution information;

[0018] Analyze the chromaticity values of different regions of the loquat based on the chromaticity distribution information;

[0019] Analyze the chromaticity values of different regions of the loquat with multiple set chromaticity intervals to obtain the loquat chromaticity distribution result;

[0020] Obtain the loquat color information based on the loquat chromaticity distribution result, and analyze the maturity of the loquat based on the loquat color information to obtain the loquat color maturity information.

[0021] Optionally, in the vision-based loquat maturity detection method described in the embodiments of the present application, perform gray-scale processing on the loquat color image to obtain a gray-scale image, and obtain the loquat region information based on the gray-scale image, specifically including:

[0022] Obtain the loquat color image, and perform color removal processing on the loquat color image to obtain a black-and-white image;

[0023] Analyze the pixels of the black-and-white image and calculate the image resolution;

[0024] Compare the image resolution with the set resolution threshold to obtain the resolution deviation information;

[0025] Perform enhancement processing on the pixels of the image based on the resolution deviation information to obtain a gray-scale image;

[0026] Extract the features of the gray-scale image, screen out the loquat features based on the features of the gray-scale image, and generate the loquat region information based on the loquat features.

[0027] Optionally, in the vision-based loquat maturity detection method described in the embodiments of the present application, an external rectangular frame is established based on the loquat region information, and the loquat size information is calculated according to the external rectangular frame, which specifically includes:

[0028] Obtain the loquat region information, and establish multiple loquat edge points according to the loquat region information;

[0029] Calculate the maximum transverse diameter data and the maximum longitudinal diameter data of the loquat based on multiple loquat edge points;

[0030] Construct a minimum external rectangular frame based on the maximum transverse diameter data and the maximum longitudinal diameter data of the loquat;

[0031] Calculate the loquat size information based on the minimum external rectangular frame.

[0032] Optionally, in the vision-based loquat maturity detection method described in the embodiments of the present application, loquat size maturity information is generated based on the loquat size information, and the loquat size maturity information is fused with the loquat color maturity information to obtain the loquat maturity, which specifically includes:

[0033] Obtain the loquat size information, compare the loquat size information with the loquat size standard information matched with different maturities, and obtain the size deviation rate;

[0034] Generate loquat maturity level information based on the size deviation rate, and analyze the loquat size maturity information based on the loquat maturity level information;

[0035] Obtain the maturity information and the loquat color maturity information of the same loquat, and fuse the maturity information and the loquat color maturity information of the same loquat to obtain the loquat maturity.

[0036] In a second aspect, an embodiment of the present application provides a vision-based loquat maturity detection system, which includes: a memory and a processor. The memory includes a program of the vision-based loquat maturity detection method. When the program of the vision-based loquat maturity detection method is executed by the processor, the following steps are implemented:

[0037] Obtain a loquat color image, perform mode conversion on the loquat color image, and generate an HSI image;

[0038] Analyze the chromaticity value of the loquat based on the HSI image to obtain the chromaticity value distribution information, and obtain the loquat color maturity information based on the chromaticity value distribution information;

[0039] Perform grayscale processing on the loquat color image to obtain a grayscale image, and obtain the loquat region information based on the grayscale image;

[0040] Establish an external rectangular frame based on the loquat region information, and calculate the loquat size information according to the external rectangular frame;

[0041] Generate loquat size maturity information based on the loquat size information, and fuse the loquat size maturity information with the loquat color maturity information to obtain the loquat maturity degree.

[0042] Optionally, in the vision-based loquat maturity detection system described in the embodiments of the present application, obtain a loquat color image, perform a mode conversion on the loquat color image to generate an HSI image, specifically including:

[0043] Obtain a loquat color image and analyze the colors of the R, G, and B channels;

[0044] Perform R, G, and B channel mode conversions according to the colors of the R, G, and B channels to obtain a conversion result;

[0045] Analyze the hue, saturation, and brightness of the image according to the conversion result;

[0046] Generate an HSI image according to the hue, saturation, and brightness of the image, where H represents hue, S represents saturation, and I represents brightness.

[0047] Optionally, in the vision-based loquat maturity detection system described in the embodiments of the present application, analyze the loquat hue value based on the HSI image to obtain hue value distribution information, and generate loquat color maturity information based on the hue value distribution information, specifically including:

[0048] Obtain multiple loquat color images, and use the pixels with a region size of 10*10 mm extracted along the center point in each loquat image as feature points to form 2 groups of feature pixels;

[0049] Respectively count the gray-scale distributions of the H components of the 2 groups of feature pixel points to obtain hue distribution information;

[0050] Analyze the hue values of different regions of the loquat based on the hue distribution information;

[0051] Analyze the hue values of different regions of the loquat with multiple set hue intervals to obtain the loquat hue distribution result;

[0052] Obtain the loquat color information based on the loquat hue distribution result, analyze the maturity degree of the loquat based on the loquat color information, and obtain the loquat color maturity information.

[0053] In a third aspect, the embodiments of the present application further provide a computer-readable storage medium, which includes a program for the vision-based loquat maturity detection method. When the program for the vision-based loquat maturity detection method is executed by a processor, the steps of the vision-based loquat maturity detection method described in any one of the above are implemented.

[0054] As can be seen from the above, a vision-based loquat maturity detection method, system and medium provided by the embodiments of the present application obtain a color image of a loquat, perform pattern conversion on the color image of the loquat to generate an HSI image; analyze the chromaticity value of the loquat based on the HSI image to obtain chromaticity value distribution information, and generate loquat color maturity information based on the chromaticity value distribution information; perform grayscale processing on the color image of the loquat to obtain a grayscale image, and obtain loquat region information based on the grayscale image; establish an external rectangular frame based on the loquat region information, and calculate the loquat size information according to the external rectangular frame; generate loquat size maturity information based on the loquat size information, and fuse the loquat size maturity information with the loquat color maturity information to obtain the loquat maturity; analyze the maturity of the loquat from different angles by analyzing the color and size of the loquat, improve the analysis accuracy, and reduce the error of loquat maturity analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] 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.

[0056] Figure 1 It is a flowchart of the vision-based loquat maturity detection method provided by the embodiments of the present application;

[0057] Figure 2 It is a flowchart of the pattern conversion of the color image of the loquat in the vision-based loquat maturity detection method provided by the embodiments of the present application;

[0058] Figure 3 It is a flowchart of the analysis method of the loquat color maturity information in the vision-based loquat maturity detection method provided by the embodiments of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0059] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the 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 shown in the drawings here can be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of the present application provided in the following drawings is not intended to limit the scope of the present application claimed, but only represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0060] 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, terms such as "first" and "second" are only used for distinguishing descriptions and cannot be construed as indicating or implying relative importance.

[0061] Please refer to Figure 1 , Figure 1 which is a flowchart of a vision-based loquat maturity detection method in some embodiments of the present application. The vision-based loquat maturity detection method is used in a terminal device. The vision-based loquat maturity detection method includes the following steps:

[0062] S101, Obtain a loquat color image, perform a mode conversion on the loquat color image to generate an HSI image;

[0063] S102, Analyze the chromaticity value of the loquat based on the HSI image to obtain chromaticity value distribution information, and generate loquat color maturity information based on the chromaticity value distribution information;

[0064] S103, Perform gray processing on the loquat color image to obtain a gray image, and obtain loquat region information based on the gray image;

[0065] S104, Establish a circumscribed rectangle based on the loquat region information, and calculate the loquat size information according to the circumscribed rectangle;

[0066] S105, Generate loquat size maturity information based on the loquat size information, and fuse the loquat size maturity information with the loquat color maturity information to obtain the loquat maturity.

[0067] It should be noted that by analyzing the loquat color image, the maturity of the loquat is analyzed according to the color of the loquat, and the size of the loquat is further analyzed. Thus, the maturity of the loquat is analyzed from two dimensions of the color and size of the loquat, improving the analysis accuracy.

[0068] Please refer to Figure 2 , Figure 2 which is a flowchart of the mode conversion of the loquat color image of a vision-based loquat maturity detection method in some embodiments of the present application. According to the embodiments of the present invention, obtaining a loquat color image and performing a mode conversion on the loquat color image to generate an HSI image specifically includes:

[0069] S201, Obtain a loquat color image and analyze the colors of the R, G, and B channels;

[0070] S202, Perform R, G, and B channel mode conversions according to the colors of the R, G, and B channels to obtain a conversion result;

[0071] S203. Analyze the chromaticity, saturation, and brightness of the image according to the conversion result;

[0072] S204. Generate an HSI image based on the chromaticity, saturation, and brightness of the image, where H represents chromaticity, S represents saturation, and I represents brightness.

[0073] It should be noted that by analyzing the colors of the R, G, and B channels of the loquat color image, the loquat color image is accurately mode-converted to obtain a high-precision HSI image, providing an analysis basis for subsequent analysis of the maturity of loquats.

[0074] Please refer to Figure 3 , Figure 3 is a flowchart of the loquat color maturity information analysis method of a vision-based loquat maturity detection method in some embodiments of the present application. According to the embodiments of the present invention, the chromaticity value of the loquat is analyzed based on the HSI image to obtain the chromaticity value distribution information, and the loquat color maturity information is generated based on the chromaticity value distribution information, specifically including:

[0075] S301. Obtain multiple loquat color images, and take the pixels with a region size of 10*10 mm extracted along the center point in each loquat image as feature points to form two groups of feature pixels;

[0076] S302. Respectively count the gray-scale distribution of the H components of the two groups of feature pixel points to obtain the chromaticity distribution information;

[0077] S303. Analyze the chromaticity values of different regions of the loquat based on the chromaticity distribution information;

[0078] S304. Analyze the chromaticity values of different regions of the loquat with multiple set chromaticity intervals to obtain the loquat chromaticity distribution result;

[0079] S305. Obtain the loquat color information based on the loquat chromaticity distribution result, and analyze the maturity of the loquat based on the loquat color information to obtain the loquat color maturity information.

[0080] It should be noted that by analyzing the chromaticity values of different regions of the loquat and comparing them with the chromaticity intervals, the chromaticity interval in which the chromaticity value of the loquat is located is analyzed, and then the color information of the loquat is accurately analyzed.

[0081] According to the embodiments of the present invention, the loquat color image is grayscale-processed to obtain a grayscale image, and the loquat region information is obtained based on the grayscale image, specifically including:

[0082] Obtain the loquat color image, and perform color removal processing on the loquat color image to obtain a black-and-white image;

[0083] Analyze the pixels of the black-and-white image and calculate the image resolution;

[0084] Compare the image resolution with the set resolution threshold to obtain resolution deviation information;

[0085] Based on the resolution deviation information, enhance the pixels of the image to obtain a grayscale image;

[0086] Extract the features of the grayscale image, screen out the loquat features based on the features of the grayscale image, and generate loquat region information based on the loquat features.

[0087] It should be noted that during the analysis of the loquat size, the color of the loquat color image is removed to improve the analysis efficiency. During the color removal process, the resolution of the analyzed image is analyzed, and the image is enhanced to improve the image resolution and ensure the clarity of the image.

[0088] According to an embodiment of the present invention, an external rectangular frame is established based on the loquat region information, and the loquat size information is calculated according to the external rectangular frame, specifically including:

[0089] Obtain the loquat region information and establish multiple loquat edge points according to the loquat region information;

[0090] Calculate the maximum transverse diameter data and the maximum longitudinal diameter data of the loquat based on multiple loquat edge points;

[0091] Construct a minimum external rectangular frame based on the maximum transverse diameter data and the maximum longitudinal diameter data of the loquat;

[0092] Calculate the loquat size information based on the minimum external rectangular frame.

[0093] It should be noted that by establishing multiple loquat edge points, the transverse diameter size and the longitudinal diameter size of the loquat are calculated, so as to accurately establish the minimum external rectangular frame, and the loquat size is calculated according to the minimum external rectangular frame, thereby improving the calculation accuracy.

[0094] According to an embodiment of the present invention, loquat size maturity information is generated based on the loquat size information, and the loquat size maturity information is fused with the loquat color maturity information to obtain the loquat maturity, specifically including:

[0095] Obtain the loquat size information, compare the loquat size information with the loquat size standard information matched with different maturities to obtain the size deviation rate;

[0096] Generate loquat maturity level information based on the size deviation rate, and analyze the loquat size maturity information based on the loquat maturity level information;

[0097] Obtain the maturity information and the loquat color maturity information of the same loquat, and fuse the maturity information and the loquat color maturity information of the same loquat to obtain the loquat maturity.

[0098] It should be noted that by analyzing the size of the loquat, the ripeness level of the loquat is obtained, and the color and size of the same loquat are fused to improve the analysis accuracy of the loquat ripeness.

[0099] In a second aspect, an embodiment of the present application provides a vision-based loquat ripeness detection system, which includes: a memory and a processor. The memory includes a program for the vision-based loquat ripeness detection method. When the program for the vision-based loquat ripeness detection method is executed by the processor, the following steps are implemented:

[0100] Obtain a color image of the loquat, perform a mode conversion on the color image of the loquat to generate an HSI image;

[0101] Analyze the chromaticity value of the loquat based on the HSI image to obtain chromaticity value distribution information, and obtain loquat color ripeness information based on the chromaticity value distribution information;

[0102] Perform grayscale processing on the color image of the loquat to obtain a grayscale image, and obtain loquat region information based on the grayscale image;

[0103] Establish a circumscribed rectangle based on the loquat region information, and calculate the size information of the loquat according to the circumscribed rectangle;

[0104] Generate loquat size ripeness information based on the loquat size information, and fuse the loquat size ripeness information with the loquat color ripeness information to obtain the loquat ripeness.

[0105] It should be noted that by analyzing the color image of the loquat, the ripeness of the loquat is analyzed according to the color of the loquat, and further the size of the loquat is analyzed. Thus, the ripeness of the loquat is analyzed from two dimensions of the color and size of the loquat, improving the analysis accuracy.

[0106] According to an embodiment of the present invention, obtaining a color image of the loquat and performing a mode conversion on the color image of the loquat to generate an HSI image specifically includes:

[0107] Obtain a color image of the loquat and analyze the colors of the R, G, and B channels;

[0108] Perform R, G, and B channel mode conversions according to the colors of the R, G, and B channels to obtain a conversion result;

[0109] Analyze the chromaticity, saturation, and brightness of the image according to the conversion result;

[0110] Generate an HSI image according to the chromaticity, saturation, and brightness of the image, where H represents chromaticity, S represents saturation, and I represents brightness.

[0111] It should be noted that by analyzing the colors of the R, G, and B channels of the loquat color image, the loquat color image can be accurately mode-converted to obtain an HSI image with high precision, providing an analysis basis for subsequent analysis of the maturity of loquats.

[0112] According to an embodiment of the present invention, the chromaticity value of the loquat is analyzed based on the HSI image to obtain chromaticity value distribution information, and the color and luster maturity information of the loquat is generated based on the chromaticity value distribution information, specifically including:

[0113] Obtain multiple loquat color images, and take the pixels with a region size of 10*10 mm extracted along the center point in each loquat image as feature points to form two groups of feature pixels;

[0114] Statistically analyze the gray-scale distribution of the H components of the two groups of feature pixel points respectively to obtain chromaticity distribution information;

[0115] Analyze the chromaticity values of different regions of the loquat based on the chromaticity distribution information;

[0116] Analyze the chromaticity values of different regions of the loquat with multiple set chromaticity intervals to obtain the chromaticity distribution result of the loquat;

[0117] Obtain the color and luster information of the loquat based on the chromaticity distribution result of the loquat, and analyze the maturity of the loquat based on the color and luster information of the loquat to obtain the color and luster maturity information of the loquat.

[0118] It should be noted that by analyzing the chromaticity values of different regions of the loquat and comparing them with the chromaticity intervals, the chromaticity interval in which the chromaticity value of the loquat is located is analyzed, and then the color and luster information of the loquat is accurately analyzed.

[0119] According to an embodiment of the present invention, the loquat color image is grayscale-processed to obtain a grayscale image, and the loquat region information is obtained based on the grayscale image, specifically including:

[0120] Obtain the loquat color image, and perform color removal processing on the loquat color image to obtain a black-and-white image;

[0121] Analyze the pixels of the black-and-white image and calculate the image resolution;

[0122] Compare the image resolution with a set resolution threshold to obtain resolution deviation information;

[0123] Perform enhancement processing on the pixels of the image based on the resolution deviation information to obtain a grayscale image;

[0124] Extract the features of the grayscale image, screen out the loquat features based on the features of the grayscale image, and generate loquat region information based on the loquat features.

[0125] It should be noted that during the analysis of the loquat size, the color of the loquat color image is removed to improve the analysis efficiency. During the color removal process, the resolution of the analyzed image is analyzed, and the image is enhanced to improve the image resolution and ensure the clarity of the image.

[0126] According to an embodiment of the present invention, an externally circumscribed rectangular frame is established based on the loquat region information, and the loquat size information is calculated according to the externally circumscribed rectangular frame, specifically including:

[0127] Obtain the loquat region information, and establish a plurality of loquat edge points according to the loquat region information;

[0128] Calculate the maximum transverse diameter data and the maximum longitudinal diameter data of the loquat based on a plurality of loquat edge points;

[0129] Construct a minimum externally circumscribed rectangular frame based on the maximum transverse diameter data and the maximum longitudinal diameter data of the loquat;

[0130] Calculate the loquat size information based on the minimum externally circumscribed rectangular frame.

[0131] It should be noted that by establishing a plurality of loquat edge points to calculate the transverse diameter size and the longitudinal diameter size of the loquat, a minimum externally circumscribed rectangular frame is accurately established, and the loquat size is calculated according to the minimum externally circumscribed rectangular frame, thereby improving the calculation accuracy.

[0132] According to an embodiment of the present invention, loquat size maturity information is generated based on the loquat size information, and the loquat size maturity information is fused with the loquat color maturity information to obtain the loquat maturity, specifically including:

[0133] Obtain the loquat size information, compare the loquat size information with the loquat size standard information matched with different maturities, and obtain the size deviation rate;

[0134] Generate loquat maturity level information based on the size deviation rate, and analyze the loquat size maturity information based on the loquat maturity level information;

[0135] Obtain the maturity information and the loquat color maturity information of the same loquat, and fuse the maturity information and the loquat color maturity information of the same loquat to obtain the loquat maturity.

[0136] It should be noted that by analyzing the size of the loquat, the maturity level of the loquat is obtained, and the color and size of the same loquat are fused to improve the analysis accuracy of the loquat maturity.

[0137] The third aspect of the present invention provides a computer-readable storage medium, which includes a program for a method for detecting the maturity of loquats based on vision. When the program for the method for detecting the maturity of loquats based on vision is executed by a processor, the steps of the method for detecting the maturity of loquats based on vision as described in any one of the above are implemented.

[0138] A method, system and medium for detecting the maturity of loquats based on vision. By acquiring the color image of the loquat, converting the color image of the loquat to generate an HSI image; analyzing the chromaticity value of the loquat based on the HSI image to obtain the chromaticity value distribution information, and generating the color maturity information of the loquat based on the chromaticity value distribution information; performing gray processing on the color image of the loquat to obtain a gray image, and acquiring the loquat region information based on the gray image; establishing an external rectangular frame based on the loquat region information, and calculating the size information of the loquat according to the external rectangular frame; generating the size maturity information of the loquat based on the size information of the loquat, and fusing the size maturity information of the loquat with the color maturity information of the loquat to obtain the maturity of the loquat; analyzing the maturity of the loquat from different angles by analyzing the color and size of the loquat, improving the analysis accuracy, and reducing the error of the loquat maturity analysis.

[0139] In several embodiments provided in 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. For example, 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 components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical, or other forms.

[0140] 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 can be located in one place or distributed to 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.

[0141] In addition, each functional unit in the embodiments of the present invention can be all integrated in a processing unit, or each unit can be separately used as a unit, or two or more units can be integrated in a unit; the above integrated units can be implemented in the form of hardware, or in the form of a combination of hardware and software functional units.

[0142] Those of ordinary skill in the art can understand that all or part of the steps to implement the above method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a readable storage medium. When the program is executed, it performs the steps including those of the above method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other various media that can store program codes.

[0143] Alternatively, if the above integrated unit of the present invention is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a readable storage medium. Based on such an 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 can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the various embodiments of the present invention. And the aforementioned storage medium includes: mobile storage devices, ROM, RAM, magnetic disks, optical disks, and other various media that can store program codes.

Claims

1. A method for detecting the maturity of loquat based on vision, characterized in that: include: Acquire a loquat color image, perform mode conversion on the loquat color image, and generate an HSI image; Analyze the chromaticity value of loquat based on HSI image to obtain chromaticity value distribution information, and generate loquat color maturity information based on the chromaticity value distribution information; grayscale processing is performed on the loquat color image to obtain a grayscale image, and loquat region information is obtained based on the grayscale image; Establish an external rectangular frame based on the loquat area information, and calculate the loquat size information according to the external rectangular frame; The loquat size maturity information is generated based on the loquat size information, and the loquat size maturity information is integrated with the loquat color maturity information to obtain the loquat maturity.

2. The method for detecting the maturity of loquat based on vision according to claim 1, characterized in that: Obtain a loquat color image, perform mode conversion on the loquat color image, and generate an HSI image, including: Get the color image of loquat and analyze the colors of R, G and B channels; Perform R, G and B channel mode conversion according to the colors of the R, G and B channels to obtain a conversion result; Analyze the hue, saturation and brightness of the image based on the conversion results; The HSI image is generated according to the hue, saturation and brightness of the image, where H represents hue, S represents saturation, and I represents brightness.

3. The method for detecting the maturity of loquat based on vision according to claim 2, characterized in that: The chromaticity value of loquat is analyzed based on the HSI image to obtain the chromaticity value distribution information, and the color maturity information of loquat is generated based on the chromaticity value distribution information, which specifically includes: Obtain multiple loquat color images, extract pixels with a size of 10*10 mm along the center point of each loquat image as feature points, and form two groups of feature pixels; The grayscale distribution of the H components of the two groups of characteristic pixels is counted respectively to obtain the chromaticity distribution information; Analyze the chromaticity values ​​of different regions of loquat based on chromaticity distribution information; The chromaticity values ​​of different areas of loquat are analyzed with multiple set chromaticity intervals to obtain the chromaticity distribution results of loquat; The color information of loquat is obtained based on the chromaticity distribution result of loquat, and the maturity of loquat is analyzed based on the color information of loquat to obtain the color maturity information of loquat.

4. The method for detecting the maturity of loquat based on vision according to claim 3, characterized in that: The loquat color image is gray-processed to obtain a gray-scale image, and the loquat region information is obtained based on the gray-scale image, specifically including: Acquire a color image of loquat, and decolorize the color image of loquat to obtain a black and white image; Analyze the pixels of black and white images and calculate the image resolution; Compare the image resolution with the set resolution threshold to obtain resolution deviation information; The pixels of the image are enhanced based on the resolution deviation information to obtain a grayscale image; The features of the grayscale image are extracted, loquat features are screened out based on the features of the grayscale image, and loquat region information is generated based on the loquat features.

5. The method for detecting the maturity of loquat based on vision according to claim 4, characterized in that: An external rectangular frame is established based on the loquat area information, and loquat size information is calculated based on the external rectangular frame, including: Obtain loquat area information, and establish multiple loquat edge points according to the loquat area information; Calculating the maximum transverse diameter data and the maximum longitudinal diameter data of the loquat based on multiple loquat edge points; Construct the minimum bounding rectangle based on the maximum horizontal diameter data and the maximum vertical diameter data of the loquat; Calculate loquat size information based on the minimum bounding rectangle.

6. The method for detecting the maturity of loquat based on vision according to claim 5, characterized in that: Generate loquat size maturity information based on loquat size information, merge loquat size maturity information with loquat color maturity information to obtain loquat maturity, specifically including: Obtain loquat size information, compare the loquat size information with loquat size standard information matching different maturity levels, and obtain the size deviation rate; Generate loquat maturity grade information based on size deviation rate, and analyze loquat size maturity information based on loquat maturity grade information; The maturity information and the color maturity information of the same loquat are obtained, and the maturity information and the color maturity information of the same loquat are integrated to obtain the maturity of the loquat.

7. A vision-based loquat maturity detection system, characterized in that: The system includes: a memory and a processor, wherein the memory includes a program of a vision-based loquat maturity detection method, and when the program of the vision-based loquat maturity detection method is executed by the processor, the following steps are implemented: Acquire a loquat color image, perform mode conversion on the loquat color image, and generate an HSI image; Analyze the chromaticity value of loquat based on HSI image to obtain the chromaticity value distribution information, and obtain the color maturity information of loquat based on the chromaticity value distribution information; grayscale processing is performed on the loquat color image to obtain a grayscale image, and loquat region information is obtained based on the grayscale image; Establish an external rectangular frame based on the loquat area information, and calculate the loquat size information according to the external rectangular frame; The loquat size maturity information is generated based on the loquat size information, and the loquat size maturity information is integrated with the loquat color maturity information to obtain the loquat maturity.

8. The vision-based loquat maturity detection system according to claim 7, characterized in that: Obtain a loquat color image, perform mode conversion on the loquat color image, and generate an HSI image, including: Get the color image of loquat and analyze the colors of R, G and B channels; Perform R, G and B channel mode conversion according to the colors of the R, G and B channels to obtain a conversion result; Analyze the hue, saturation and brightness of the image based on the conversion results; The HSI image is generated according to the hue, saturation and brightness of the image, where H represents hue, S represents saturation, and I represents brightness.

9. The vision-based loquat maturity detection system according to claim 8, characterized in that: The chromaticity value of loquat is analyzed based on the HSI image to obtain the chromaticity value distribution information, and the color maturity information of loquat is generated based on the chromaticity value distribution information, which specifically includes: Obtain multiple loquat color images, extract pixels with a size of 10*10 mm along the center point of each loquat image as feature points, and form two groups of feature pixels; The grayscale distribution of the H components of the two groups of characteristic pixels is counted respectively to obtain the chromaticity distribution information; Analyze the chromaticity values ​​of different regions of loquat based on chromaticity distribution information; The chromaticity values ​​of different areas of loquat are analyzed with multiple set chromaticity intervals to obtain the chromaticity distribution results of loquat; The color information of loquat is obtained based on the chromaticity distribution result of loquat, and the maturity of loquat is analyzed based on the color information of loquat to obtain the color maturity information of loquat.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a vision-based loquat maturity detection method program, and when the vision-based loquat maturity detection method program is executed by a processor, the steps of the vision-based loquat maturity detection method as described in any one of claims 1 to 6 are implemented.