Corn quality identification method and device, computer equipment and storage medium

By constructing a three-dimensional corn model and calculating the number of corn kernels, the accuracy issues of corn yield measurement and quality assessment were resolved, providing a reliable basis for agricultural insurance.

CN119048834APending Publication Date: 2024-11-29CHINA PING AN PROPERTY INSURANCE CO LTD

Patent Information

Application Number
CN202411183269.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

Existing technologies for corn yield calculation suffer from problems such as high labor costs, low accuracy, and inability to effectively assess corn quality, which affects the accuracy of agricultural insurance payouts.

Method used

By acquiring corn image information, a three-dimensional corn model is constructed, the center point of the corn kernels is determined and the number of kernels is calculated, and the quality grade is judged by combining preset thresholds. Techniques such as multi-angle shooting, data cleaning, image matching and stereo matching algorithms are used.

Benefits of technology

It enables accurate and effective corn yield calculation and quality identification, providing a reliable basis for agricultural insurance claims.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119048834A_ABST
    Figure CN119048834A_ABST
Patent Text Reader

Abstract

The embodiment of the invention belongs to the field of financial science and technology, and relates to a corn quality identification method and device, computer equipment and a storage medium, and the method comprises the following steps: obtaining corn image information; constructing a three-dimensional corn model according to the corn image information; determining a corn particle center point of the three-dimensional corn model, and calculating the number of corn particles based on the corn particle center point; and comparing the number of the corn particles with a preset threshold value to obtain the corn quality grade. According to the method, quality grade identification and yield measurement and calculation can be accurately and effectively carried out on the corn, so that a compensation basis is effectively provided for agricultural insurance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, specifically to the field of financial technology, and in particular to a corn quality identification method, device, computer equipment and storage medium. Background Art

[0002] Corn is an important food crop in my country. The basis for agricultural insurance compensation is to determine the yield, quality grade, and degree of damage during the harvest period. In the field of agricultural insurance, the yield measurement results of corn will directly affect the amount and timeliness of insurance compensation. Therefore, the accuracy of the yield measurement results must be effectively guaranteed in order to achieve fair and effective insurance compensation.

[0003] When measuring corn yield, one thousand corn kernels are usually peeled manually, exposed to the sun, dehydrated, and then weighed to calculate the weight. The number of ears per mu, the number of kernels per ear, and the corresponding coefficient of the current harvested corn are then multiplied by the weight of one thousand corn kernels to obtain the estimated yield of the current harvested corn.

[0004] However, the above method of measuring corn yield has the problems of labor-intensive and low accuracy. At the same time, it is also impossible to effectively judge the quality of corn, which brings certain difficulties to reasonable insurance claims. In order to effectively improve the accuracy of yield measurement. The prior art proposes to measure the number of corn kernels of a single corn by image recognition, and then calculate the number of corns harvested in the current period according to the weighing. According to the number of corn kernels of a single corn and the calculated number of corns, the corn yield harvested in the current period is further calculated. However, the above technical solution has high requirements for image shooting and cannot guarantee the validity of the captured image. At the same time, during image recognition, it is easy to have erroneous recognition and invalid recognition, resulting in deviations in the measurement results, affecting the accuracy of the yield measurement results. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a corn quality identification method, device, computer equipment and storage medium to solve the problem of being unable to accurately and effectively calculate corn yield.

[0006] In order to solve the above technical problems, the present application embodiment provides a corn quality identification method, which adopts the following technical solution:

[0007] Get corn image information;

[0008] constructing a three-dimensional corn model according to the corn image information;

[0009] Determine the center point of a corn kernel of the three-dimensional corn model, and calculate the number of corn kernels based on the center point of the corn kernel;

[0010] The corn kernel quantity is compared with a preset threshold value to obtain the corn quality grade.

[0011] Furthermore, the step of obtaining corn image information specifically includes:

[0012] The corn is photographed at multiple angles to obtain images of the corn at multiple angles;

[0013] Performing data cleaning on the multi-angle corn image to obtain standard corn image information;

[0014] Acquire corn variety information, match the standard corn image information with the corn variety information, and identify the corn variety corresponding to the standard corn image information;

[0015] The standard corn image information is associated with the corn type corresponding to the standard corn image information to obtain the corn image information.

[0016] Furthermore, the step of constructing a three-dimensional corn model according to the corn image information specifically includes:

[0017] Preprocessing the corn image information to obtain effective corn image information;

[0018] Extracting key feature points of the effective corn image information to obtain corn cob contour feature points and corn kernel contour feature points;

[0019] Finding image corresponding points in the effective corn image information according to a stereo matching algorithm;

[0020] Calculate the depth information corresponding to the corn cob contour feature points and the corn kernel contour feature points based on the corresponding points of the image to obtain the corn cob depth information and the corn kernel depth information;

[0021] Acquire camera parameters corresponding to the corn image information, and generate a 3D point cloud according to the camera parameters, the corn cob depth information, and the corn kernel depth information;

[0022] The 3D point cloud is converted into a continuous surface representation according to a surface reconstruction algorithm to obtain the three-dimensional corn model.

[0023] Furthermore, the step of extracting key feature points of the effective corn image information to obtain corn cob contour feature points and corn kernel contour feature points specifically includes:

