Recognition method of Panax plant leaves based on multi-feature extraction

Through the multi-feature extraction method, the characteristic pyramid network and deep neural network are used to identify the leaves of genus genus genus plants, solving the identification problems in the prior art and realizing the fine-grained identification of leaves of genus genus plants.

CN115578603BActive Publication Date: 2025-08-22UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202211412873.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-11
Publication Date
2025-08-22
Estimated Expiration
2042-11-11

AI Technical Summary

Technical Problem

The prior art is difficult to effectively identify the fine-grain difference in leaves of genus genus plants, making it difficult for non-professional personnel to accurately distinguish genus genus plants.

Method used

The method based on multi-feature extraction is adopted, including sharpening processing, feature pyramid network FPN, window overlapping grayscale LBP feature descriptor and guide filtering Canny operator, and the global features, shape features, texture features and leaf vein features of the leaves of ginseng plants were extracted, and classified and identified in combination with deep neural networks.

Benefits of technology

The fine-grained object recognition of leaves of ginseng plants is achieved, the accuracy and efficiency of recognition are improved, and the problem of identification of leaves with inter-class similarity and intra-class differences is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115578603B_ABST
    Figure CN115578603B_ABST
Patent Text Reader

Abstract

The invention discloses a Panax notoginseng plant leaf recognition method based on multi-feature extraction, which relates to the field of plant recognition. The method comprises the following steps: acquiring an image; performing sharpening processing; converting the image into a grayscale image, performing background removal, noise removal and filling processing, extracting global features; extracting shape features, texture features and vein features; performing classification and recognition according to the extracted features by a classification model to obtain recognition results; extracting leaf image features based on a feature pyramid network connected by features, extracting leaf texture features based on window overlapping grayscale, rotation-invariant LBP feature descriptors and window adaptive gray-level co-occurrence matrix GLCM feature descriptors, extracting leaf vein features based on a Canny operator using guided filtering, and obtaining leaf classification results by using connected feature vectors. The method has a good effect on fine-grained object recognition of Panax notoginseng plant leaves, and solves the problem that current leaf recognition algorithms cannot recognize leaves with high inter-class similarity and intra-class difference.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of plant identification, and in particular to a Panax plant leaf identification method based on multi-feature extraction. Background Art

[0002] Accurate identification of Chinese medicinal materials is crucial for the use of Chinese medicine. Different Panax herbs have different medicinal properties. If ginseng, American ginseng, Panax notoginseng and other herbs are used as substitutes for medication, it will affect the safety and effectiveness of the use of Chinese medicine. For Panax plants that have not yet been harvested in a planting environment, they can be identified by observing the berries and leaves. The leaves of Panax plants are mostly palmate compound leaves, which are bundled or fan-shaped with raised veins, and have a high degree of similarity, while the berries have a shorter existence period and are more difficult to observe differences than leaves. Therefore, it is usually difficult for non-professionals to quickly identify Panax plants by observing berries and leaves. The following prior arts disclose techniques for plant identification:

[0003] Patent "CN107122781B A plant leaf recognition method based on leaf shape and edge features" provides a plant leaf recognition method that uses leaf shape features to capture the global information of the leaf, uses leaf edge features to capture the detailed information of the leaf and the concavity and convexity of the leaf edge points, and uses Fourier transform to reduce the dimensionality of the extracted features to save memory and speed up recognition.

[0004] Patent "CN104850822B Leaf recognition method in a simple background based on multi-feature fusion" segments the leaf image based on the Otsu threshold method, separating the leaves from the background; extracts the descriptors of the contour shapes and collective features of multiple leaves from the segmented leaf image, and finally uses local sensitive hashing and a custom weighted confidence scoring algorithm to fuse and match the extracted multiple features to obtain the final recognition result.

[0005] The appearance of Panax ginseng leaves has high inter-class similarity and intra-class difference. Existing leaf recognition methods are often based on a combination of leaf shape features and edge features, or based on leaf geometric features. However, it is still difficult to achieve fine-grained distinction and the recognition effect of Panax ginseng leaves is poor. Summary of the Invention

[0006] The purpose of the present invention is to design a Panax plant leaf recognition method based on multi-feature extraction in order to solve the above problems.

[0007] The present invention achieves the above-mentioned purpose through the following technical solutions:

[0008] The Panax genus plant leaf recognition method based on multi-feature extraction includes:

