Plant recognition method, device, equipment and storage medium
By acquiring the image features of occluded plants and performing image processing, the shape and texture features of the target plants are extracted, solving the problem of low efficiency and accuracy in plant identification under occlusion conditions, and realizing automated and efficient identification.
Patent Information
- Application Number
- CN202211639738.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-20
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2042-12-20
AI Technical Summary
Traditional plant identification methods have a low accuracy rate when plants are occluded, resulting in a large workload and strong subjectivity, which limits the popularization of plant knowledge.
By acquiring the image features of the occluded plants, image processing is performed on the image to be identified to extract the shape and texture features of the target plants, and these features are used for identification.
When plants are obscured, the system can automatically and effectively identify them, improving the efficiency and accuracy of plant identification.
Smart Images

Figure CN116109921B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image recognition, and in particular to a plant recognition method, device, equipment and storage medium. BACKGROUND
[0002] There are about 400,000 plants in nature, of which more than 250,000 have been named and their information structure has been entered into the database. Traditional plant recognition generally measures the collected specimens manually, obtains data, comprehensively considers the external characteristics of plants, and classifies and identifies them through people's experience and common sense. This method has a huge workload and strong subjectivity, resulting in low recognition accuracy and limiting the popularization of plant knowledge. Therefore, how to effectively recognize plants when they are blocked has become a problem to be solved.
[0003] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY
[0004] The main purpose of the present application is to provide a plant recognition method, device, equipment and storage medium, which aims to solve the technical problem of how to effectively recognize plants when they are blocked.
[0005] To achieve the above purpose, the present application provides a plant recognition method, which comprises the following steps:
[0006] When the plant to be identified in the image to be identified is blocked, the image features corresponding to the blocked plant are obtained;
[0007] According to the image features, the image to be identified is processed to obtain a processed image;
[0008] The shape features and texture features corresponding to the target plant in the processed image are obtained;
[0009] According to the shape features and texture features, the target plant is identified.
[0010] Optionally, the step of processing the image to be identified according to the image features to obtain a processed image specifically comprises:
[0011] The blocked area corresponding to the blocked plant in the image features is obtained;
[0012] When the blocked area is greater than a preset area, the blocked plant and the plant to be identified are compared in species to obtain a comparison result;
[0013] When the comparison result is a comparison failure, performing image processing on the to-be-identified image according to the occlusion image corresponding to the occlusion plant to obtain a processed image.
[0014] Optionally, when the comparison result is a comparison failure, the step of performing image processing on the to-be-identified image according to the occlusion image corresponding to the occlusion plant to obtain a processed image specifically comprises:
[0015] When the comparison result is a comparison failure, increasing the transparency of the occlusion image corresponding to the occlusion plant;
[0016] Enhancing the definition of the occlusion part in the to-be-identified plant to obtain a processed image.
[0017] Optionally, the step of obtaining the shape feature and the texture feature corresponding to the target plant in the processed image specifically comprises:
[0018] Performing grayscale processing on the processed image to obtain a grayscale image;
[0019] Determining the shape feature corresponding to the target plant in the processed image according to the grayscale image;
[0020] Determining the leaf image corresponding to the target plant according to the grayscale image;
[0021] Determining the texture feature corresponding to the target plant according to the leaf image.
[0022] Optionally, the step of determining the shape feature corresponding to the target plant in the processed image according to the grayscale image specifically comprises:
[0023] Performing edge extraction on the grayscale image to obtain edge feature information;
[0024] Extracting a connected region in the edge feature information;
[0025] Screening the connected region according to a connected component corresponding to the connected region to obtain a target connected region;
[0026] Determining the shape feature corresponding to the target plant according to the target connected region.
[0027] Optionally, before the step of obtaining the image feature corresponding to the occlusion plant when the to-be-identified plant in the to-be-identified image is occluded, the method further comprises:
[0028] Obtaining a leaf feature in the to-be-identified image, the leaf feature comprising a leaf color feature and a leaf shape feature;
[0029] Obtaining arrangement information of the leaves in the to-be-identified image;
[0030] Determining whether the to-be-identified plant in the to-be-identified image is occluded according to the leaf color feature, the leaf shape feature, and the arrangement information.
[0031] Optionally, the step of determining whether the to-be-identified plant in the to-be-identified image is occluded according to the leaf color feature, the leaf shape feature, and the arrangement information specifically comprises:
[0032] Obtaining vein arrangement information, leaf arrangement information, and petiole arrangement information in the arrangement information;
[0033] Determining whether the to-be-identified plant in the to-be-identified image is occluded according to the leaf color feature, the leaf shape feature, the vein arrangement information, the leaf arrangement information, and the petiole arrangement information.
[0034] In addition, to achieve the above object, the present application further provides a plant identification device, which comprises:
[0035] A feature acquisition module is configured to acquire image features corresponding to an occluded plant when a to-be-identified plant in a to-be-identified image is occluded;
[0036] An image processing module is configured to perform image processing on the to-be-identified image according to the image features to obtain a processed image;
[0037] The feature acquisition module is further configured to acquire shape features and texture features corresponding to a target plant in the processed image;
[0038] A plant identification module is configured to identify the target plant according to the shape features and the texture features.
[0039] In addition, to achieve the above object, the present application further provides a plant identification device, which comprises a memory, a processor, and a plant identification program stored in the memory and executable on the processor, and the plant identification program is configured to implement the steps of the plant identification method as described above.
[0040] In addition, to achieve the above object, the present application further provides a storage medium having a plant identification program stored thereon, and the plant identification program is executable on a processor to implement the steps of the plant identification method as described above.
[0041] This invention, when a plant in an image is occluded, acquires the image features corresponding to the occluded plant. Then, it processes the image based on these features to obtain a processed image. Next, it acquires the shape and texture features of the target plant in the processed image, and finally identifies the target plant based on these features. This invention, by processing the image based on its features when the plant in the image is occluded, effectively suppresses the influence of occlusion on the plant being identified. Furthermore, it identifies the target plant in the processed image based on its shape and texture features. Compared to existing methods that rely on manual plant identification, this invention can automatically and effectively identify plants even when they are occluded, thereby improving the efficiency and accuracy of plant identification. Attached Figure Description
[0042] Figure 1 This is a schematic diagram of the structure of a plant identification device in the hardware operating environment involved in the embodiments of the present invention;
[0043] Figure 2 This is a flowchart illustrating the first embodiment of the plant identification method of the present invention;
[0044] Figure 3 This is a flowchart illustrating the second embodiment of the plant identification method of the present invention;
[0045] Figure 4 This is a flowchart illustrating the third embodiment of the plant identification method of the present invention;
[0046] Figure 5 This is a structural block diagram of the first embodiment of the plant identification device of the present invention.
[0047] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0048] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0049] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of a plant identification device in the hardware operating environment of an embodiment of the present invention.
[0050] like Figure 1As shown, the plant recognition device can include a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection and communication between the components. The user interface 1003 can include a display, an input unit such as a keyboard, and can also include a standard wired interface, a wireless interface. The network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a wireless fidelity (Wi-Fi) interface). The memory 1005 can be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk memory. The memory 1005 can also be a storage device independent of the aforementioned processor 1001.
[0051] Those skilled in the art can understand that Figure 1 The structure shown in the figure does not constitute a limitation on the plant recognition device, and can include more or fewer components than the figure, or combine certain components, or different component arrangements.
[0052] As Figure 1 As shown, the memory 1005 as a storage medium can include an operating system, a network communication module, a user interface module, and a plant recognition program.
[0053] In Figure 1 In the plant recognition device shown, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the plant recognition device of the present application can be arranged in the plant recognition device, and the plant recognition device calls the plant recognition program stored in the memory 1005 through the processor 1001, and executes the plant recognition method provided by the embodiments of the present application.
[0054] Based on the above plant recognition device, the embodiments of the present application provide a plant recognition method, which is described with reference to Figure 2 , Figure 2 The flowchart of the first embodiment of the plant recognition method of the present application is shown.
[0055] In this embodiment, the plant recognition method includes the following steps:
[0056] Step S10: When the to-be-recognized plant in the to-be-recognized image is occluded, acquiring image features corresponding to the occluded plant;
[0057] It should be noted that the execution subject of the embodiment can be a computing service device with data processing, network communication and program running functions, such as a mobile phone, a tablet computer, a personal computer, etc., or an electronic device or a plant identification device capable of realizing the above functions. The embodiment and the following embodiments will be described below taking the plant identification device as an example.
[0058] It can be understood that when identifying the plant to be identified, the image to be identified corresponding to the plant to be identified needs to be obtained. In the image to be identified, the plant to be identified can be blocked by other plants, that is, the blocking plants.
[0059] It should be understood that when the plant to be identified in the image to be identified is blocked, the image features corresponding to the blocking plants can be obtained, which can include shape features, color features, etc.
[0060] Further, in order to accurately determine whether the plant to be identified is blocked, in the embodiment, before the step S10, it further includes: obtaining leaf features in the image to be identified, the leaf features including leaf color features and leaf shape features; obtaining arrangement information of the leaves in the image to be identified; determining whether the plant to be identified in the image to be identified is blocked according to the leaf color features, the leaf shape features and the arrangement information.
[0061] It can be understood that the embodiment can obtain the leaf features corresponding to all the leaves in the image to be identified, which can include leaf color features and leaf shape features. The leaf color features refer to the color of all the leaves, and the leaf shape features refer to the shape of all the leaves, from which the size of the leaves, the outline of the leaves, etc. can be determined.
[0062] It should be understood that the embodiment can also obtain the arrangement information corresponding to all the leaves in the image to be identified, which can include the orientation of the leaf tips, the vein information, etc.
[0063] In a specific implementation, whether the plant to be identified in the image to be identified is blocked can be determined according to the leaf color features, the leaf shape features and the arrangement information. The specific determination method can be that when the leaf color features are the same, the leaf shape features are similar, and the arrangement information is similar, that is, the leaf outlines are similar, it is indicated that there is only one kind of plant in the image to be identified, and it is determined that the plant to be identified is not blocked.
[0064] Further, in order to accurately determine whether the plant to be identified exists occlusion, in the embodiment, the step of determining whether the plant to be identified in the image to be identified exists occlusion according to the leaf color feature, the leaf shape feature and the arrangement information specifically comprises: obtaining vein arrangement information, leaf arrangement information and petiole arrangement information in the arrangement information; determining whether the plant to be identified in the image to be identified exists occlusion according to the leaf color feature, the leaf shape feature, the vein arrangement information, the leaf arrangement information and the petiole arrangement information.
[0065] It can be understood that the arrangement information in the embodiment can include vein arrangement information, leaf arrangement information and petiole arrangement information, the vein arrangement information refers to the arrangement information of the vein, for example, the bending degree of the vein, the position of the vein in the leaf, etc., the leaf arrangement information refers to the orientation of the leaf tip in the leaf, the shape of the leaf, etc., and the petiole arrangement information refers to the length of the petiole, the relative position of the petiole and the leaf, etc.
[0066] It should be understood that the plant to be identified in the image to be identified can be determined whether to exist occlusion according to the leaf color feature, the leaf shape feature, the vein arrangement information, the leaf arrangement information and the petiole arrangement information, and the specific determination method can be that when the leaf color feature is the same, the leaf shape feature is similar, the leaf shape feature similar refers to the leaf contour similar, the vein arrangement information is similar, the vein arrangement information similar refers to the vein similar, the leaf arrangement information similar refers to the orientation of the leaf tip similar, that is, all from a central position to the outside, the petiole arrangement information similar, the petiole arrangement information refers to the orientation of the petiole similar, the length of the petiole similar, etc. When all the leaves in the image to be identified meet the above requirements at the same time, it is determined that the plant to be identified does not exist occlusion, and when all the leaves in the image to be identified do not meet the above requirements at the same time, it is determined that the plant to be identified may exist occlusion.
[0067] Step S20: performing image processing on the image to be identified according to the image feature to obtain a processed image;
[0068] It can be understood that the image to be identified can be processed according to the image feature in the embodiment, and the specific image processing manner can be to increase the transparency of the occluded plant, or to remove the image corresponding to the occluded plant from the image to be identified to obtain a processed image.
[0069] Step S30: obtaining shape features and texture features corresponding to the target plant in the processed image;
[0070] It should be understood that the target plant can be included in the processed image, and the embodiment can acquire shape features and texture features corresponding to the target plant. The shape features can include shapes of leaves and roots of the target plant, and the texture features can include features such as coarseness and density of the texture of the target plant.
[0071] Step S40: identifying the target plant according to the shape features and the texture features.
[0072] In a specific implementation, the embodiment can identify the target plant according to the shape features and the texture features. Specifically, the shape features and the texture features can be compared with plants in a preset database, or the shape features and the texture features can be input into a preset plant identification classifier to obtain a category to which the target plant belongs.
[0073] The embodiment can acquire image features corresponding to the occluded plant when the plant to be identified in the image to be identified is occluded, then perform image processing on the image to be identified according to the image features, obtain a processed image, then acquire shape features and texture features corresponding to the target plant in the processed image, and finally identify the target plant according to the shape features and the texture features. When the plant to be identified in the image to be identified is occluded, the embodiment can effectively suppress the influence of the occluded plant on the plant to be identified by performing image processing on the image to be identified according to the image features. Compared with the existing plant identification by manual operation, the above-mentioned method of the embodiment can automatically and effectively identify the plant when the plant is occluded, thereby improving the efficiency and accuracy of plant identification.
[0074] Reference Figure 3 , Figure 3 FIG. 2 is a flowchart of a second embodiment of the plant identification method.
[0075] Based on the first embodiment, in the embodiment, the step S20 includes:
[0076] Step S201: acquiring an occlusion area corresponding to the occluded plant in the image features;
[0077] It should be understood that the occlusion area refers to an area of the plant to be identified that is occluded by the occluded plant. The occlusion area can be obtained by first performing image calibration on the image to be identified to obtain an actual area of the occluded plant.
[0078] Step S202: when the occlusion area is greater than a preset area, comparing the occluded plant and the plant to be identified in terms of category to obtain a comparison result;
[0079] It should be understood that the preset area is a pre-set area, and the specific value can be set according to the actual situation. When the occlusion area is larger than the preset area, it means that a large part of the plant to be identified is occluded. In this case, the species of the occluded plant and the plant to be identified can be compared. When the occlusion area is smaller than the preset area, it means that a small part of the plant to be identified is occluded. In this case, the influence of the occluding plant can be ignored.
[0080] In practice, the method for species comparison can be to compare the shape of the shading plant with the shape of the plant to be identified, or to compare the leaf veins of the shading plant with the leaf veins of the plant to be identified. When both comparisons pass, that is, when the shape and leaf veins of the plant to be identified and the shading plant are similar, the comparison result is "comparison passed". When the shape and leaf veins of the plant to be identified and the shading plant are not similar, the comparison result is "comparison failed".
[0081] Step S203: When the comparison result is a failure, the image to be identified is processed according to the occlusion image corresponding to the occlusion plant to obtain the processed image.
[0082] Understandably, an occluded image refers to an image containing occluded plants within the image to be identified.
[0083] It should be understood that when the comparison result is a failure, it means that the plant to be identified and the occluded plant are not the same type of plant. Then, image processing is performed on the image to be identified based on the occluded image. The specific image processing can be to remove the occluded image in the image to be identified, or it can be other processing methods, to obtain the processed image.
[0084] In the specific implementation, when the comparison result is successful, it means that the plant to be identified and the occluded plant belong to the same type of plant. At this time, there is no need to perform image processing on the image to be identified, and the plant contained in the image can be identified directly.
[0085] Furthermore, in order to perform image processing on the image to be identified, in this embodiment, step S203 includes: when the comparison result is a comparison failure, increasing the transparency of the occlusion image corresponding to the occlusion plant; enhancing the clarity of the occlusion part in the plant to be identified, and obtaining the processed image.
[0086] It should be understood that when the comparison result is a failure, the image processing method may be to increase the transparency of the occluded image and enhance the clarity of the occluded part in the plant to be identified. The method of enhancing the clarity may be sharpening or other methods, and a processed image can be obtained.
[0087] This embodiment obtains the occlusion area corresponding to the occluding plant in the image features. When the occlusion area is larger than a preset area, the occluding plant is compared with the plant to be identified to obtain a comparison result. If the comparison result fails, image processing is performed on the image to be identified based on the occlusion image corresponding to the occluding plant to obtain a processed image. This embodiment compares the occluding plant with the plant to be identified when the occlusion area is larger than the preset area. This allows for processing of the occluded part of the plant to be identified when the occlusion area of the occluding plant is large and the types of the plant to be identified and the occluding plant are different, resulting in a processed image. This effectively identifies the target plant in the processed image for target plant identification.
[0088] refer to Figure 4 , Figure 4 This is a flowchart illustrating the third embodiment of the plant identification method of the present invention.
[0089] Based on the above embodiments, in this embodiment, step S30 includes:
[0090] Step S301: Perform grayscale processing on the processed image to obtain a grayscale image;
[0091] It is understood that this embodiment can perform grayscale processing on the processed image. The specific grayscale processing method can be component method, maximum value method, average value method, weighted average method, etc. For details, please refer to the existing technology. This embodiment will not elaborate on this further.
[0092] Step S302: Determine the shape features of the target plant in the processed image based on the grayscale image;
[0093] It should be understood that this embodiment can determine the shape features of the target plant in the processed image based on the grayscale image, which may include features such as the outline and size of the target plant.
[0094] Furthermore, in order to accurately determine the shape features, in this embodiment, step S302 includes: performing edge extraction on the grayscale image to obtain edge feature information; extracting connected regions from the edge feature information; filtering the connected regions according to the connected components corresponding to the connected regions to obtain target connected regions; and determining the shape features corresponding to the target plant according to the target connected regions.
[0095] It is understood that this embodiment can perform edge extraction on grayscale images. Specifically, edge extraction can be performed using edge extraction operators, such as the Canny operator and the Sobel operator. After edge extraction, edge feature information can be obtained.
[0096] It should be understood that after obtaining the edge feature information, the connected regions in the edge feature information can be extracted, that is, the fully connected parts can be extracted. In reality, there may be multiple connected components corresponding to the connected regions, that is, there are multiple paths between two points, which are equivalent to multiple connected components. At this time, the connected regions can be filtered. The specific filtering method can be to select the largest connected region between two points or to select the smallest connected region. The specific setting can be set according to the actual situation. This embodiment does not impose specific restrictions on this, and the target connected region is obtained.
[0097] In practical implementation, the shape features of the target plant can be determined based on the target connected regions. Specifically, the target connected regions can be connected to obtain the shape features of the target plant.
[0098] Step S303: Determine the leaf image corresponding to the target plant based on the grayscale image;
[0099] Understandably, this embodiment can determine the leaf image corresponding to the target plant based on the grayscale image. Specifically, the determination method can be to first obtain the connecting lines corresponding to the target connected region, that is, the lines that connect the target connected regions, and then obtain the curvature information corresponding to the connecting lines. The curvature information refers to the degree of curvature of the connecting lines. Based on the curvature information, the target connecting lines are selected from the connecting lines. The selection method can be to select the lines with a larger degree of curvature, because the lines with a smaller degree of curvature may be the roots of the plant. Then, the leaf image corresponding to the target plant is determined based on the target connecting lines. Connecting the target connecting lines will yield the leaf image corresponding to the target plant.
[0100] Step S304: Determine the texture features corresponding to the target plant based on the leaf image.
[0101] It should be understood that this embodiment can determine the texture features of the target plant based on the leaf image. Specifically, the determination method can be to obtain the grayscale histogram corresponding to the leaf image. The grayscale histogram can include each gray level and the frequency of each gray level. Then, the texture features of the target plant can be determined based on the gray levels and the corresponding frequencies in the grayscale histogram. In other words, the deeper veins in the target plant can be determined based on the gray levels and the corresponding frequencies.
[0102] This embodiment converts the processed image to grayscale to obtain a grayscale image. Then, based on the grayscale image, it determines the shape features of the target plant in the processed image. Next, it determines the leaf image corresponding to the target plant based on the grayscale image, and finally, it determines the texture features of the target plant based on the leaf image. This embodiment accurately obtains the shape and texture features of the target plant, ensuring the accuracy of subsequent plant identification.
[0103] Reference Figure 5 , Figure 5 This is a structural block diagram of the first embodiment of the plant identification device of the present invention.
[0104] like Figure 5 As shown, the plant identification device proposed in this embodiment of the invention includes:
[0105] The feature acquisition module 10 is used to acquire the image features corresponding to the occluded plant when the plant to be identified in the image to be identified is occluded.
[0106] Image processing module 20 is used to perform image processing on the image to be identified based on the image features to obtain a processed image;
[0107] The feature acquisition module 10 is also used to acquire the shape features and texture features corresponding to the target plant in the processed image;
[0108] The plant identification module 30 is used to identify the target plant based on the shape features and the texture features.
[0109] This embodiment obtains image features corresponding to the occluded plant when the plant to be identified in the image is obscured. Then, it processes the image based on these features to obtain a processed image. Next, it acquires the shape and texture features of the target plant in the processed image and identifies the target plant based on these features. This embodiment, by processing the image based on its features when the plant to be identified is obscured, effectively suppresses the influence of the obscured plant on the plant being identified. Furthermore, it identifies the target plant in the processed image based on its shape and texture features. Compared to existing methods that rely on manual plant identification, this embodiment can automatically and effectively identify plants when they are obscured, thereby improving the efficiency and accuracy of plant identification.
[0110] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.
[0111] In addition, for technical details not described in detail in this embodiment, please refer to the plant identification method provided in any embodiment of the present invention, which will not be repeated here.
[0112] Based on the first embodiment of the plant identification device of the present invention described above, a second embodiment of the plant identification device of the present invention is proposed.
[0113] In this embodiment, the image processing module 20 is further configured to obtain the occlusion area corresponding to the occluding plant in the image features; when the occlusion area is greater than a preset area, compare the occluding plant with the plant to be identified to obtain a comparison result; when the comparison result is a comparison failure, perform image processing on the image to be identified based on the occlusion image corresponding to the occluding plant to obtain a processed image.
[0114] Furthermore, the image processing module 20 is also used to increase the transparency of the occlusion image corresponding to the occluded plant when the comparison result is a comparison failure; and to enhance the clarity of the occluded part in the plant to be identified, so as to obtain the processed image.
[0115] Furthermore, the feature acquisition module 10 is also used to perform grayscale processing on the processed image to obtain a grayscale image; determine the shape features corresponding to the target plant in the processed image based on the grayscale image; determine the leaf image corresponding to the target plant based on the grayscale image; and determine the texture features corresponding to the target plant based on the leaf image.
[0116] Furthermore, the feature acquisition module 10 is also used to extract edges from the grayscale image to obtain edge feature information; extract connected regions from the edge feature information; filter the connected regions according to the connected components corresponding to the connected regions to obtain target connected regions; and determine the shape features corresponding to the target plant according to the target connected regions.
[0117] Furthermore, the feature acquisition module 10 is also used to acquire leaf features in the image to be identified, the leaf features including leaf color features and leaf shape features; acquire the arrangement information of the leaves in the image to be identified; and determine whether the plant to be identified in the image to be identified is occluded based on the leaf color features, the leaf shape features and the arrangement information.
[0118] Furthermore, the feature acquisition module 10 is also used to acquire leaf vein arrangement information, leaf arrangement information and petiole arrangement information in the arrangement information; and to determine whether the plant to be identified in the image to be identified is occluded based on the leaf color feature, the leaf shape feature, the leaf vein arrangement information, the leaf arrangement information and the petiole arrangement information.
[0119] Other embodiments or specific implementations of the plant identification device of the present invention can be referred to the above-described method embodiments, and will not be repeated here.
[0120] Furthermore, embodiments of the present invention also propose a storage medium storing a plant identification program, which, when executed by a processor, implements the steps of the plant identification method described above.
[0121] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0122] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0123] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory / random access memory, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0124] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A plant identification method, characterized in that, The plant identification method includes the following steps: When the plant to be identified in the image is occluded, the image features corresponding to the occluded plant are obtained; The image to be identified is processed according to the image features to obtain the processed image; Obtain the shape and texture features of the target plant in the processed image; The target plant is identified based on the shape and texture features. The step of processing the image to be identified based on the image features to obtain the processed image specifically includes: Obtain the occlusion area corresponding to the occluding plants in the image features; When the shading area is greater than a preset area, the shading plant is compared with the plant to be identified to obtain the comparison result; When the comparison result is a failure, the transparency of the occlusion image corresponding to the occluded plant is increased; The clarity of the obscured parts of the plant to be identified is enhanced to obtain a processed image.
2. The plant identification method as described in claim 1, characterized in that, The step of obtaining the shape and texture features of the target plant in the processed image specifically includes: The processed image is then converted to grayscale to obtain a grayscale image. The shape features of the target plant in the processed image are determined based on the grayscale image. The leaf image corresponding to the target plant is determined based on the grayscale image; The texture features corresponding to the target plant are determined based on the leaf image.
3. The plant identification method as described in claim 2, characterized in that, The step of determining the shape features corresponding to the target plant in the processed image based on the grayscale image specifically includes: Edge extraction is performed on the grayscale image to obtain edge feature information; Extract connected regions from the edge feature information; The connected regions are filtered based on their corresponding connected components to obtain the target connected regions; The shape features corresponding to the target plant are determined based on the target connected region.
4. The plant identification method according to any one of claims 1 to 3, characterized in that, Before the step of obtaining the image features corresponding to the occluded plant when the plant to be identified in the image to be identified is occluded, the method further includes: Obtain leaf features from the image to be identified, the leaf features including leaf color features and leaf shape features; Obtain the arrangement information of the leaves in the image to be identified; Based on the leaf color features, leaf shape features, and arrangement information, it is determined whether the plant to be identified in the image is occluded.
5. The plant identification method as described in claim 4, characterized in that, The step of determining whether the plant to be identified in the image is occluded based on the leaf color features, the leaf shape features, and the arrangement information specifically includes: Obtain the leaf vein arrangement information, leaf blade arrangement information, and petiole arrangement information from the arrangement information; Based on the leaf color features, leaf shape features, leaf vein arrangement information, leaf arrangement information, and petiole arrangement information, it is determined whether the plant to be identified in the image is occluded.
6. A plant identification device, characterized in that, The plant identification device includes: The feature acquisition module is used to acquire the image features corresponding to the occluded plant when the plant to be identified in the image to be identified is occluded. The image processing module is used to perform image processing on the image to be identified based on the image features to obtain the processed image; The feature acquisition module is also used to acquire the shape features and texture features corresponding to the target plant in the processed image; A plant identification module is used to identify the target plant based on the shape features and the texture features; The image processing module is further configured to obtain the occlusion area corresponding to the occluding plant in the image features; when the occlusion area is greater than a preset area, compare the occluding plant with the plant to be identified to obtain a comparison result; when the comparison result is a failure, increase the transparency of the occlusion image corresponding to the occluding plant; enhance the clarity of the occluded part in the plant to be identified to obtain a processed image.
7. A plant identification device, characterized in that, The device includes: a memory, a processor, and a plant identification program stored in the memory and executable on the processor, the plant identification program being configured to implement the steps of the plant identification method as described in any one of claims 1 to 5.
8. A storage medium, characterized in that, The storage medium stores a plant identification program, which, when executed by a processor, implements the steps of the plant identification method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Image processing method and device, equipment and storage medium
CN114782659A
Crop monitoring method, system and device based on machine vision
CN115407771A