[0024] Detecting the edge of the effective corn image information according to an edge detection algorithm to obtain image edge information;

[0025] Refining the image edge information to obtain effective image edge information;

[0026] Extracting the outline of the effective corn image information according to the outline search algorithm and the effective image edge information;

[0027] Distinguishing the outline of the effective corn image information to obtain a corn cob outline and a corn kernel outline;

[0028] Extraction points are extracted from the corn cob outline and the corn kernel outline to obtain feature points of the corn cob outline and the corn kernel outline.

[0029] Furthermore, the image corresponding points include corn cob corresponding points and corn kernel corresponding points, and the step of calculating the depth information corresponding to the corn cob contour feature points and the corn kernel contour feature points based on the image corresponding points to obtain the corn cob depth information and the corn kernel depth information specifically includes:

[0030] Calculating the image disparity of the corresponding points of the corn cob and the corresponding points of the corn kernel to obtain the corn cob disparity and the corn kernel disparity;

[0031] Extract camera focal length information and camera baseline information from the database;

[0032] Calculate the corn cob depth information according to the corn cob parallax, the camera focal length information, and the camera baseline information;

[0033] The corn grain depth information is calculated according to the corn grain parallax, the camera focal length information, and the camera baseline information.

[0034] Furthermore, the step of determining the center point of the corn kernel of the three-dimensional corn model and calculating the number of corn kernels based on the center point of the corn kernel specifically includes:

[0035] Inputting the three-dimensional corn model into a preset neural network model for model segmentation to obtain labeled corn grains;

[0036] Performing minimum bounding box fitting on the marked corn kernels, and determining the center point of the corn kernels according to the minimum bounding box;

[0037] The center points of the corn particles are traversed and counted to obtain the number of the corn particles.

[0038] Furthermore, the step of comparing the number of corn grains with a preset threshold to obtain the corn quality grade specifically includes:

[0039] Determine the corn type corresponding to the corn image information;

[0040] Extracting a corresponding preset threshold from a database according to the corn type;

[0041] Determining whether the number of corn kernels is greater than or equal to the preset threshold;

[0042] If the number of corn kernels is greater than or equal to the preset threshold, the corn corresponding to the number of corn kernels is classified as a high quality grade;

[0043] If the number of corn kernels is less than the preset threshold, the corn corresponding to the number of corn kernels is classified as a low quality grade.

[0044] In order to solve the above technical problems, the embodiment of the present application also provides a corn quality identification device, which adopts the following technical solution:

[0045] An image acquisition module, used for acquiring corn image information;

[0046] A model building module, used for building a three-dimensional corn model according to the corn image information;

[0047] A grain calculation module, used to determine the center point of a corn grain of the three-dimensional corn model, and calculate the number of corn grains based on the center point of the corn grain;

[0048] The quality determination module is used to compare the number of corn kernels with a preset threshold value to obtain the corn quality grade.

[0049] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0050] A computer device comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the corn quality identification method as described in any one of the above items when executing the computer-readable instructions.

[0051] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0052] A computer-readable storage medium having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by a processor, implement the steps of the corn quality identification method as described in any one of the above items.

[0053] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects: the embodiments obtain corn image information, thereby facilitating subsequent analysis and processing; construct a three-dimensional corn model based on the corn image information, thereby effectively converting a two-dimensional image into a three-dimensional stereoscopic model; determine the center point of the corn kernels in the three-dimensional corn model, and calculate the number of corn kernels based on the center point of the corn kernels, thereby accurately and effectively measuring the number of actual corn kernels corresponding to the three-dimensional corn model; compare the number of corn kernels with a preset threshold to obtain the corn quality grade, thereby effectively realizing the identification of corn quality, and at the same time, effectively and accurately calculating the corn yield based on the number of corn kernels, so as to provide a reliable basis for agricultural insurance claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0055] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0056] Figure 2 A flow chart of an embodiment of a corn quality identification method according to the present application;

[0057] Figure 3 yes Figure 2 A flowchart of a specific implementation of step S10;

[0058] Figure 4 yes Figure 2 A flowchart of a specific implementation of step S20;

[0059] Figure 5 yes Figure 4 A flowchart of a specific implementation of step S202;

[0060] Figure 6 yes Figure 4 A flowchart of a specific implementation of step S204;

[0061] Figure 7 yes Figure 2 A flowchart of a specific implementation of step S30;

[0062] Figure 8 yes Figure 2 A flowchart of a specific implementation of step S40;

[0063] Fig. 9 is a schematic structural diagram of an embodiment of a corn quality identification device according to the present application;

[0064] Fig.10 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0065] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0066] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor does it refer to non-related or alternative embodiments that are mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0067] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0068] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0069] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0070] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, etc.

[0071] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .

[0072] It should be noted that the corn quality identification method provided in the embodiment of the present application is generally executed by a server, and accordingly, the corn quality identification device is generally set in the server.

[0073] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0074] Continue to refer Figure 2 , shows a flow chart of an embodiment of a method for identifying corn quality according to the present application. The corn quality identification method comprises the following steps:

[0075] Step S10, obtaining corn image information;