[0009] S1. Acquire an image of a Panax plant leaf;

[0010] S2, sharpening the leaf image;

[0011] S3, converting the sharpened image into a grayscale image, and sequentially performing background removal using an iterative threshold selection method, noise removal using a median filter method, and filling using a grayscale morphological closing operation on the grayscale image;

[0012] S4. Using the feature pyramid network (FPN) to extract the global features of the ginseng plant leaves from the sharpened image;

[0013] S5, extracting shape features, texture features, and vein features of the leaves of the Panax genus plant through the image processed by S3;

[0014] S6. The classification model classifies and identifies Panax ginseng plants based on global features, shape features, texture features, and vein features to obtain recognition results.

[0015] The beneficial effects of the present invention are as follows: the method extracts leaf image features based on a feature pyramid network of feature connection, extracts leaf texture features based on window overlapping grayscale, rotation-invariant LBP feature descriptors and window adaptive gray-level co-occurrence matrix GLCM feature descriptors, extracts leaf vein features based on a Canny operator of guided filtering, and then classifies leaves through connected feature vectors to obtain classification results. The method has a good effect on fine-grained object recognition of Panax plant leaves, and solves the problem that current leaf recognition algorithms cannot recognize leaves with high inter-class similarity and intra-class difference. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 1 is a flow chart of a method for identifying Panax plant leaves based on multi-feature extraction according to the present invention;

[0017] Figure 2 Schematic diagram of the feature pyramid network FPN of the present invention;

[0018] Figure 3 It is a flow chart of feature extraction and classification of the present invention. DETAILED DESCRIPTION

[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings of the embodiments of the present invention. It should be understood that the described embodiments are only a portion of the embodiments of the present invention, not all of them. Generally, the components of the embodiments of the present invention described and illustrated in the drawings herein may be arranged and designed in a variety of different configurations.

[0020] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but rather merely represents selected embodiments of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort shall fall within the scope of protection of the present invention.

[0021] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.

[0022] In the description of the present invention, it should be understood that the terms "upper", "lower", "inside", "outside", "left", "right", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, or are the orientations or positional relationships in which the inventive product is conventionally placed when in use, or are the orientations or positional relationships conventionally understood by those skilled in the art. These are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or component referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0023] Furthermore, the terms “first”, “second”, etc. are merely used for distinguishing descriptions and should not be understood as indicating or implying relative importance.

[0024] In the description of the present invention, it should also be noted that, unless otherwise expressly specified or limited, terms such as "disposed" and "connected" should be understood in a broad sense. For example, "connected" can mean a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium; it can also mean internal communication between two components. Those skilled in the art will be able to understand the specific meanings of the above terms in the present invention based on specific circumstances.

[0025] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0026] The Panax genus plant leaf recognition method based on multi-feature extraction includes:

[0027] S1. Obtain an image of a Panax plant leaf. Use a mobile phone or camera to photograph the Panax plant leaf. The shooting angle is perpendicular to the leaf plane. Set a fixed shooting distance of 20 cm to ensure that the size of the photographed leaf is within a fixed range.

[0028] S2. Sharpening the leaf image; specifically:

[0029] Before sharpening, the original image is cropped using the Fotor image cropping tool to remove the petiole of the leaf. The image is horizontally mirrored to mirror any point P(x0, y0) of the cropped leaf image horizontally to a new position P′(x, y). The transformation formula is: Among them, f W is the width of the original image; then the image is rotated to adjust the main vein direction to the vertical direction, and any point P′(x0, y0) of the leaf image output after horizontal mirror transformation is rotated clockwise by an angle α to reach the new position R(x, y). The transformation formula is Among them, α is the angle between the main vein direction and the vertical direction;

[0030] S21, use the Sobel operator to perform filtering calculation, take any pixel point R (x0, y0) of the leaf image as the center, intercept a 3×3 pixel window, and calculate the gradient S of the center pixel of the window in the x and y directions respectively. x 、S y :S x =[R(x0-1,y0+1)+2R(x0,y0+1)+R(x0+1,y0+1)]-[R(x0-1,y0-1)+2R(x0,y0-1)+R(x0+1,y0-1)]

[0031] S y =[R(x0+1,y0-1)+2R(x0+1,y0)+R(x0+1,y0+1)]-[R(x0-1,y0-1)+2R(x0-1,y0)+R(x0-1,y0+1)]

