A fruit typing method and electronic device based on three-dimensional scanning
Patent Information
- Application Number
- CN202310827643.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-06
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-07-06
AI Technical Summary
人工采集在短时间内无法克服人为误差,存在效率低且准确性较低的问题
[0042] The present invention offers the following advantages: It utilizes 3D scanning technology to acquire first-dimensional data of the fruit, obtains a 3D model based on this data, acquires characteristic data of the fruit based on the 3D model, obtains morphological index data of the fruit based on the characteristic data, determines key fruit shape indicators based on the morphological index data, and classifies the fruit shape using these key indicators. By acquiring sufficient phenotypic information from the 3D data and obtaining 3D information through the constructed 3D model, the fruit shape can be measured, analyzed, and observed from multiple directions and angles, enabling rapid and accurate collection and classification of fruit shape traits, thus improving the efficiency and accuracy of fruit classification.
Smart Images

Figure CN116994036B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of three-dimensional scanning recognition, and more particularly to a fruit classification method and electronic device based on three-dimensional scanning. Background Technology
[0002] Variety resource analysis is the prerequisite and key to realizing the innovation of superior fruit germplasm, variety selection and breeding and efficient production. Among them, fruit shape has become an important agronomic trait in the breeding of new fruit tree varieties. After a long period of breeding and cultivation, fruits belonging to different varieties of the same fruit have unique and stable morphological appearance. Fruit shape indicators can be used for variety identification, germplasm management and genome association analysis to promote precision breeding.
[0003] In traditional research, fruit phenotypic information collection mainly relies on manual measurement of fruit diameter and longitudinal diameter using vernier calipers, estimation of fruit aspect ratio, and determination of fruit shape index. Compared to other fruit shapes, some fruit varieties exhibit more diverse variations in shape. Manual collection cannot overcome human error in a short time, resulting in low efficiency and accuracy. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a fruit typing method and electronic device based on three-dimensional scanning, so as to improve the efficiency and accuracy of fruit typing.
[0005] To address one of the aforementioned problems, the first aspect of this invention provides a fruit typing method based on three-dimensional scanning, comprising the following steps:
[0006] Acquire first three-dimensional data and first image data of the fruit; the first three-dimensional data includes point cloud data, and the first image data includes stereoscopic printing data and intelligent triangular mesh data.
[0007] The first 3D data and the first image data are processed and stitched together to obtain a 3D model;
[0008] The morphological index data of the fruit are obtained based on the three-dimensional model; the morphological index data includes fruit cavity, fruit apex angle, volume, surface area, fruit shape index and fruit abundance;
[0009] The morphological index data are analyzed to determine the key indicators of fruit shape;
[0010] The target classification result is obtained by classifying the fruit shape using the aforementioned key fruit shape indicators.
[0011] Optionally, the step of processing and stitching the first three-dimensional data and the first image data to obtain a three-dimensional model specifically includes:
[0012] The first image data is preprocessed to obtain the second image data;
[0013] The first three-dimensional data is subjected to a second preprocessing step to obtain the second three-dimensional data;
[0014] The second image data and the second three-dimensional data are stitched together and the three-dimensional model is obtained by positioning and scanning.
[0015] Optionally, obtaining the fruit's morphological index data based on the three-dimensional model specifically includes:
[0016] Obtain the projection view of the three-dimensional model; the projection view includes a first view, a second view, a third view, and a fourth view of the three-dimensional model;
[0017] Use the first view as the first slice of the 3D model;
[0018] Obtain a collection of cross-sectional views of the 3D model based on the first slice;
[0019] The morphological index data is obtained from the combination of the three-dimensional model, the first slice, and the cross-sectional image.
[0020] Optionally, obtaining the set of cross-sectional views of the 3D model based on the first slice image specifically includes:
[0021] Obtain the first slice diameter distance of the first slice, and obtain the second slice diameter distance point, the third slice diameter distance point, and the fourth slice diameter distance point on the first slice diameter distance;
[0022] A second cross-sectional view is obtained based on the second tangent diameter distance point, a third cross-sectional view is obtained based on the third tangent diameter distance point, and a fourth cross-sectional view is obtained based on the fourth tangent diameter distance point; the set of cross-sectional views includes the second cross-sectional view, the third cross-sectional view, and the fourth cross-sectional view.
[0023] Optionally, the morphological index data further includes a first slicing diameter distance, a second slicing diameter distance, a set of cross-sectional diameter distances, and a first cross-sectional diameter distance. The step of obtaining the morphological index data based on the 3D model, the first slicing diameter, and the set of cross-sectional diameters specifically includes:
[0024] Obtain the volume and surface area of the three-dimensional model;
[0025] Obtain the first slice diameter distance, the second slice diameter distance, the fruit cavity angle, and the fruit apex angle of the first slice image;
[0026] Obtain the set of cross-sectional diameter distances and the first cross-sectional diameter distance from the set of cross-sectional diagrams; the set of cross-sectional diameter distances includes the second cross-sectional diameter distance, the third cross-sectional diameter distance, and the fourth cross-sectional diameter distance;
[0027] The fruit shape index is calculated based on the first sectional diameter distance and the second sectional diameter distance; the fruit abundance is calculated based on the volume, the first sectional diameter distance, the second sectional diameter distance, and the first sectional diameter distance.
[0028] Optionally, determining the key fruit shape indicators based on the morphological index data specifically includes:
[0029] The fruit cavity and the angle of the fruit apex are used as key quality trait indicators of fruit shape.
[0030] The first sectional diameter distance, the second sectional diameter distance, the set of cross-sectional diameter distances, the first cross-sectional diameter distance, the fruit shape index, and the fruit abundance are used as quantitative trait index data of fruit shape.
[0031] Principal component analysis was performed on the quantitative and shape index data to obtain key quantitative trait index data; the key quantitative trait index data included the fruit shape index, the volume, the surface area, the first sectional diameter distance, the second sectional diameter distance, the first cross-sectional diameter distance, the second cross-sectional diameter distance, and the fourth cross-sectional diameter distance;
[0032] The key indicators are obtained by cluster analysis based on the key quality trait data and the key quantitative trait data; the key indicators include fruit shape index, second cross-sectional diameter distance, fourth cross-sectional diameter distance, fruit cavity and fruit apex angle.
[0033] Optionally, the step of using the key fruit shape indicators to classify the fruit shape to obtain the target classification result includes:
[0034] The fruit shape is classified according to the fruit cavity to obtain the first classification result;
[0035] A second classification result is obtained based on the fruit cavity, the fruit shape index, and the first classification result;
[0036] The third classification result is obtained based on the diameter distance of the second cross section, the diameter distance of the fourth cross section, the fruit apex angle, and the second classification result;
[0037] The target classification result is obtained by combining the first classification result, the second classification result, and the third classification result.
[0038] Optionally, the method further includes:
[0039] A correlation analysis was performed on the key quantitative trait data, and the correctness of the key quantitative trait data was verified based on the results of the correlation analysis.
[0040] To address one of the aforementioned problems, in a second aspect, the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect.
[0041] To address one of the aforementioned problems, in a third aspect, the present invention provides a computer program product storing a processor-executable program that, when executed by a processor, performs the method as described in the first aspect.
[0042] The present invention offers the following advantages: It utilizes 3D scanning technology to acquire first-dimensional data of the fruit, obtains a 3D model based on this data, acquires characteristic data of the fruit based on the 3D model, obtains morphological index data of the fruit based on the characteristic data, determines key fruit shape indicators based on the morphological index data, and classifies the fruit shape using these key indicators. By acquiring sufficient phenotypic information from the 3D data and obtaining 3D information through the constructed 3D model, the fruit shape can be measured, analyzed, and observed from multiple directions and angles, enabling rapid and accurate collection and classification of fruit shape traits, thus improving the efficiency and accuracy of fruit classification. Attached Figure Description
[0043] Figure 1 This is a flowchart illustrating the steps of a fruit typing method based on three-dimensional scanning provided by the present invention;
[0044] Figure 2 This is a flowchart of the fruit typing data acquisition process proposed in this invention;
[0045] Figure 3 This is a schematic diagram illustrating the positional relationship and triangulation principle of the three-dimensional scanning device provided by the present invention;
[0046] Figure 4 These are the mango 3D image and corresponding projection image provided by this invention;
[0047] Figure 5 This is a schematic diagram of the first set of cut views and cross-sectional views provided by the present invention;
[0048] Figure 6 This is a schematic diagram of the principal component analysis results provided by the present invention;
[0049] Figure 7 This invention provides a clustering diagram of key indicators obtained through cluster analysis.
[0050] Figure 8 This invention provides a flowchart for classifying mango shapes based on key indicators of mango shape.
[0051] Figure 9This is a schematic diagram of the structure of an electronic device provided by the present invention. Detailed Implementation
[0052] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. The step numbers in the following embodiments are only for ease of explanation and do not limit the order of the steps. The execution order of each step in the embodiments can be adapted according to the understanding of those skilled in the art.
[0053] To better understand the present invention, the embodiments are explained based on the fruit classification of mangoes. It should be noted that in the embodiments, the length and width of each graphic are explained with reference to the interpretation of measuring the length in the horizontal direction and measuring the width in the vertical direction.
[0054] To address one of the aforementioned problems, some embodiments of the present invention propose a fruit typing method based on three-dimensional scanning, such as... Figure 1 As shown, Figure 1 This invention provides a step-by-step diagram of a fruit typing method based on three-dimensional scanning, including the following steps:
[0055] S100, Obtain the first three-dimensional data and first image data of the fruit;
[0056] The first three-dimensional data includes point cloud data, and the first image data includes stereoscopic printing data and intelligent triangular mesh data.
[0057] The first image data also includes the color data of the fruit and the geometric shape data of the mango.
[0058] Specifically, such as Figure 2 As shown, Figure 2 This is a flowchart of the fruit typing data acquisition process proposed in this invention. First, a scanning system is built according to the needs of the acquisition scenario. A three-dimensional scanning detection and measurement system is built in the plantation, laboratory, processing workshop or other environment. The three-dimensional scanning detection and measurement system includes a three-dimensional scanning device and a display terminal.
[0059] In this embodiment, the preferred 3D scanning device is a full-color handheld precision measuring instrument. This 3D scanner has a scanning accuracy of 0.05 mm, a scanning speed of 1,500,000 measurements per second, and a scanning range of 0.1-4 meters. The display terminal is preferably connected to a mobile workstation equipped with matching scanning and mesh data generation software, as well as measurement software.
[0060] Before scanning begins, select several mango fruits that match the characteristics of this variety and are free from obvious pests and diseases. Wipe their surfaces with wiping paper to remove foreign objects. Based on the shape of the mangoes, place the wiped mangoes on the collection table of the fixed turntable. Figure 3The positioning and marking process involves placing the fruit at its designated target point. After the fruit is placed, data scanning begins. A full-color handheld precision measuring instrument is moved to illuminate all sides of the mango from all angles, collecting point cloud data, stereolithography (STL) surface data, and intelligent triangular mesh data.
[0061] During the scanning process, the point cloud data, 3D printed surface, and intelligent triangular mesh data of the mango are output to the display terminal for display. The display terminal has a scanning status reminder function to check whether the fruit has been scanned completely. The data that has been scanned, collected, and saved is displayed in blue, while the missing data that has not been scanned, collected, or saved is displayed in yellow. The missing data that has not been collected and scanned can be observed and the details that have not been scanned can be scanned again.
[0062] Once data collection for one target fruit is completed, the data is saved and a 3D scan is performed on the next target fruit, until data collection for all target fruits is completed.
[0063] In this embodiment, the three-dimensional scanning detection and measurement system mainly relies on the principle of triangulation for scanning, such as... Figure 3 As shown, Figure 3 This is a schematic diagram illustrating the positional relationships of a 3D scanning device and the principle of triangulation. In the diagram, CCD is the image sensor, A is the laser diode, B is the object being measured, and C is a focusing lens. The principle of triangulation is as follows: The laser diode focuses a beam of light onto the surface of the object at a certain angle, and then images the laser spot on the object's surface from another angle. The angle of the scattered or reflected light received varies depending on the height of the laser beam at the object's surface. A CCD photodetector measures the position of the imaged spot by receiving the reflected light from the object's surface, which is then corrected by the focusing lens. First, the angle θ between the incident and reflected light is calculated, combined with the known baseline length d between the laser source and the CCD. Figure 3 The baseline length d between the laser diode and the CCD is given in the figure. The distance L ≈ dtanθ between the scanner and the object being measured is derived from the geometric relationship of triangles, thereby obtaining three-dimensional data and displaying the three-dimensional data and image data in real time at a 1:1 scale on the terminal.
[0064] S200: Process and stitch the first three-dimensional data and the first image data to obtain a three-dimensional model.
[0065] The first 3D data refers to the 3D data collected by the aforementioned 3D scanning and measurement system, and the first image data refers to the image data collected by the aforementioned 3D scanning and measurement system. Point cloud noise processing, island removal, and cropping are performed on the first 3D data and the first image data. The data from each image is then stitched together with the global data, and a 3D model is obtained through geometric shape, color, or target point positioning scanning and automatic stitching.
[0066] In an embodiment of the present invention, step S200 specifically includes the following steps:
[0067] S201. Perform a first preprocessing on the first image data to obtain the second image data;
[0068] S202, Perform a second preprocessing on the first three-dimensional data to obtain the second three-dimensional data;
[0069] S203. The second image data and the second three-dimensional data are stitched together and positioned and scanned to obtain the three-dimensional model.
[0070] The first image data also includes the color data and geometric shape data of the mango.
[0071] The first preprocessing includes noise reduction, island removal, and trimming of the 3D printing data and intelligent triangular mesh data, as well as deformation and flipping of the mango's geometric shape data.
[0072] The second preprocessing includes noise reduction, island removal, and pruning of the point cloud data to eliminate interfering data and make the point cloud data more complete.
[0073] The first 3D data and the first image data are stitched together, including a first stitch and a second stitch. The first stitch includes stitching the stereo printing data and the intelligent triangular mesh data with the point cloud data to obtain the STL surface, which can improve the overall data stitching accuracy.
[0074] The second stitching process involves combining the mango's geometric shape and color data with STL surfaces through texture stitching, feature stitching, and hybrid stitching. Global stitching is performed based on the overall shape and color of the fruit to make the resulting 3D mango model more three-dimensional and closer to the actual mango fruit. The positioning scan includes target point positioning scan.
[0075] S300. Obtain the morphological index data of the fruit based on the three-dimensional model; the morphological index data includes the fruit cavity, fruit apex angle, volume, surface area, fruit shape index and fruit abundance.
[0076] First, obtain the projection, vertical section, and cross section of the 3D model, label the geometric data of each projection, vertical section, and cross section, and measure the volume and surface area of the 3D model. Use the aforementioned geometric data, volume, and surface area as morphological index data, which describes the fruit shape characteristics of the mango.
[0077] In some embodiments of the present invention, step S300 specifically includes:
[0078] S301. Obtain the projection image of the three-dimensional model;
[0079] S302. Use the first view as the first slice of the three-dimensional model;
[0080] S303. Obtain a collection of cross-sectional views of the three-dimensional model based on the first cut image;
[0081] S304. Obtain the morphological index data based on the three-dimensional model, the first slice, and the set of cross-sectional images.
[0082] The projection view includes the first view, second view, third view and fourth view of the three-dimensional model.
[0083] The morphological index data includes the first cross-sectional diameter distance, the second cross-sectional diameter distance, the fruit cavity, the fruit apex angle, the set of cross-sectional diameter distances, the first cross-sectional diameter distance, the fruit shape index, and the fruit abundance.
[0084] The 3D model is aligned and positioned on the display terminal. The coordinates and angles of the 3D model are submitted. The projection image of the 3D model is obtained based on the aligned 3D model. One of the views in the projection image is used. In this embodiment, the left view is used as the first cut image. The first cut image is aligned as needed. The 3D model is cut at different positions of the first cut image to obtain multiple cross-sectional images of the mango, i.e., a set of cross-sectional images. The geometric data of each cross-sectional image in the set of cross-sectional images, the first cut image, and the 3D model are used as morphological index data to describe the shape of the mango.
[0085] Specifically, such as Figure 4 As shown, Figure 4 These are a 3D mango image and its corresponding projection. Taking the kidney shape as an example, number 1 is the 3D model, 2 is the first view, 3 is the second view, 4 is the third view, and 5 is the fourth view. The views of the corresponding positions of the other mango shapes can be understood by referring to the views of the kidney shape.
[0086] In this embodiment, the mango is placed with the stem facing down and the top facing up. The software is used to obtain the projection image of the three-dimensional model, where the first view is the left view, the second view is the bottom view, the third view is the right view, and the fourth view is the top view. While obtaining the projection image, the length and width of each projection image are labeled. In this embodiment, the length is measured horizontally and the width is measured vertically.
[0087] Step S303 includes the following steps:
[0088] S3031. Obtain the first slice diameter distance of the first slice, and obtain the second slice diameter distance point, the third slice diameter distance point and the fourth slice diameter distance point on the first slice diameter distance;
[0089] S3032. A second cross-sectional view is obtained based on the second tangent diameter distance point, a third cross-sectional view is obtained based on the third tangent diameter distance point, and a fourth cross-sectional view is obtained based on the fourth tangent diameter distance point; the set of cross-sectional views includes the second cross-sectional view, the third cross-sectional view, and the fourth cross-sectional view;
[0090] Specifically, such as Figure 5 As shown, Figure 5 This is a schematic diagram of the first cut view and cross-sectional view. In the diagram, LD represents the diameter distance of the first cut view, GW represents the fruit cavity, GD represents the fruit apex angle, CD represents the diameter distance of the first cut view, SD represents the diameter distance of the first cross-sectional view, 0.1CD represents the diameter distance of the second cross-sectional view, 0.5CD represents the diameter distance of the third cross-sectional view, 0.9CD represents the diameter distance of the fourth cross-sectional view, 10%LD represents the diameter distance point of the second cut view, 50%LD represents the diameter distance point of the third cut view, and 90%LD represents the diameter distance point of the fourth cut view. Furthermore, in this embodiment... Figure 5 In the first sectional view, the length is measured horizontally and the width is measured vertically.
[0091] In this embodiment, the first view is rotated 90° counterclockwise to obtain the first slice, which is then arranged in... Figure 5 The three mango images in the first row are all first cut images. The length of the first cut image is taken as the first cut image diameter. It should be noted that in this embodiment, the length of the first cut image is measured horizontally. The point at 10% of the first cut image diameter is taken as the second cut image diameter point, the point at 50% of the first cut image diameter is taken as the third cut image diameter point, and the point at 90% of the first cut image diameter is taken as the fourth cut image diameter point.
[0092] Based on the distance points of each of the above-mentioned tangent diameters, the cross-sectional view of the mango at the corresponding position is obtained, as follows: Figure 5As shown in the figure, the vertical dashed line between the top of the fruit and the stem indicates the position of the corresponding cross-sectional view obtained by cutting the three-dimensional model. The cross-sectional view of the mango three-dimensional model at 10% of the distance of the first cut diameter is used as the second cross-sectional view, the cross-sectional view at 50% of the distance of the first cut diameter is used as the third cross-sectional view, and the cross-sectional view at 90% of the distance of the first cut diameter is used as the fourth cross-sectional view.
[0093] Step S304 includes the following steps:
[0094] S3041. Obtain the volume and surface area of the three-dimensional model;
[0095] S3042, Obtain the first slice diameter distance, the second slice diameter distance, the fruit cavity and the fruit top angle of the first slice;
[0096] S3043. Obtain the set of cross-sectional diameter distances and the first cross-sectional diameter distance from the cross-sectional diagram set;
[0097] S3044. Calculate the fruit shape index based on the first sectional diameter distance and the second sectional diameter distance; calculate the fruit abundance based on the volume, the first sectional diameter distance, the second sectional diameter distance, and the first sectional diameter distance.
[0098] The set of cross-sectional diameter distances includes the second cross-sectional diameter distance, the third cross-sectional diameter distance, and the fourth cross-sectional diameter distance.
[0099] Specifically, the distance between the length and width of each cross-section in the set of the first slice and cross-sectional images is obtained, the fruit apex angle and the number of fruit pits in the first slice are obtained, the volume and surface area of the three-dimensional model are obtained, the fruit shape index is calculated by the length (distance between the first slice diameter) and width (distance between the second slice diameter) of the first slice, and the width (distance between the first cross-sectional image diameter) of one of the cross-sectional images is obtained by the length and width of the first slice, the volume of the three-dimensional model and the width (distance between the first cross-sectional image diameter).
[0100] Specifically, the volume and surface area of a 3D model are measured using surfaces.
[0101] like Figure 5 As shown in the figure, the double-headed arrows indicate the length and width of the measured figure. The length, width and fruit top angle of the first cut are measured using a straight line. The length of the first cut is taken as the first cut diameter, and the width of the first cut is taken as the second cut diameter.
[0102] The length of each cross-section is measured using a straight line, and the length of the third cross-section is taken as the diameter of the first cross-section.
[0103] The width of the second cross-section is measured using a straight line as the diameter distance of the second cross-section; the width of the third cross-section is measured as the diameter distance of the third cross-section; and the width of the fourth cross-section is measured as the diameter distance of the fourth cross-section.
[0104] The fruit shape index and fruit abundance are calculated using the formulas SI = LD / CD and F = V / (LD*CD*SD), where SI is the fruit shape index, F is the fruit abundance, LD is the distance to the first tangent diameter, CD is the distance to the first tangent diameter, and SD is the distance to the first cross-section diameter.
[0105] S400. Analyze the morphological index data to determine the key indicators of fruit shape.
[0106] The mango fruit morphology data collected in step S300 are preliminarily statistically analyzed. The minimum, maximum, average, standard deviation and coefficient of variation of these morphology data are calculated respectively. Principal component analysis and cluster analysis are performed on the data after the preliminary statistics and a cluster diagram is drawn. The key indicators of fruit shape are determined based on the results of principal component analysis and cluster analysis.
[0107] In some embodiments of the present invention, step S400 specifically includes the following steps:
[0108] S401. The fruit cavity and the angle of the fruit apex are used as key quality trait indicators of fruit shape.
[0109] S402, take the first sectional diameter distance, the second sectional diameter distance, the set of cross-sectional diameter distances, the first cross-sectional diameter distance, the fruit shape index, and the fruit abundance as quantitative trait index data of fruit shape;
[0110] S403. Perform principal component analysis on the quantitative shape index data to obtain key quantitative trait index data;
[0111] S404. The key indicators are obtained by performing cluster analysis based on the key quality trait data and the key quantitative trait data.
[0112] The key quantitative trait data include the fruit shape index, the volume, the surface area, the first section diameter distance, the second section diameter distance, the first cross-sectional diameter distance, the second cross-sectional diameter distance, and the fourth cross-sectional diameter distance;
[0113] The key indicators include fruit shape index, distance between the second and fourth cross-sections, fruit cavity, and fruit apex angle.
[0114] Key quality indicators for measuring fruit shape include the number of fruit pits and the size of the apex angle.
[0115] Specifically, the results of the principal component analysis are shown in Table 1 and... Figure 6 As shown in Table 1, this table displays the eigenvalues and percentage differences retained by principal component analysis. Figure 6 This is a schematic diagram of the principal component analysis results. Figure 6 The meanings of the letters and symbols in the above are the same as those in the above. Figure 5 The meanings are the same, Table 1 and Figure 6 The results of the principal component analysis performed in step S403 are shown, where Dim.1 represents the first principal component, Dim.2 represents the second principal component, and Dim.3-Dim.9 and so on.
[0116] In this invention, during principal component analysis, the first principal component Dim.1 and the second principal component Dim.2 are extracted based on the principle that the eigenvalue is greater than 1. The cumulative contribution rate of the two principal components, calculated by summing their percentage differences, reaches 80.709%, indicating that the extracted Dim.1 and Dim.2 can reflect most of the information represented by the original factors. Specifically, Dim.1 has a contribution rate (percentage difference) of 58.57%, and based on the absolute values of the eigenvectors, indicators such as the distance to the first tangent axis, the distance to the first cross-section axis, the distance to the second cross-section axis, the distance to the fourth cross-section axis, volume, and surface area play a decisive role in its contribution rate. Dim.2 has a contribution rate (percentage difference) of 22.138%, and indicators such as the fruit shape index and the distance to the first tangent axis play a decisive role in its contribution rate.
[0117] Therefore, the key quantitative shape index data that determine the fruit shape index include the distance of the first tangent diameter, the distance of the first cross section diameter, the distance of the second cross section diameter, the distance of the fourth cross section diameter, volume, surface area, fruit shape index, and the distance of the first tangent diameter.
[0118] Table 2. Eigenvalues and percentages of difference retained by principal component analysis.
[0119]
[0120] Analysis of cluster analysis results, such as Figure 7 As shown, Figure 7 The cluster analysis provided by this invention yields cluster diagrams of key indicators, where Clade represents a cluster group. In some embodiments, this scheme selects 75 mango varieties and divides the fruit germplasm resources of these 75 mango varieties into 5 major groups based on fruit volume, fruit area, fruit abundance, fruit longitudinal diameter, fruit transverse diameter, fruit lateral diameter, and fruit shape index. Clade 1 is based on fruit volume of 400-1000 dm³. 3 Fruits with a longitudinal diameter of 150-250cm, a transverse diameter of 75-125cm, and a lateral diameter of 70-120cm, and a fruit shape index of 1-2.5, are clustered into the same group; Clade 2 is based on fruit volume of 300-400dm. 3 Fruits with a longitudinal diameter of 100-150cm, a transverse diameter of 70-75cm, and a lateral diameter of 65-70cm, and a fruit shape index of 1.5-2, are clustered into the same group; Clade 3 is based on fruit volume of 300-400dm.3 Fruits with a longitudinal diameter of 90-120cm, a transverse diameter of 75-90cm, and a lateral diameter of 70-80cm, and a fruit shape index of 1-1.5, are clustered into the same group; Clade 4 is based on fruit volume of 200-350dm. 3 Fruits with a longitudinal diameter of 100-150cm, a transverse diameter of 60-75cm, and a lateral diameter of 50-70cm, and a fruit shape index of 1-2.0, are clustered into the same group; Clade5 is based on fruit volume greater than 1300dm². 3 Fruits with a longitudinal diameter greater than 250cm, a transverse diameter greater than 110cm, a lateral diameter greater than 90cm, and a fruit shape index greater than 2.0 are clustered into the same group.
[0121] Based on the results of the above cluster analysis, the fruit shape index, the distance between the second and fourth cross-sections, the fruit cavity, and the angle of the fruit apex were selected as key indicators.
[0122] To confirm the accuracy of the selected key quantitative shape index data, in some embodiments, the method includes:
[0123] A correlation analysis is performed on the key quantitative shape index data, and the correctness of the key quantitative shape index data is verified based on the analysis results.
[0124] The correlation analysis of the key quantitative and shape index data yielded the results shown in Table 2, which illustrates the correlation between the key quantitative and shape index data.
[0125] Table 2 shows the correlations among key quantitative and shape indicators.
[0126]
[0127] S500. The fruit shape is classified using the aforementioned key fruit shape indicators to obtain the target classification result.
[0128] The classification results include, but are not limited to, the first classification result, the second classification result, and the third classification result. Instructions for steps.
[0129] In some embodiments of the present invention, step S500 includes:
[0130] S501. Based on the fruit cavity, the fruit shape is classified to obtain the first classification result;
[0131] S502. A second classification result is obtained based on the fruit cavity, the fruit shape index, and the first classification result;
[0132] S503. Obtain a third classification result based on the diameter distance of the second cross section, the diameter distance of the fourth cross section, the fruit apex angle, and the second classification result;
[0133] S504. Combine the first classification result, the second classification result, and the third classification result to obtain the target classification result.
[0134] Please see details. Figure 8 , Figure 8 This is a flowchart for classifying mango shapes based on key indicators of mango shape; the letters in the diagram represent the same meanings as described above. Figure 5 The explanation is the same. In this embodiment, the mango fruit shape is divided into spherical, oval, egg-shaped, S-shaped, kidney-shaped, and eagle-beak-shaped. The fruit shape can be increased according to actual needs.
[0135] Mangoes are classified according to whether they have a fruit pit. Mangoes without a fruit pit are grouped into spherical, oval, and egg-shaped groups, while those with a fruit pit are grouped into S-shaped, kidney-shaped, and eagle-beak-shaped groups, resulting in the first classification result.
[0136] Based on the first classification result, when the first classification result classifies mangoes into the spherical, oval, and ovate sets, the mangoes are classified according to the fruit shape index. Mangoes with a fruit shape index greater than 1 are classified into the oval and ovate sets, and mangoes with a fruit shape index less than or equal to 1 are classified as spherical. When the first classification result classifies mangoes into S-shaped, kidney-shaped, and eagle-beak-shaped, the mangoes are classified according to the number of fruit pits. Mangoes with a fruit pit number equal to 1 are classified into the kidney-shaped and eagle-beak-shaped sets, and mangoes with a fruit pit number greater than 1 are classified as S-shaped, thus obtaining the second classification result.
[0137] Based on the second classification result, when the second classification result classifies mangoes into the elliptical and oval groups, the mangoes are classified according to the distance of the first tangent diameter and the distance of the fourth cross-section diameter. Mangoes with a distance of 1 equal to the distance of the first tangent diameter or the distance of the fourth cross-section diameter are classified as elliptical, and mangoes with a distance of neither equal to the distance of the first tangent diameter nor the distance of the fourth cross-section diameter are classified as oval. When the second classification result classifies mangoes into kidney-shaped and beak-shaped, the mangoes are classified according to the angle of the fruit apex. Mangoes with a fruit apex angle greater than 90° are classified as kidney-shaped, and mangoes with a fruit apex angle less than 90° are classified as beak-shaped, thus obtaining the third classification result.
[0138] The final classification result is obtained by combining the first classification result, the second classification result, and the third classification result.
[0139] To address one of the aforementioned problems, the present invention also provides an electronic device, such as... Figure 9 As shown, Figure 9 This is a schematic diagram of the structure of an electronic device provided by the present invention. The electronic device includes a processor 1000 and a memory 2000. The memory 2000 stores a computer program. When the processor 1000 executes the computer program, it implements any of the methods described in the above method embodiments.
[0140] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. The memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include remote memory located remotely relative to the processor, which can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0141] It is evident that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented in this device embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0142] Furthermore, this application also discloses a computer program product or computer program stored in a computer-readable storage medium. A processor of a computer device can read the computer program from the computer-readable storage medium, and the processor executes the computer program, causing the computer device to perform the described method. Similarly, the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0143] The present invention also provides a computer-readable storage medium storing a processor-executable program, which, when executed by a processor, is used to perform any of the methods described in the above method embodiments.
[0144] It is understood that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0145] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.
Claims
1. A fruit classification method based on three-dimensional scanning, characterized in that, Includes the following steps: Acquire the first three-dimensional data and the first image data of the fruit; the first three-dimensional data includes point cloud data, and the first image data includes color data, geometric shape data, stereoscopic printing data, and intelligent triangular mesh data; The first three-dimensional data and the first image data are processed and stitched together to obtain a three-dimensional model; wherein, stitching the first three-dimensional data and the first image data includes a first stitching and a second stitching. The first stitching includes stitching the stereoscopic printing data and intelligent triangular mesh data with point cloud data to obtain a stereoscopic printing surface; the second stitching includes texture stitching, feature stitching, and hybrid stitching with geometric shape data and color data and stereoscopic printing surface, and global stitching based on the shape and color of the entire fruit. The morphological index data of the fruit are obtained based on the three-dimensional model; the morphological index data includes fruit cavity, fruit apex angle, volume, surface area, fruit shape index and fruit abundance; The morphological index data are analyzed to determine the key indicators of fruit shape; The target classification result is obtained by classifying the fruit shape using the aforementioned key fruit shape indicators; The process of obtaining the fruit's morphological index data based on the three-dimensional model specifically includes: The 3D model is aligned and positioned on the display terminal. The coordinates and angles of the 3D model are submitted. The projection image of the 3D model is obtained based on the aligned 3D model. One of the views in the projection image is used as the first cut image. The first cut image is aligned and the 3D model is cut at different positions of the first cut image to obtain multiple cross-sectional images of the mango. The geometric data of each cross-sectional image, the first cut image, and the 3D model are used as morphological index data to describe the shape of the mango.
2. The method according to claim 1, characterized in that, The process of processing and stitching the first three-dimensional data and the first image data to obtain a three-dimensional model specifically includes: The first image data is preprocessed to obtain the second image data; The first three-dimensional data is subjected to a second preprocessing step to obtain the second three-dimensional data; The second image data and the second three-dimensional data are stitched together and the three-dimensional model is obtained by positioning and scanning.
3. The method according to claim 1, characterized in that, The step of obtaining the set of cross-sectional views of the 3D model based on the first slice specifically includes: Obtain the first slice diameter distance of the first slice, and obtain the second slice diameter distance point, the third slice diameter distance point, and the fourth slice diameter distance point on the first slice diameter distance; A second cross-sectional view is obtained based on the second tangent diameter distance point, a third cross-sectional view is obtained based on the third tangent diameter distance point, and a fourth cross-sectional view is obtained based on the fourth tangent diameter distance point; the set of cross-sectional views includes the second cross-sectional view, the third cross-sectional view, and the fourth cross-sectional view.
4. The method according to claim 3, characterized in that, The morphological index data also includes the first tangent diameter distance, the second tangent diameter distance, the set of cross-sectional diameter distances, and the first cross-sectional diameter distance. The process of obtaining the morphological index data based on the 3D model, the first tangent, and the set of cross-sectional diameters specifically includes: Obtain the volume and surface area of the three-dimensional model; Obtain the first slice diameter distance, the second slice diameter distance, the fruit cavity angle, and the fruit apex angle of the first slice image; Obtain the set of cross-sectional diameter distances and the first cross-sectional diameter distance from the set of cross-sectional diagrams; the set of cross-sectional diameter distances includes the second cross-sectional diameter distance, the third cross-sectional diameter distance, and the fourth cross-sectional diameter distance; The fruit shape index is calculated based on the first sectional diameter distance and the second sectional diameter distance; the fruit abundance is calculated based on the volume, the first sectional diameter distance, the second sectional diameter distance, and the first sectional diameter distance.
5. The method according to claim 4, characterized in that, The determination of key fruit shape indicators based on the morphological index data specifically includes: The fruit cavity and the angle of the fruit apex are used as key quality trait indicators of fruit shape. The first sectional diameter distance, the second sectional diameter distance, the set of cross-sectional diameter distances, the first cross-sectional diameter distance, the fruit shape index, and the fruit abundance are used as quantitative trait index data of fruit shape. Principal component analysis was performed on the quantitative trait data to obtain key quantitative trait data; the key quantitative trait data included the fruit shape index, the volume, the surface area, the first sectional diameter distance, the second sectional diameter distance, the first cross-sectional diameter distance, the second cross-sectional diameter distance, and the fourth cross-sectional diameter distance. The key indicators are obtained by cluster analysis based on the key quality trait data and the key quantitative trait data; the key indicators include fruit shape index, second cross-sectional diameter distance, fourth cross-sectional diameter distance, fruit cavity and fruit apex angle.
6. The method according to claim 5, characterized in that, The process of using the key fruit shape indicators to classify fruit shape and obtain the target classification result includes: The fruit shape is classified according to the fruit cavity to obtain the first classification result; A second classification result is obtained based on the fruit cavity, the fruit shape index, and the first classification result; The third classification result is obtained based on the diameter distance of the second cross section, the diameter distance of the fourth cross section, the fruit apex angle, and the second classification result; The target classification result is obtained by combining the first classification result, the second classification result, and the third classification result.
7. The method according to claim 5, characterized in that, The method further includes: Correlation analysis was performed on the key quantitative trait data, and the correctness of the key quantitative trait data was verified based on the results of the correlation analysis.
8. An electronic device, characterized in that, The system includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method of any one of claims 1-7, wherein at least one memory is used to store at least one program.
9. A computer program product containing a processor-executable program, characterized in that, The processor-executable program, when executed by the processor, is used to perform the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Retrieval method for loquat fruit variety identification, quality classification and maturity judgment
CN107609111A