[0076] In this embodiment, the corn image information is an image taken by a high-resolution camera or image scanning device. The image object in the corn image information is a single corn. The corn in the corn image information has multiple shooting angles. The shooting angle refers to different directions relative to the axis of the corn cob, such as the direction perpendicular to the axis of the corn cob. In this embodiment, there are six shooting angles of the corn in the corn image information, which correspond to six coordinate directions of the three-dimensional space coordinate system respectively. The six coordinate directions refer to the direction relative to the object. With one side of the object as the front, the six coordinate directions are respectively distributed in the front, back, left, right, top and bottom. The corn images taken according to the six coordinate directions are respectively the front view, the back view, the left view, the right view, the top view and the bottom view.

[0077] Step S20, constructing a three-dimensional corn model according to the corn image information;

[0078] In this embodiment, the corn image information includes multiple images taken of different corn objects. In this embodiment, the corn image information includes corn objects of different varieties, wherein a single variety of corn objects includes at least 300, and the corn objects are randomly selected from corns of different acres of corn fields currently harvested; the three-dimensional corn model is a simulation model constructed based on the information contained in the corn image information, and the three-dimensional corn model has the shape, size and other attributes of the actual corn object.

[0079] Step S30, determining the center point of the corn kernel of the three-dimensional corn model, and calculating the number of corn kernels based on the center point of the corn kernel;

[0080] In this embodiment, the center point of a corn kernel refers to the geometric center point of the corn kernel model in the three-dimensional corn model, and the center point of the corn kernel corresponds to the center of gravity of the corn kernel of the actual corn object. The number of corn kernels refers to the number of three-dimensional corn kernels in the three-dimensional corn model, and the number of corn kernels in the actual corn object is mapped to the number of three-dimensional corn kernels.

[0081] Step S40, comparing the number of corn kernels with a preset threshold to obtain a corn quality grade.

[0082] In this embodiment, the preset threshold is a different threshold set according to the corn variety. The threshold can be obtained by counting the number of corn kernels of different corn varieties and calculating the mean of the statistical data. In a specific implementation, since the actual corn kernels may be too small or rotten, the corn kernels that are too small or rotten should be eliminated during statistics, and the complete corn kernels should be retained as countable objects to obtain an accurate threshold.

[0083] In the present embodiment, the corn quality grades are high quality grade and low quality grade. When the number of corn kernels is greater than or equal to a preset threshold, the corn corresponding to the number of corn kernels is of high quality grade. When the number of corn kernels is less than the preset threshold, the corn corresponding to the number of corn kernels is of low quality grade. The above judgment method can be adjusted accordingly according to actual conditions. For example, a corn kernel number above 90 percent of the preset threshold is identified as a high quality grade. That is, the preset threshold can be a floating range value of the originally judged preset threshold. For example, the preset threshold in the above example is 90% of the originally judged preset threshold, and can also be set to 95% or 98%. The specific numerical setting can be adjusted according to actual conditions.

[0084] In this embodiment, the corn quality grade of the total harvested corn is calculated by the corn quality grade of a single corn, based on the random extraction of the corn object when the corn image information is obtained. In this embodiment, the corn object is uniformly and randomly selected from corn fields of different mu. For example, 30 corns are randomly selected from 10 mu of corn fields. When 10 of the 30 identified corns are high-quality corns, it is calculated that high-quality corn accounts for one-third of the corn produced in the mu of land. The number of corns produced in the mu of land is multiplied by one-third to obtain the number of high-quality corns in the mu of land. By analogy, the above method can effectively calculate the number of corns corresponding to the corn quality grade of the current harvested corn. The yield of the total harvested corn can be calculated by the number of corn kernels of a single corn. The total harvested corn weight can be divided by the weight of a single corn to estimate the total harvested corn number, and then the total harvested corn number is multiplied by the number of corn kernels of a single corn to obtain the measured current harvested corn yield.

[0085] This embodiment obtains corn image information to facilitate subsequent analysis and processing; constructs a three-dimensional corn model based on the corn image information, thereby effectively converting a two-dimensional image into a three-dimensional stereoscopic model; determines the center point of the corn kernels of the three-dimensional corn model, and calculates the number of corn kernels based on the center point of the corn kernels, thereby accurately and effectively measuring the number of corn kernels of the actual corn corresponding to the three-dimensional corn model; compares the number of corn kernels with a preset threshold to obtain the corn quality grade, thereby effectively realizing the identification of corn quality, and at the same time, can effectively and accurately calculate corn yield based on the number of corn kernels, so as to provide a reliable basis for insurance compensation for agricultural insurance. The embodiment of the present application can be applied to the field of financial technology, specifically to the field of agricultural insurance, by measuring the number of corn kernels and identifying the quality of corn, thereby effectively obtaining a reliable basis for agricultural insurance when making insurance compensation.

[0086] Continue to refer Figure 3 In some optional implementations of this embodiment, step S10 includes the following steps:

[0087] Step S101, photographing corn at multiple angles to obtain multi-angle corn images;

[0088] In this embodiment, the multi-angle corn image includes a front view corn image, a rear view corn image, a left view corn image, a right view corn image, a top view corn image, and an upward view corn image. In the specific implementation, a corn image such as a 45-degree oblique view corn image or a 30-degree oblique view corn image can be added. The oblique angle refers to placing the corn horizontally so that the axis direction of the corn is parallel to the horizontal ground, and then placing the camera device at an angle of 45 degrees or 30 degrees to the axis direction of the corn. In this embodiment, after shooting, the images can be effectively distinguished by adding marks to the images obtained by shooting, for example, a front view mark is added to the front view corn image, a rear view mark is added to the rear view corn image, a left view mark is added to the left view corn image, a right view mark is added to the right view corn image, a top view mark is added to the top view corn image, and an upward view mark is added to the upward view corn image.