[0032] The enhanced grayscale R′(x0, y0) of the pixel R(x0, y0) is obtained as follows:

[0033]

[0034] Iteratively calculate all pixels of the leaf image to obtain the pixel grayscale set R′;

[0035] S22. Stack R′ with the rotated leaf image to obtain the sharpened image R′. Since the Sobel operator introduces weighted averaging, it has a certain smoothing effect on the random noise in the image. Also, since the difference between two rows or columns is used, the pixels on both sides of the edge are enhanced, and the edge of the sharpened image appears rough and bright.

[0036] S3, converting the sharpened image R′ into a grayscale image, and sequentially performing background removal using an iterative threshold selection method, noise removal using a median filter method, and filling using a grayscale morphological closing operation on the grayscale image;

[0037] The sharpened image is converted into a grayscale image: The weighted method is used to convert the sharpened color image into a grayscale image G, which is expressed as gray = 0.299*R+0.578*G+0.114*B, where R, G, and B represent the red, green, and blue channel values ​​of each pixel, respectively. At the same time, linear stretching is used to enhance the grayscale image. The stretched grayscale image G′ is expressed as:

[0038]

[0039] Among them, A and B represent the minimum grayscale and maximum grayscale of the grayscale image G respectively, GrayValue min and GrayValue max Respectively represent the minimum grayscale and maximum grayscale of the stretched image, which are 20 and 240 respectively in this embodiment;

[0040] Remove background:

[0041] ① Calculate the initial grayscale threshold T = (A + B) / 2, where A and B are the minimum and maximum grayscale levels of the image respectively;

[0042] ② According to the threshold T, the leaf image is divided into foreground and background, and the average gray value Z of the two is calculated respectively. O , Z B ;

[0043] ③Calculate the new threshold T=(Z O +Z B ) / 2;

[0044] ④ Iterate steps ② and ③ until the threshold T no longer changes, then T is the final threshold. At this point, the foreground and background of the leaf grayscale image are separated, and the grayscale image B after removing the background is obtained;

[0045] Noise removal: Take a 3*3 window based on the target pixel B(x0, y0) of the grayscale image B after background removal, and assign the median grayscale value of the pixel in the neighborhood window to the target pixel B(x0, y0), which is expressed as:

[0046] B'(x0, y0)=med{B(x0+m, y0+n)}

[0047] Where m and n represent the distance between the pixel in the window and the target pixel, and m and n ∈ [-1, 1] are integers. All pixels of the grayscale image B with background removed are traversed to remove noise, and a grayscale image B′ with noise removed is obtained. The median filter method is simple and efficient, and can protect the image details while removing noise.

[0048] Filling process: Filling process includes dilation and erosion operations in sequence. The dilation operation is to move the pixel point (m, n) units for the grayscale value at the grayscale image B'(x, y) after noise removal, add the grayscale value of the structuring element K(m, n), and then take the maximum value of the grayscale value set as the result of grayscale dilation, which is expressed as:

[0049]

[0050] The erosion operation is to move the pixel point (m, n) units for the grayscale value at the grayscale image H(x, y) of the dilation operation, subtract the grayscale value of the structuring element K(m, n), and then take the minimum value of the grayscale value set as the result after grayscale erosion, which is expressed as:

[0051]

[0052] Among them, H represents the grayscale image output after the dilation operation, I represents the grayscale image output after the erosion operation, and K represents the structuring element for dilation or erosion operation on the grayscale image. The structuring element uses image components with a certain size and shape. represents the grayscale morphological dilation operation, Represents the grayscale morphological corrosion operation, m, n represent the displacement distance of the pixel point, m, n∈[-1,1] and m, n are integers;

[0053] Repeat the filling process until the blade holes are eliminated.

[0054] S4. The feature pyramid network FPN is used to extract the global features of the leaves of the ginseng plant from the sharpened image; specifically, the feature pyramid network FPN includes an input layer, layer 1, layer 2, layer 3, layer 4, layer 5, layer 6 and an output layer; the input layer is used to input the sharpened image; layer 1, layer 2 and layer 3 are bottom-up ResNet networks; layer 3 is copied to obtain layer 4; an upsampling operation is performed on layer 4, and a 1*1 convolution operation is performed on layer 2 to correct the number of channels, and then the processed layers 2 and 4 are horizontally connected to obtain layer 5; an upsampling operation is performed on layer 5, a 1*1 convolution operation is performed on layer 1, and then the processed layers 1 and 5 are horizontally connected to obtain layer 6; global average pooling operations are performed on layers 4, 5 and 6 respectively, and then connected to obtain the global features output by the output layer. The feature pyramid network FPN of this method connects the feature map outputs of each layer, which can obtain more semantic information and reduce redundant features.