[0089] Step S102, performing data cleaning on the multi-angle corn image to obtain standard corn image information;

[0090] In this embodiment, data cleaning refers to deleting blurred, repeated or unqualified images in the multi-angle corn images, and retaining only clear and representative images as standard corn image information. In specific implementation, if there are many multi-angle corn images deleted, it is necessary to re-supplement the captured images so that the standard corn image information is sufficient to support subsequent processing, effectively improving the interpretability of the output results.

[0091] Step S103, obtaining corn variety information, matching the standard corn image information with the corn variety information, and identifying the corn variety corresponding to the standard corn image information;

[0092] In the present embodiment, a database or knowledge base containing multiple corn species and features can be established to facilitate the matching of standard corn image information with corn species information, and the features corresponding to the corn species include corn shape, corn color, corn texture, etc. In the present embodiment, matching can be performed by extracting key features in the standard corn image information, and the key features include shape outline features, color distribution features, texture pattern features, etc., and then the extracted key features are compared with the corn species features in the corn species database to find the corn species with the highest feature similarity, thereby completing the matching operation. Machine learning algorithms (such as support vector machines, random forests, neural networks, etc.) can also be used to identify corn species.

[0093] Step S104, associating the standard corn image information with the corn type corresponding to the standard corn image information to obtain the corn image information.

[0094] In this embodiment, the association operation can be completed by adding the type identification information corresponding to the corn type to the standard corn image information, thereby obtaining the corn image information.

[0095] In this embodiment, corn is photographed at multiple angles to obtain multi-angle corn images; data of the multi-angle corn images is cleaned to obtain standard corn image information; corn variety information is obtained, the standard corn image information and the corn variety information are matched to identify the corn variety corresponding to the standard corn image information; the standard corn image information and the corn variety corresponding to the standard corn image information are associated to obtain corn image information associated with the corn variety and convenient for subsequent processing.

[0096] Continue to refer Figure 4 In some optional implementations of this embodiment, step S20 includes the following steps:

[0097] Step S201, preprocessing the corn image information to obtain valid corn image information;

[0098] In this embodiment, preprocessing refers to performing noise elimination, contrast enhancement and image enhancement processing on the corn image information, so as to obtain effective corn image information.

[0099] Step S202, extracting key feature points of the effective corn image information to obtain corn cob contour feature points and corn kernel contour feature points;

[0100] In this embodiment, these feature points can be detected by image processing algorithms (such as edge detection, corner detection, etc.), and they can be marked as corn cob contour feature points and corn kernel contour feature points, respectively, thereby completing the extraction of key feature points of effective corn image information.

[0101] Step S203, searching for image corresponding points in the effective corn image information according to a stereo matching algorithm;

[0102] In this embodiment, the stereo matching algorithm completes the search for image corresponding points in the effective corn image information through matching cost calculation, cost aggregation, disparity calculation and post-processing, wherein the algorithm calculates a window of appropriate size, shape and weight for each pixel in the effective corn image information, and then performs weighted average on the disparity value in the window to find the effective corresponding points. The matching cost calculation uses each pixel on the effective corn image information to match the cost value of the corresponding point on the target image with all disparity possibilities. Common matching costs include the sum of absolute differences (SAD), truncated sum of absolute differences (STAD), sum of squared differences (SSD), etc.; cost aggregation aggregates the matching costs in a support window by summing, averaging or other methods to obtain the cumulative cost; after the matching costs are aggregated in the support window, the "winner takes it all" strategy (WTA) is usually adopted to select the point with the best cumulative cost as the corresponding point, and the disparity is obtained; post-processing is to optimize the obtained disparity map, and correct the problems of inaccurate disparity of occluded points, noise points, and mismatched points. Through the above-mentioned processing steps, the image corresponding points can be found in the effective corn image information.

[0103] Step S204, calculating the depth information corresponding to the corn cob contour feature points and the corn kernel contour feature points based on the corresponding points of the image, and obtaining the corn cob depth information and the corn kernel depth information;

[0104] In this embodiment, the depth information represents the distance of the corresponding point of the image relative to the camera. By obtaining the depth information, the distribution position of the corresponding point of the image in the three-dimensional space can be effectively determined, so that the three-dimensional space coordinates can be constructed based on it as a reference point.

[0105] Step S205, obtaining camera parameters corresponding to the corn image information, and generating a 3D point cloud according to the camera parameters, the corn cob depth information, and the corn kernel depth information;

[0106] In this embodiment, the camera parameters are the information recorded when shooting the corn image information. The camera parameters are saved in the database and have the same information identifier as the corresponding corn image information. The camera parameters are found and obtained through the information identifier. The camera parameters are the imaging properties of the camera when shooting, such as focal length, camera position and direction, etc. A 3D point cloud in three-dimensional space coordinates is generated according to the camera parameters and the corn cob depth information and the corn kernel depth information. The 3D point cloud is a collection of a large number of three-dimensional points, which together describe the shape and structure of the scene.

[0107] Step S206: convert the 3D point cloud into a continuous surface representation according to a surface reconstruction algorithm to obtain the three-dimensional corn model.

[0108] In this embodiment, the three-dimensional points in the 3D point cloud are connected to form a smooth surface or mesh to create a three-dimensional corn model.

[0109] This embodiment obtains effective corn image information by preprocessing the corn image information; extracts key feature points of the effective corn image information to obtain corn cob contour feature points and corn kernel contour feature points; searches for image corresponding points in the effective corn image information according to a stereo matching algorithm; calculates depth information corresponding to the corn cob contour feature points and the corn kernel contour feature points based on the image corresponding points to obtain corn cob depth information and corn kernel depth information; obtains camera parameters corresponding to the corn image information, and generates a 3D point cloud according to the camera parameters, the corn cob depth information and the corn kernel depth information; and converts the 3D point cloud into a continuous surface representation according to a surface reconstruction algorithm, thereby obtaining a three-dimensional corn model that can effectively map a real corn object, reflect the features and details of the real corn object, and facilitate subsequent simulation calculations.

[0110] Continue to refer Figure 5 In some optional implementations of this embodiment, step S202 includes the following steps:

[0111] Step S2021, detecting the edge of the effective corn image information according to an edge detection algorithm to obtain image edge information;

[0112] In this embodiment, the edge detection algorithm is based on the principle that the difference in any pair of mutually perpendicular directions can be used to calculate the gradient. The difference between two adjacent pixels in the diagonal direction is used to detect the edge. The edge detection algorithm detects the edge portion in the effective corn image information and generates a binary image, in which the edge portion will be highlighted (usually white), while the non-edge portion will be black or displayed at a low intensity.

[0113] Step S2022, performing refinement processing on the image edge information to obtain effective image edge information;

[0114] In this embodiment, the thinning process is to reduce the redundant or blurred edges that may be generated in edge detection, so as to obtain more accurate and clearer edge information. Thinning can be achieved by a variety of methods, such as morphological operations (erosion, expansion, opening operation, closing operation, etc.), iterative thinning algorithms, etc. In this embodiment, an iterative thinning algorithm is used, and a corresponding selection can be made according to actual conditions.

[0115] Step S2023, extracting the contour of the effective corn image information according to the contour search algorithm and the effective image edge information;

[0116] In this embodiment, the contour search algorithm is usually operated based on the binarization result of the image, and is used to identify and extract the boundary composed of continuous, non-zero pixels in the image. The contour is found on the effective corn image information by using functions such as findContours, which traverse each pixel in the effective corn image information and detect the boundary composed of continuous, non-zero pixels. Then the findContours function returns a list containing the detected contour information, and each contour is composed of a series of points (usually two-dimensional coordinates), which define the shape and position of the contour. Thereby, the contour of the effective corn image information is extracted.

[0117] Step S2024, distinguishing the contour of the effective corn image information to obtain a corn cob contour and a corn kernel contour;

[0118] In this embodiment, the corn cob contour and corn kernel contour are distinguished according to the contour shape, size, position and other features. In the specific implementation, the distinction can be made according to the features through a machine learning model. For example, different contours can be distinguished based on the contour area, perimeter, aspect ratio and other features, and the distinguished contours are placed in the corresponding corn cob contour set and corn kernel contour set.

[0119] Step S2025, extracting points from the corn cob outline and the corn kernel outline to obtain feature points of the corn cob outline and the corn kernel outline.

[0120] In this embodiment, for the corn cob contour and corn kernel contour, a feature point extraction algorithm (such as Harris corner detection, SIFT, SURF, etc.) can be used to extract feature points on the contour. Feature points are usually those points on the contour that have obvious changes or uniqueness, such as corner points, inflection points, etc.

[0121] This embodiment obtains image edge information by detecting the edge of the effective corn image information according to an edge detection algorithm; refines the image edge information to obtain effective image edge information; extracts the contour of the effective corn image information according to a contour search algorithm and the effective image edge information; distinguishes the contour of the effective corn image information to obtain a corn cob contour and a corn kernel contour; extracts points from the corn cob contour and the corn kernel contour to obtain corn cob contour feature points and corn kernel contour feature points that characterize the basic shape of the corn cob and the basic shape of the corn kernel, so as to facilitate subsequent search for image corresponding points based on the corn cob contour feature points and the corn kernel contour feature points.

[0122] Continue to refer Figure 6 In some optional implementations of this embodiment, step S204 includes the following steps:

[0123] Step S2041, calculating the image disparity of the corresponding points of the corn cob and the corresponding points of the corn kernel, and obtaining the corn cob disparity and the corn kernel disparity;

[0124] In this embodiment, the image disparity refers to the horizontal pixel distance between corresponding points in different images, which can be calculated by a stereo matching algorithm. The image disparity can effectively represent and quantify the positioning of corresponding points in the image in three-dimensional space.

[0125] Step S2042, extracting camera focal length information and camera baseline information from a database;

[0126] In this embodiment, focal length is a measurement method for measuring the convergence or divergence of light in an optical system, and refers to the distance from the optical center of the lens to the focus of light convergence when parallel light is incident. The baseline of the camera refers to the distance between two imaging elements in the camera optical system (such as two lenses of the camera). The camera focal length information and camera baseline information can be extracted from the database through identifiers corresponding to the camera focal length information and camera baseline information.