[0055] S5, extracting shape features, texture features, and vein features of the leaves of the ginseng plant from the image processed by S3;

[0056] The extracted shape features include:

[0057] A. Gamma correction method is used to perform color standardization on the grayscale image processed by S3;

[0058] B. Calculate the gradient of each pixel in the image. The gradient includes magnitude and direction.

[0059] C. Divide the image into 6*6 pixel units, calculate the gradient histograms in 9 directions within the unit, and form the HOG feature descriptor of each unit. The range of the histogram description is 0-180°, that is, 20° represents one direction;

[0060] D. Each 3*3 unit is grouped into a block, and the feature vectors of all units in the block are concatenated and normalized to obtain the HOG feature descriptor of the block;

[0061] E. Concatenate the HOG feature descriptors of all blocks of the leaf grayscale image to obtain the leaf shape features; use principal component analysis (PCA) to perform feature dimensionality reduction to obtain the leaf shape features after dimensionality reduction.

[0062] Extracting texture features includes:

[0063] a. Set the local window size of LBP to 3*3, set the upper left corner of the grayscale image processed by S3 as the initial position of the local window, and perform center point sampling; set the sampling radius R = 1, the sampling point P = 8, and the row and column sliding windows to 2 for uniform sampling;

[0064] b. Slide the window from left to right and from top to bottom to traverse the center point to calculate the grayscale and rotation-invariant LBP value, and iterate to complete the calculation of all pixel center points to obtain The matrix output is expressed as:

[0065]

[0066] Among them, S represents the comparison between the gray value of the center point and the gray value of the sampling point, i c Represents the grayscale value of the center pixel, i n Indicates the gray value of the nth sampling point in sequence; U(LBP P,R ) is a consistency measure for LBP, corresponding to the number of spatial transitions in the pattern, i.e., bitwise 0 / 1 transformations; i0 represents the gray value of the first sampling point in order, i P-1Represents the grayscale value of the Pth sampling point in sequence, and the mode with a U value not exceeding 2 is designated as uniform. The superscript riu2 indicates the use of the rotation-invariant uniform mode. The grayscale and rotation-invariant local binary pattern (LBP) feature descriptor based on window overlap reduces the matrix dimension of the image grayscale. The windows only partially overlap. Compared with completely overlapping windows, the calculation of pixel LBP is reduced, and the correlation between pixels is retained. More features can be obtained than non-overlapping windows.

[0067] c. Set the grayscale level of the image to N = 4 and the step size d to 1;

[0068] d. Calculate the gradient of each pixel and select a sliding window. When the gradient is 0, select a sliding window of 5*5; when the gradient is not 0, select a sliding window of 17*17;

[0069] e. Select the corresponding matrix window according to the pixel gradient. The matrix output performs statistical gray-level co-occurrence matrices at four directions: 0°, 45°, 90°, and 135°, and obtains four 4*4 statistical matrices.

[0070] f. Divide each element of the statistical matrix by the sum of all elements in the statistical matrix, perform matrix normalization, and obtain the probability matrix;

[0071] g. Calculate the eigenvalues ​​based on the probability matrix. The eigenvalues ​​include: the energy ASM that reflects the uniformity of the image grayscale distribution and the coarseness of the texture. i ∑ j P R (i, j) 2 , Contrast that reflects image clarity and texture groove depth CON = ∑ i ∑ j (ij) 2 P R (i, j), the correlation degree reflecting the local grayscale correlation of the image CORRLN = [∑ i ∑ j ((i,j)P R (i, j))-μ i μ j ] / σ i σ j And the entropy ENT that can reflect the randomness of image texture = -∑ i ∑ j P R (i, j)logP R (i, j), where i and j represent the grayscale values ​​of two levels that appear simultaneously in two pixels in a certain direction, P R (i, j) represents the probability of two pixels appearing in this situation, and the average value μ i =∑i ∑ j i·P R (i, j), variance

[0072] h. Calculate the eigenvalues ​​of the four direction matrices and perform an averaging operation on the eigenvalues ​​corresponding to all statistical directions;

[0073] i. Move the sliding window and iterate the calculation until all image pixels are traversed, and finally output the 8-dimensional texture feature containing the mean and standard deviation of the eigenvalue.

[0074] Extracting leaf vein features includes:

[0075] 1) Use guided filtering to smooth the grayscale image after S3 processing. The filter formula is as follows:

[0076]

[0077] Among them, I is the grayscale image processed by S3, p j is the filtered image pixel input within the window, q i is the output image pixel after filtering, and W is the weight taken in the weighted average operation determined based on O. The calculation formula of W is as follows:

[0078]

[0079] Among them, μ k is the mean value of the pixels in the window centered at pixel k, |ω| is the number of pixels in the window, and I i , I j Refers to the value of two adjacent pixels, σ k Represents the variance of the window class pixels, ∈ represents the penalty value. Guided filtering can retain more image edges and their connectivity, and has a better effect on image detail processing. Moreover, the time complexity of guided filtering is independent of the window size.

[0080] 2) Perform leaf vein edge detection using the Canny operator on the smoothed and corrected grayscale image, calculate the pixel gradient amplitude and direction using the Sobel operator, and find the image gradient;

[0081] 3) Apply non-maximum suppression technology to filter out non-edge pixels;

[0082] 4) Using a double threshold method to determine the vein edge to obtain a vein grayscale image L;

[0083] 5) Use grayscale morphological opening operation to process the vein edge and connect the edge pixels in the broken area, that is, corrosion operation first Post-expansion operation Among them, M represents the leaf vein grayscale image output after the corrosion operation, K represents the structural element, represents the dilation operation, Represents an erosion operation. After two operations, the broken areas of the leaf veins are connected;

[0084] 6) Compare the number of current leaf vein edge pixel points with the number of previous leaf vein edge pixel points to see if they have changed. If so, return to 3); otherwise, output the leaf vein edge feature and enter S6.

[0085] S6. The classification model classifies and identifies Panax plants based on global features, shape features, texture features, and vein features. Specifically, the global features extracted from the leaf image are concatenated with the leaf shape features, texture features, and vein features. The concatenated features are sequentially passed through a dropout layer, a fully connected layer, a batch normalization layer, and a softmax classifier to obtain a probability matrix for the leaf. The label corresponding to the maximum probability is selected as the final predicted category of the Panax plant leaf. The model is trained using a sparse cross entropy loss function, expressed as follows:

[0086]

[0087] Where n is the number of ginseng plant leaves included in the dataset, y is the true label, and a is the predicted label. The network model diagram for feature extraction and classification is shown in the figure Figure 3 shown.

[0088] This paper proposes a method for identifying Panax ginseng leaves based on a deep neural network and leaf shape, texture, and vein features. A feature pyramid network based on feature connection is proposed for leaf image feature extraction. A windowed overlapping grayscale, rotationally invariant LBP feature descriptor and a windowed adaptive gray-level co-occurrence matrix (GLCM) feature descriptor are proposed for leaf texture feature extraction. A guided filtering-based Canny operator is proposed for leaf vein feature extraction. The leaves are then classified using the connected feature vectors to obtain classification results.

[0089] Compared with the existing leaf recognition technology, the solution proposed in the present invention has a better effect on fine-grained object recognition of Panax plant leaves, solving the problem that the current leaf recognition algorithm cannot recognize leaves with high inter-class similarity and intra-class difference.

[0090] The technical solution of the present invention is not limited to the above-mentioned specific embodiments. Any technical variations made according to the technical solution of the present invention fall within the protection scope of the present invention.

Claims