[0127] Step S2043, calculating the corn cob depth information according to the corn cob parallax, the camera focal length information, and the camera baseline information;

[0128] In this embodiment, the depth information of the corn cob can be calculated by the following formula, assuming that the disparity of the corresponding point of the corn cob is dcob, the focal length of the camera is f, and the camera baseline (the horizontal distance between the two cameras) is B, then the depth Z_cob is: [Z_cob=\frac{fB}{d_cob}]. Wherein, Z_cob is the depth of the corresponding point of the corn cob (the distance from the camera).

[0129] Step S2044, calculating the depth information of the corn grain according to the corn grain parallax, the camera focal length information, and the camera baseline information.

[0130] In this embodiment, the depth information of the corn kernel can be calculated by the following formula, assuming that the disparity of the corresponding point of the corn kernel is d_kernel, then the depth Z_kernel is: [Z_kernel=\frac{fB}{d_kernel}], wherein Z_kernel is the depth of the corresponding point of the corn kernel.

[0131] This embodiment calculates the image disparity of the corresponding points of the corn cob and the corresponding points of the corn kernel to obtain the corn cob disparity and the corn kernel disparity; extracts the camera focal length information and the camera baseline information from the database; calculates the corn cob depth information according to the corn cob disparity, the camera focal length information and the camera baseline information; calculates the corn kernel depth information according to the corn kernel disparity, the camera focal length information and the camera baseline information. Thus, the corn cob depth information and the corn kernel depth information representing the stereoscopic depth of the corn cob and the corn kernel in the image are effectively obtained to facilitate subsequent calculations.

[0132] Continue to refer Figure 7 In some optional implementations of this embodiment, step S30 includes the following steps:

[0133] Step S301, inputting the three-dimensional corn model into a preset neural network model for model segmentation to obtain labeled corn kernels;

[0134] In this embodiment, the preset neural network model is a convolutional neural network model. The convolutional neural network extracts features from the input image through a convolutional layer. Each convolutional layer contains multiple convolution kernels (also called filters), which traverse the entire input image and generate a feature map. Next, the pooling layer performs dimensionality reduction on the feature map to reduce the amount of calculation while retaining key information. Finally, the fully connected layer maps the feature map output by the pooling layer to the sample labeling space to achieve classification or regression tasks. The convolutional neural network model extracts features to effectively identify and perform model segmentation, thereby marking corn kernels.

[0135] Step S302, performing minimum bounding box fitting on the marked corn kernels, and determining the center point of the corn kernels according to the minimum bounding box;

[0136] In the present embodiment, the minimum bounding box fitting is a process of finding a minimum rectangle that can contain a given set of points or shapes, and this rectangle is usually parallel to the coordinate axis, and at least one side coincides with the coordinate axis. The minimum bounding box fitting includes two processing steps: calculating boundary coordinates and generating rectangles, wherein the calculation of boundary coordinates is for a given set of points or shapes, first finding their maximum and minimum values ​​on the x and y coordinate axes, and these values ​​will define the upper left corner and lower right corner coordinates of the minimum bounding box. Generating rectangles is to use the calculated boundary coordinates to generate rectangles, and this rectangle will tightly surround the given point or shape while remaining parallel to the coordinate axis. The minimum rectangle containing the marked corn kernels is effectively determined by the above method.

[0137] Step S303, traverse and count the center points of the corn particles to obtain the number of the corn particles.

[0138] In this embodiment, traversal counting is a method of checking the center points of corn kernels one by one and counting the number through traversal. The traversal counting can effectively count the number of corn kernels to improve the accuracy of the data.

[0139] This embodiment obtains labeled corn kernels by inputting the three-dimensional corn model into a preset neural network model for model segmentation; performs minimum bounding box fitting on the labeled corn kernels, and determines the center points of the corn kernels based on the minimum bounding box; and traverses and counts the center points of the corn kernels, thereby effectively obtaining the number of corn kernels in the statistical three-dimensional corn model, so as to facilitate the subsequent identification of corn quality grades based on the number of corn kernels.

[0140] Continue to refer Figure 8 In some optional implementations of this embodiment, step S40 includes the following steps:

[0141] Step S401, determining the corn type corresponding to the corn image information;

[0142] In this embodiment, the corn image information includes the corresponding corn variety, and the corresponding corn variety identification information can be directly extracted from the corn image information or viewed for determination.

[0143] Step S402, extracting a corresponding preset threshold from a database according to the corn type;

[0144] In this embodiment, the preset threshold and the corn variety have the same identification information, and the corresponding preset threshold can be effectively found in the database according to the identification information of the corn variety to realize the extraction of the preset threshold.

[0145] Step S403, determining whether the number of corn kernels is greater than or equal to the preset threshold;

[0146] Step S404, if the number of corn kernels is greater than or equal to the preset threshold, classifying the corn corresponding to the number of corn kernels into a high quality grade;

[0147] Step S405: if the number of corn kernels is less than the preset threshold, the corn corresponding to the number of corn kernels is classified as a low quality grade.