1. A method for identifying Panax genus leaves based on multi-feature extraction, characterized in that: include: S1. Acquire an image of a Panax plant leaf; S2, sharpening the leaf image; S3. The sharpened image is converted into a grayscale image, and the grayscale image is sequentially processed by removing the background using the iterative threshold selection method, removing the noise using the median filter method, and filling the grayscale image using the grayscale morphological closing operation; the grayscale morphological closing operation is used to fill the image until the leaf holes are eliminated. The filling process includes dilation and erosion operations in sequence. The dilation operation is used to remove the noise from the grayscale image. The grayscale value at , moves the pixel point (m, n) units, adds the grayscale value of the structuring element K(m, n), and then takes the maximum value of the grayscale value set as the result of grayscale expansion, which is expressed as: , The erosion operation is the grayscale image after the dilation operation The grayscale value at , moves the pixel point (m, n) units, subtracts the grayscale value of the structuring element K (m, n), and then takes the minimum value of the grayscale value set as the result after grayscale corrosion: , Among them, H represents the grayscale image output after the dilation operation, I represents the grayscale image output after the erosion operation, and K represents the structuring element for dilation or erosion operation on the grayscale image. The structuring element uses image components with a certain size and shape. represents the grayscale morphological dilation operation, Represents the grayscale morphological corrosion operation, m and n represent the displacement distance of the pixel point, m, And m, n are integers; S4. The feature pyramid network FPN is used to extract the global features of the leaves of the ginseng plant from the sharpened image; the feature pyramid network FPN includes an input layer, layer 1, layer 2, layer 3, layer 4, layer 5, layer 6 and an output layer; the input layer is used to input the sharpened image; layer 1, layer 2 and layer 3 are bottom-up ResNet networks; layer 3 is copied to obtain layer 4; an upsampling operation is performed on layer 4, and a 1*1 convolution operation is performed on layer 2 to correct the number of channels, and then the processed layers 2 and 4 are horizontally connected to obtain layer 5; an upsampling operation is performed on layer 5, a 1*1 convolution operation is performed on layer 1, and then the processed layers 1 and 5 are horizontally connected to obtain layer 6; global average pooling operations are performed on layers 4, 5 and 6 respectively, and then connected to obtain the global features output by the output layer; S5, extracting shape features, texture features, and vein features of the leaves of the ginseng plant from the image processed by S3; S6. The classification model classifies and identifies Panax ginseng plants based on global features, shape features, texture features, and vein features to obtain recognition results.

2. The Panax plant leaf recognition method based on multi-feature extraction according to claim 1, characterized in that: In S5, the shape feature extraction specifically includes: A. Gamma correction method is used to perform color standardization on the grayscale image processed by S3; B. Calculate the gradient of each pixel in the image. The gradient includes magnitude and direction. C. Divide the image into 6*6 pixel units, calculate the gradient histograms in 9 directions within the unit, and form the HOG feature descriptor of each unit. The range of the histogram description is 0-180°, that is, 20° represents one direction; D. Each 3*3 unit is grouped into a block, and the feature vectors of all units in the block are concatenated and normalized to obtain the HOG feature descriptor of the block; E. Concatenate the HOG feature descriptors of all blocks of the leaf grayscale image to obtain the leaf shape features; use principal component analysis (PCA) to perform feature dimensionality reduction to obtain the leaf shape features after dimensionality reduction.

3. The Panax plant leaf recognition method based on multi-feature extraction according to claim 1, characterized in that: Extracting texture features specifically includes: a. Set the local window size of LBP, set the upper left corner of the grayscale image processed by S3 as the initial position of the local window, and perform center point sampling; set the sampling radius R, sampling point P, and the sliding window of rows and columns for uniform sampling; b. Slide the window from left to right and from top to bottom to traverse the center point to calculate the grayscale and rotation-invariant LBP value, and iterate to complete the calculation of all pixel center points to obtain The matrix output is expressed as: , Among them, S represents the comparison between the gray value of the center point and the gray value of the sampling point. Represents the grayscale value of the center pixel, Indicates the grayscale value of the nth sampling point in sequence; It is a consistency measure of LBP, corresponding to the number of spatial transitions in the pattern, i.e., bitwise 0 / 1 transformations; , Indicates the grayscale value of the first sampling point in sequence, It represents the gray value of the Pth sampling point in sequence, and the mode with U value not exceeding 2 is designated as uniform. The superscript riu2 indicates the use of the rotation-invariant uniform mode; c. Set the grayscale level N of the image to 4 and the step size d to 1; d. Calculate the gradient of each pixel and select a sliding window; e. Select the corresponding matrix window according to the pixel gradient. The matrix output performs statistical gray-level co-occurrence matrices at four directions: 0°, 45°, 90°, and 135°, and obtains four 4*4 statistical matrices. f. Divide each element of the statistical matrix by the sum of all elements in the statistical matrix, perform matrix normalization, and obtain the probability matrix; g. Calculate the eigenvalues ​​based on the probability matrix. The eigenvalues ​​include: the energy that reflects the uniformity of the image grayscale distribution and the coarseness of the texture , reflecting the contrast of image clarity and texture groove depth , the correlation degree reflecting the local grayscale correlation of the image and entropy that reflects the randomness of image texture , where i and j represent the grayscale values ​​of two levels that appear simultaneously in two pixels in a certain direction. Indicates the probability of two pixels appearing in this situation, the average value ,variance ; h. Calculate the eigenvalues ​​of the four direction matrices and perform an averaging operation on the eigenvalues ​​corresponding to all statistical directions; i. Move the sliding window and iterate the calculation until all image pixels are traversed, and finally output the 8-dimensional texture feature containing the mean and standard deviation of the eigenvalue.