[0148] This embodiment determines the corn type corresponding to the corn image information; extracts the corresponding preset threshold from the database according to the corn type; determines whether the number of corn grains is greater than or equal to the preset threshold; if the number of corn grains is greater than or equal to the preset threshold, the corn corresponding to the number of corn grains is classified as a high-quality grade; if the number of corn grains is less than the preset threshold, the corn corresponding to the number of corn grains is classified as a low-quality grade. The above method can effectively identify the quality grade of corn, so as to accurately complete the quality grade judgment of corn.

[0149] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0150] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0151] Further references Fig. 9 , as a response to the above Figure 1 The present application provides an embodiment of a corn quality identification device, and the device embodiment is similar to Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0152] like Fig. 9 As shown, the corn quality identification device 500 described in this embodiment includes: an image acquisition module 501, a model construction module 502, a particle calculation module 503, and a quality determination module 504. Among them:

[0153] An image acquisition module 501 is used to acquire corn image information;

[0154] A model building module 502 is used to build a three-dimensional corn model according to the corn image information;

[0155] A grain calculation module 503 is used to determine the center point of the corn grain of the three-dimensional corn model and calculate the number of corn grains based on the center point of the corn grain;

[0156] The quality determination module 504 is used to compare the number of corn kernels with a preset threshold value to obtain a corn quality grade.

[0157] This embodiment can obtain corn image information by adopting the above-mentioned corn quality identification device, so as to facilitate subsequent analysis and processing; by constructing a three-dimensional corn model according to the corn image information, the two-dimensional image is effectively converted into a three-dimensional stereoscopic model; by determining the center point of the corn kernels of the three-dimensional corn model, and calculating the number of corn kernels based on the center point of the corn kernels, the number of corn kernels of the actual corn corresponding to the three-dimensional corn model can be accurately and effectively calculated; by comparing the number of corn kernels with a preset threshold, the corn quality grade can be obtained, so as to effectively realize the identification of corn quality, and at the same time, the corn yield can be effectively and accurately calculated according to the number of corn kernels, so as to provide a reliable basis for insurance compensation of agricultural insurance. The embodiment of the present application can be applied to the field of financial technology, and specifically to the field of agricultural insurance. By measuring the number of corn kernels and identifying the quality of corn, a reliable basis for agricultural insurance can be effectively obtained when insurance compensation is paid.

[0158] To solve the above technical problems, the present application also provides a computer device. Fig.10 , Fig.10 This is a basic structural block diagram of the computer device in this embodiment.

[0159] The computer device 6 includes a memory 61, a processor 62, and a network interface 63 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 6 with components 61-63, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0160] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0161] The memory 61 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 61 can be an internal storage unit of the computer device 6, such as a hard disk or memory of the computer device 6. In other embodiments, the memory 61 can also be an external storage device of the computer device 6, such as a plug-in hard disk equipped on the computer device 6, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Of course, the memory 61 can also include both the internal storage unit of the computer device 6 and its external storage device. In this embodiment, the memory 61 is generally used to store the operating system and various application software installed on the computer device 6, such as computer-readable instructions of the corn quality identification method, etc. In addition, the memory 61 can also be used to temporarily store various types of data that have been output or are to be output.

[0162] The processor 62 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 62 is generally used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is used to run computer-readable instructions or process data stored in the memory 61, such as computer-readable instructions for running the corn quality identification method.

[0163] The network interface 63 may include a wireless network interface or a wired network interface. The network interface 63 is generally used to establish a communication connection between the computer device 6 and other electronic devices.

[0164] This embodiment can obtain corn image information by adopting the above-mentioned computer equipment, so as to facilitate subsequent analysis and processing; by constructing a three-dimensional corn model according to the corn image information, the two-dimensional image is effectively converted into a three-dimensional stereoscopic model; by determining the center point of the corn kernels of the three-dimensional corn model, and calculating the number of corn kernels based on the center point of the corn kernels, the number of corn kernels of the actual corn corresponding to the three-dimensional corn model can be accurately and effectively calculated; by comparing the number of corn kernels with a preset threshold, the corn quality grade can be obtained, so as to effectively realize the identification of corn quality, and at the same time, the corn yield can be effectively and accurately calculated according to the number of corn kernels, so as to provide a reliable basis for insurance compensation of agricultural insurance. The embodiment of the present application can be applied to the field of financial technology, and specifically to the field of agricultural insurance, by measuring the number of corn kernels and identifying the quality of corn, a reliable basis for agricultural insurance can be effectively obtained when insurance compensation is paid.

[0165] The present application also provides another embodiment, namely, providing a computer-readable storage medium, which stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the corn quality identification method as described above.

[0166] This embodiment can obtain corn image information by adopting the above-mentioned computer-readable storage medium, so as to facilitate subsequent analysis and processing; by constructing a three-dimensional corn model according to the corn image information, the two-dimensional image is effectively converted into a three-dimensional stereoscopic model; by determining the center point of the corn kernels of the three-dimensional corn model, and calculating the number of corn kernels based on the center point of the corn kernels, the number of corn kernels of the actual corn corresponding to the three-dimensional corn model can be accurately and effectively calculated; by comparing the number of corn kernels with a preset threshold, the corn quality grade can be obtained, so as to effectively realize the identification of corn quality, and at the same time, the corn yield can be effectively and accurately calculated according to the number of corn kernels, so as to provide a reliable basis for insurance compensation of agricultural insurance. The embodiment of the present application can be applied to the field of financial technology, and specifically to the field of agricultural insurance, by measuring the number of corn kernels and identifying the quality of corn, a reliable basis for agricultural insurance can be effectively obtained when insurance compensation is paid.