4. The Panax plant leaf recognition method based on multi-feature extraction according to claim 1, characterized in that: Extracting leaf vein features specifically includes: 1) Use guided filtering to smooth the grayscale image after S3 processing. The filter formula is as follows: , Among them, I is the grayscale image processed by S3, is the filtered image pixel input within the window, is the output image pixel after filtering, and W is the weight taken in the weighted average operation determined according to I. The calculation formula of W is as follows: , in, is the mean value of the pixels in the window centered at pixel k, is the number of pixels within the window, 、 Refers to the value of two adjacent pixels. Represents the variance of window-like pixels, Represents the penalty value; 2) Perform leaf vein edge detection using the Canny operator on the smoothed and corrected grayscale image, and calculate the pixel gradient amplitude and direction using the Sobel operator to find the image gradient; 3) Apply non-maximum suppression technology to filter out non-edge pixels; 4) Use the double threshold method to determine the vein boundaries; 5) Use grayscale morphological opening operation to process the vein edges and connect the edge pixels in the broken area; 6) Compare the number of pixel points at the edge of the current leaf vein with the number of pixel points at the edge of the previous leaf vein to see if they have changed. If so, return to 3), otherwise enter S6.

5. The Panax plant leaf recognition method based on multi-feature extraction according to claim 1, characterized in that: Global features, shape features, texture features, and vein features were connected and imported into a classification model to obtain a probability matrix for the leaf. The label corresponding to the maximum probability was selected as the recognition result of the Panax ginseng leaf. The classification model included a dropout layer, a fully connected layer, a batch normalization layer, and a Softmax classifier.

6. The Panax plant leaf recognition method based on multi-feature extraction according to claim 1, characterized in that: Sharpening an image involves: S21, use Sobel operator to perform filtering calculation, and take any pixel point of the leaf image as As the center, intercept a 3×3 pixel window and calculate the gradient S of the center pixel of the window in the x and y directions respectively. x 、S y : , , Get pixel points Enhanced grayscale for: , Iterate all pixels of the leaf image to obtain the pixel grayscale set ; S22, will The sharpened image R' is obtained by stacking it with the leaf image.

7. The Panax plant leaf recognition method based on multi-feature extraction according to claim 1, characterized in that: The sharpened image R' is converted into a grayscale image and linearly stretched to obtain a stretched grayscale image G'. The background of the stretched grayscale image G' is removed, specifically including: ① Calculate the initial grayscale threshold T=(A+B) / 2, where A and B are the minimum and maximum grayscale levels of the image respectively; ② According to the threshold T, the leaf image is divided into foreground and background, and the average gray value of the two is calculated respectively. 、 ; ③Calculate the new threshold ; ④ Iterate steps ② and ③ until the threshold T no longer changes. Then T is the final threshold, and the grayscale image B after background removal is obtained.

8. The Panax plant leaf recognition method based on multi-feature extraction according to claim 7, characterized in that: The specific process of removing noise is as follows: the target pixel of grayscale image B is removed according to the background Take a 3*3 window and assign the median grayscale value of the pixel in the neighborhood window to the target pixel , expressed as: , Among them, m and n represent the distance between the pixel point in the window and the target pixel point, m, Where m and n are integers; noise is removed from all pixels of the grayscale image B after background removal to obtain a grayscale image B' after noise removal.

Citation Information

Patent Citations

  • Leaf Recognition Method in a Simple Background Based on Multi-Feature Fusion

    CN104850822B

  • A method for plant leaf identification based on leaf shape and edge features

    CN107122781B

  • Leaf image multi-feature integrated plant species identification method and device

    CN106295661A

  • Method and system for leaf age estimation based on morphological features extracted from segmented leaves

    US20220130051A1