[0167] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0168] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A method for identifying corn quality, characterized in that: The steps include: Get corn image information; constructing a three-dimensional corn model according to the corn image information; Determine the center point of a corn kernel of the three-dimensional corn model, and calculate the number of corn kernels based on the center point of the corn kernel; The corn kernel quantity is compared with a preset threshold value to obtain the corn quality grade.

2. The corn quality identification method according to claim 1, characterized in that: The step of obtaining corn image information specifically includes: The corn is photographed at multiple angles to obtain images of the corn at multiple angles; Performing data cleaning on the multi-angle corn image to obtain standard corn image information; Acquire corn variety information, match the standard corn image information with the corn variety information, and identify the corn variety corresponding to the standard corn image information; The standard corn image information is associated with the corn type corresponding to the standard corn image information to obtain the corn image information.

3. The corn quality identification method according to claim 1, characterized in that: The step of constructing a three-dimensional corn model according to the corn image information specifically includes: Preprocessing the corn image information to obtain effective corn image information; Extracting key feature points of the effective corn image information to obtain corn cob contour feature points and corn kernel contour feature points; Finding image corresponding points in the effective corn image information according to a stereo matching algorithm; Calculate the depth information corresponding to the corn cob contour feature points and the corn kernel contour feature points based on the corresponding points of the image to obtain the corn cob depth information and the corn kernel depth information; Acquire camera parameters corresponding to the corn image information, and generate a 3D point cloud according to the camera parameters, the corn cob depth information, and the corn kernel depth information; The 3D point cloud is converted into a continuous surface representation according to a surface reconstruction algorithm to obtain the three-dimensional corn model.

4. The corn quality identification method according to claim 3, characterized in that: The step of extracting the key feature points of the effective corn image information to obtain the corn cob contour feature points and the corn kernel contour feature points specifically includes: Detecting the edge of the effective corn image information according to an edge detection algorithm to obtain image edge information; Refining the image edge information to obtain effective image edge information; Extracting the outline of the effective corn image information according to the outline search algorithm and the effective image edge information; Distinguishing the outline of the effective corn image information to obtain a corn cob outline and a corn kernel outline; Extraction points are extracted from the corn cob outline and the corn kernel outline to obtain feature points of the corn cob outline and the corn kernel outline.

5. The corn quality identification method according to claim 3, characterized in that: The image corresponding points include corn cob corresponding points and corn kernel corresponding points, and the step of calculating the depth information corresponding to the corn cob contour feature points and the corn kernel contour feature points based on the image corresponding points to obtain the corn cob depth information and the corn kernel depth information specifically includes: Calculating the image disparity of the corresponding points of the corn cob and the corresponding points of the corn kernel to obtain the corn cob disparity and the corn kernel disparity; Extract camera focal length information and camera baseline information from the database; Calculate the corn cob depth information according to the corn cob parallax, the camera focal length information, and the camera baseline information; The corn grain depth information is calculated according to the corn grain parallax, the camera focal length information, and the camera baseline information.

6. The corn quality identification method according to claim 1, characterized in that: The step of determining the center point of the corn kernel of the three-dimensional corn model and calculating the number of corn kernels based on the center point of the corn kernel specifically includes: Inputting the three-dimensional corn model into a preset neural network model for model segmentation to obtain labeled corn grains; Performing minimum bounding box fitting on the marked corn kernels, and determining the center point of the corn kernels according to the minimum bounding box; The center points of the corn particles are traversed and counted to obtain the number of the corn particles.

7. The corn quality identification method according to claim 1, characterized in that: The step of comparing the number of corn grains with a preset threshold to obtain the corn quality grade specifically includes: Determine the corn type corresponding to the corn image information; Extracting a corresponding preset threshold from a database according to the corn type; Determining whether the number of corn kernels is greater than or equal to the preset threshold; If the number of corn kernels is greater than or equal to the preset threshold, the corn corresponding to the number of corn kernels is classified as a high quality grade; If the number of corn kernels is less than the preset threshold, the corn corresponding to the number of corn kernels is classified as a low quality grade.

8. A corn quality identification device, characterized in that: include: An image acquisition module, used for acquiring corn image information; A model building module, used for building a three-dimensional corn model according to the corn image information; A grain calculation module, used to determine the center point of a corn grain of the three-dimensional corn model, and calculate the number of corn grains based on the center point of the corn grain; The quality determination module is used to compare the number of corn kernels with a preset threshold value to obtain the corn quality grade.

9. A computer device, characterized in that: It comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the corn quality identification method as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the corn quality identification method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Image analysis method and device applied to outer surface of corn ear, computer equipment and storage medium

    CN117197479A

  • Corn ear three-dimensional reconstruction device and method based on neural radiation field

    CN118196282A

  • Apparatus and processes for classifying and counting corn kernels

    US20160225135A1

  • System and method for leveraging neural network based hybrid feature extraction model for grain quality analysis

    WO2023084543A1

Cited By

  • Field crop green-keeping degree determination method, device, equipment, medium and product

    CN120599431A