CN117853937A - Rice disease identification method and system based on secondary color cluster analysis - Google Patents

Rice disease identification method and system based on secondary color cluster analysis Download PDF

Info

Publication number
CN117853937A
CN117853937A CN202410264215.8A CN202410264215A CN117853937A CN 117853937 A CN117853937 A CN 117853937A CN 202410264215 A CN202410264215 A CN 202410264215A CN 117853937 A CN117853937 A CN 117853937A
Authority
CN
China
Prior art keywords
color histogram
dimensional
color
histogram
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410264215.8A
Other languages
Chinese (zh)
Other versions
CN117853937B (en
Inventor
田颖
徐文博
王改革
魏国栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jilin Agricultural University
Original Assignee
Jilin Agricultural University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jilin Agricultural University filed Critical Jilin Agricultural University
Priority to CN202410264215.8A priority Critical patent/CN117853937B/en
Publication of CN117853937A publication Critical patent/CN117853937A/en
Application granted granted Critical
Publication of CN117853937B publication Critical patent/CN117853937B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses a rice disease identification method and system based on secondary color cluster analysis, the method comprises the steps of classifying and collecting rice leaf disease images and disease-free images through a high-resolution camera, preprocessing each collected image, realizing front background segmentation, carrying out color space conversion, converting the collected RGB images into HSV color space, generating a two-dimensional color histogram by utilizing an H channel and an S channel, learning the characteristics, morphological characteristics and the like of the two-dimensional color histograms of the collected disease-free images and known disease images, and the like. The identification of rice diseases can be stably completed in a complex environment while the robustness in the identification process is ensured.

Description

Rice disease identification method and system based on secondary color cluster analysis
Technical Field
The invention relates to the technical field of image target identification, in particular to a rice disease identification method and system based on secondary color cluster analysis.
Background
The rice is one of the most important grain crops in China, and the yield and the quality of the rice have important significance for guaranteeing the national grain safety. However, the occurrence of rice diseases seriously affects the growth and yield of rice, and brings great economic loss to agricultural production. Therefore, accurate identification of rice diseases is a key link for preventing and treating diseases and improving rice yield. The intelligent identification technology for various diseases such as common rice blast and rice sheath blight of rice becomes an important point for guaranteeing safe production of rice, but the traditional identification method has the problems of poor robustness, low identification precision and the like. Therefore, there is a need to provide an improved rice disease identification method to solve the existing disadvantages.
The color feature statistical method is an effective rice disease identification method, and is mainly used for identification by adopting a color histogram in the research at present. Typically, a color histogram is first generated from color features in the image. Then, the color distribution differences between the different images are compared by comparing the counted color histograms. And finally, comparing the color histogram of the disease-free image with the target color histogram by a similarity measurement method, and identifying the category of the current target image.
However, in the process of extracting color features, the conventional color histogram focuses on primary color information, that is, pixels in the histogram occupy relatively high bins, and ignores secondary color feature information that occupies relatively low and important in the histogram. Resulting in a less variance between the disease-free image and the disease-free image in the process of comparing the color histograms. Secondly, the problem of insufficient texture characteristics exists in both the image with the disease and the image without the disease of the rice, so that enough characteristic points are difficult to extract for matching by a method for extracting the characteristic points.
Disclosure of Invention
This section is intended to outline some aspects of embodiments of the invention and to briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section as well as in the description summary and in the title of the application, to avoid obscuring the purpose of this section, the description summary and the title of the invention, which should not be used to limit the scope of the invention.
Therefore, the invention aims to provide a rice disease identification method and system based on secondary color cluster analysis, which can effectively avoid the problem that few important secondary color information is ignored in the prior art, and improve the difference between two images, namely no disease and disease of rice. The identification of rice diseases can be stably completed in a complex environment while the robustness in the identification process is ensured.
In order to solve the technical problems, according to one aspect of the present invention, the following technical solutions are provided:
a rice disease identification method based on secondary color cluster analysis comprises the following specific steps:
s10, classifying and collecting images with and without diseases of rice leaves through a high-resolution camera;
s20, preprocessing each collected image to realize front background segmentation;
s30, performing color space conversion, converting the acquired RGB image into an HSV color space, and generating a two-dimensional color histogram by utilizing an H channel and an S channel;
s40, learning two-dimensional color histogram features and morphological features of the acquired disease-free image and the known disease image;
s50, automatically calculating a threshold value through the mean value color histogram, dividing the two-dimensional color histogram into a main color histogram and a secondary color histogram, and normalizing;
s60, carrying out K-means cluster analysis on each bin in the obtained secondary color histogram, removing noise bin interference, and normalizing after inverse enhancement;
s70, coding and normalizing all secondary colors reserved in the clustering process according to gradient directions and gradient amplitudes through morphological analysis;
s80, generating one-dimensional feature vectors according to the primary and secondary color histogram information and morphological codes, and carrying out SVM classification recognition.
As a preferred scheme of the rice disease identification method based on secondary color cluster analysis, in the step S30, color space conversion is performed, the acquired RGB image is converted into HSV color space, and a specific step of generating a two-dimensional color histogram by using an H channel and an S channel is as follows:
performing color space conversion on the acquired RGB image, and transferring to an HSV color space;
removing the influence of the illumination of the V channel on the image, and dividing the image into a plurality of segments according to the value ranges of the H channel and the S channel;
and generating a two-dimensional color histogram consisting of the H channel and the S channel according to the number of the segments.
As a preferable scheme of the rice disease identification method based on secondary color cluster analysis, in the step S50, the threshold value is automatically obtained through the mean color histogramThe two-dimensional color histogram is divided into a primary color histogram and a secondary color histogram, and the specific steps of normalization are as follows:
taking the mean value of bin corresponding to the position of the two-dimensional color histogram of the image to be detected and the two-dimensional color histogram of the disease-free image, and generating a two-dimensional mean value color histogram;
the frequency of bin in the two-dimensional mean value color histogram is arranged into a one-dimensional color histogram according to the sequence from big to small;
using threshold valuesFinding the position of the best split primary and secondary colors in the one-dimensional color histogram;
averaging the frequencies of two adjacent bins around the position, wherein the average value is used as a threshold value for dividing the primary color and the secondary color in the two-dimensional color histogram;
dividing a two-dimensional color histogram of the image to be detected, dividing the two-dimensional color histogram into a primary color histogram and a secondary color histogram, and normalizing the primary color histogram and the secondary color histogram.
As a preferred scheme of the rice disease identification method based on secondary color cluster analysis, in the step S60, K-means cluster analysis is carried out on secondary colors to remove noise bin interference, and the specific steps of normalization after inverse enhancement are as follows:
setting the number of clusters, and carrying out cluster analysis on secondary colors by taking bin as a unit;
after clustering, according to the distribution condition of the pixel points in each cluster, calculating the variance of each clusterRemoving the bin of the cluster with larger variance;
removing the bin where the cluster with larger variance is located;
and carrying out inverting operation on the bin in the residual obtained secondary color histogram, and enhancing secondary color information.
As a preferred scheme of the rice disease identification method based on secondary color cluster analysis, in the step S70, the specific steps of coding and normalizing all secondary colors reserved in the clustering process according to the gradient directions and gradient magnitudes thereof through morphological analysis are as follows:
calculating the gradient direction and the amplitude of all the pixel points of the reserved clusters, generating a one-dimensional histogram according to the gradient direction, and reasonably setting intervals;
and sequentially arranging the frequencies of the bins in the one-dimensional histogram into one-dimensional feature vectors.
As a preferred scheme of the rice disease identification method based on secondary color cluster analysis, in the step S80, a one-dimensional feature vector is generated according to primary and secondary color histogram information and morphological codes, and the specific steps of classifying and identifying by SVM are as follows:
the primary and secondary color histograms are ordered into one-dimensional feature vectors according to frequency, respectively. And connected into a whole one-dimensional feature vector;
connecting one-dimensional feature vectors generated by the primary and secondary color histograms with morphological feature vectors;
three features, primary and secondary colors and morphological features are used to generate one-dimensional feature vectors, and an SVM classifier is used for classification.
A secondary color cluster analysis-based rice disease identification system comprising:
the image acquisition module is used for collecting image data of rice;
the image segmentation module is used for preprocessing each collected image to realize front background segmentation;
the two-dimensional histogram generation module is used for converting the RGB image into an HSV color space and generating a two-dimensional color histogram by utilizing H and S channels;
the feature learning module is used for learning the two-dimensional color histogram features and morphological features of the acquired disease-free and known disease sample images;
the threshold segmentation module utilizes dynamic threshold according to the generated mean value histogramDividing the two-dimensional color histogram into a primary color histogram and a secondary color histogram, and normalizing;
the secondary color cluster analysis module is used for carrying out cluster analysis on each bin of the secondary color histogram and removing noise bins with discrete distribution states of pixel points in the image; and taking inverse enhancement and then normalizing;
the secondary color feature morphology coding module codes and normalizes all secondary colors reserved in the clustering process according to gradient directions and gradient amplitudes through morphology analysis;
and the classification and identification module is used for carrying out classification and identification by using the SVM according to the primary and secondary color histogram information and the one-dimensional feature vector generated by morphological coding.
Compared with the prior art, the invention has the following beneficial effects: the rice disease identification method and system adopting secondary color cluster analysis can effectively extract and identify the primary color information and the secondary color information of rice leaves, solve the problem that only the primary color information is focused and the secondary color information is ignored in the traditional color histogram statistics process, and improve the accuracy and the robustness of disease identification; converting an RGB image into HSV space generates a two-dimensional color histogram, reduces complexity of data, and helps to mention processing efficiency and save storage space. And performing cluster analysis on the extracted secondary color information by adopting a K-means cluster analysis method, and solving the influence of the bin containing noise pixels in the secondary color histogram on the identification of rice diseases. The problem that disease features with similar color distribution cannot be distinguished only through color information can be solved by learning the feature morphology features of the secondary colors. The rice disease identification method adopting secondary color cluster analysis can effectively avoid the problem that few important secondary color information is ignored in the prior art, and improves the difference of two images, namely no disease and disease of rice. The identification of rice diseases can be stably completed in a complex environment while the robustness in the identification process is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following detailed description of the embodiments of the present invention will be given with reference to the accompanying drawings, which are to be understood as merely some embodiments of the present invention, and from which other drawings can be obtained by those skilled in the art without inventive faculty. Wherein:
FIG. 1 is a flowchart of a rice disease identification method based on secondary color cluster analysis provided by an example of the invention;
FIG. 2 is a flowchart of background segmentation before image preprocessing implementation provided by an embodiment of the present invention;
FIG. 3 is a flow chart of the separation of a mean color histogram into a primary color histogram and a secondary color histogram by a dynamic threshold provided by an example of the present invention;
FIG. 4 is a schematic diagram of a dynamic threshold value provided by an example of the present invention dividing a histogram into a primary color histogram and a secondary color histogram, and vice versa;
fig. 5 is a block diagram of a system for identifying rice diseases based on secondary color cluster analysis according to an embodiment of the present invention.
Detailed Description
In order that the above objects, features and advantages of the invention will be readily understood, a more particular description of the invention will be rendered by reference to the appended drawings.
The invention provides a rice disease identification method and system based on secondary color cluster analysis, which can effectively avoid the problem that few important secondary color information is ignored in the prior art, and improve the difference of two images, namely no disease and disease, of rice. The identification of rice diseases can be stably completed in a complex environment while the robustness in the identification process is ensured.
As shown in fig. 1, in one embodiment, a method for identifying rice diseases based on secondary color cluster analysis is provided, which specifically includes the following steps:
s10, classifying and collecting images of diseases and no diseases of rice leaves through a high-resolution camera, wherein the collected images comprise various actual conditions such as rotation, scale change, shielding, illumination change and the like so as to ensure sufficient data quantity, and various features can be better learned in a training stage;
s20, preprocessing each collected image to realize front background segmentation;
s30, converting the RGB image into an HSV color space, and generating a two-dimensional color histogram by utilizing an H channel and an S channel;
s40, learning two-dimensional color histogram features and morphological features of acquired disease-free and known disease sample images;
s50, obtaining a threshold value through the mean color histogramDividing the two-dimensional color histogram into a primary color histogram and a secondary color histogram, and normalizing;
s60, carrying out K-means cluster analysis on each bin in the obtained secondary color histogram, and removing noise bins with discrete distribution states of pixel points in the image; and taking inverse enhancement and then normalizing;
s70, coding and normalizing all secondary colors reserved in the clustering process according to gradient directions and gradient amplitudes through morphological analysis;
s80, generating one-dimensional feature vectors according to the primary and secondary color histogram information and morphological codes, and classifying and identifying by using the SVM.
In one embodiment, as shown in fig. 2, S20 may specifically include the following steps:
s21, converting the obtained RGB image into a gray image so as to further process and reduce the computational complexity.
S22, otsu threshold segmentation is carried out on the gray level image; specifically, by searching an optimal threshold, the inter-class variance between the foreground and the background is maximized, and the image is divided into the foreground and the background. A target region of interest is extracted. The Otsu thresholding method has the advantage that it is simple, fast and robust to illumination and contrast variations. Is very suitable for the field environment of paddy rice planting.
S23, filtering and smoothing processing are carried out, and noise in the image is removed.
S24, converting the obtained gray level image into an RGB image again.
In one embodiment, S30 may specifically include the following steps:
s31, converting the RGB image into an HSV color space;
specifically, in the experiment of the invention, RGB is converted into HSV space, and the color space is more in line with the perception system of human vision, so that the method has more intuitiveness; the color histogram generated by the H tone in the HSV color space with the value range of 0-360 degrees has the characteristics of large interval and discrete distribution, has more flexibility and is favorable for the identification of the colors in the example; meanwhile, the HSV can separate the brightness V independently, so that the influence of illumination change on experimental results is avoided.
S32, generating two-dimensional color histogram statistics for the H channel and the S channel; the size is set asThe method comprises the steps of carrying out a first treatment on the surface of the The specific numerical values may be changed as needed, and are not specifically defined in the embodiments of the present invention. Let the normalized two-dimensional color histogram of the image I to be detected be +.>
In one embodiment, S40, the two-dimensional color histogram features, and morphological features of the acquired disease-free and known disease sample images are learned. Learning and collecting two-dimensional color histogram features of disease-free images, and normalizing to generate feature vectors specifically as follows:
s41, accumulating and generating a two-dimensional color histogram by using disease-free images in the sample, normalizing the two-dimensional color histogram, and setting the two-dimensional color histogram asIn the embodiment of the present invention, the two-dimensional color histogram feature and the morphological feature sequence of the known disease sample image collected by learning in step S40 are adjustable in practical application, and the two-dimensional color histogram feature and the morphological feature sequence are just before step S80, and are mainly used as labels for classification and identification in SVM, which is not specifically specified in the embodiment of the present invention.
In one embodiment, as shown in fig. 3, S50 may specifically include the following steps:
s51, dynamic thresholdIs obtained by two-dimensional color histogram of disease-free sample and image to be matched>And->Calculating mean color histogram +.>To determine. Thus (S)>Is>Expressed as:
(1-1)
dynamically acquiring a threshold value by using the ratio of each color in the statistical analysis mean color histogram, and in the following formula (2-1), arranging non-zero bins in the two-dimensional color histogram in descending order according to the frequency size to form a one-dimensional color histogram
(2-1)
The threshold is set as:
(3-1)
wherein,and->Is a one-dimensional histogram->Bin in (2), and->And->Indicating the bin number. For obtaining->Accumulating the ordered color histogram frequencies in order from high frequency to low frequency, ++>For the accumulated value to start to be greater than +.>Sequence number of bin at time,/>Expressed as:
(3-2)
in an embodiment of the present invention,is a significant ratio of secondary colors for controlling the ratio of secondary colors in the histogram. Greater->More missing colours can be obtained, +.>Is a significant ratio of the dominant colors. />Representing from 1 to->Is the cumulative frequency of bin of +.>Is satisfied to be greater than->Is>Is a minimum of (2). Thus, if given->The value of +.2) can then be found by formula (3-2)>Then, the +.A is calculated by the formula (3-1)>。/>The value of (2) is not fixed and needs to be adjusted according to the actual situation by using +.>Dynamically calculating threshold->Dynamic threshold +.>Has more stable and excellent histogram decomposition effect.
S52, utilizing the two-dimensional color histogram of the image to be detected obtained in S51Decomposition into minor color histogram before major and reverse enhancement +.>And->For convenience of formula description subscript +>And->Omitted, then->And->Can be expressed as:
(4-1)
(4-2)
wherein,is an indicator function. If->Then->The method comprises the steps of carrying out a first treatment on the surface of the If->Then
The selection rules for the primary color and secondary color bin in the color histogram are defined according to the above formula. The bin in the primary color histogram is set according to a threshold: the value is kept unchanged when the value is larger than the threshold value, and the value is set to be zero when the value is smaller than or equal to the threshold value. For the secondary color histogram, bin is kept unchanged less than or equal to the threshold, and is set to zero greater than the threshold.
And S53, normalizing the obtained primary and secondary color histograms.
In one embodiment, S60 performs a K-means cluster analysis on each bin in the resulting secondary color histogram to remove noise bins for the discrete distribution of pixels in the image. And taking inverse enhancement and normalization. The method comprises the following specific steps:
s61, determining the number of clusters allocated to the detection image I according to the number of bins occupied by the secondary color in the histogram, wherein the number is generally slightly larger than the number occupied by the secondary color, and allocating the secondary color to the cluster represented by the center point closest to the secondary color.
And S62, updating the center point, and recalculating the center point of each cluster, namely, taking the average value of all objects in the cluster as a new center point.
And S63, iterating, and repeating the step S61 and the step S62 until the central point is not changed obviously any more.
S64, removing noise bin of the discrete distribution state of the pixels in the image.
After clustering, according to the distribution condition of the pixel points in each cluster, calculating the variance of each clusterTo remove the bin where the cluster with larger variance is located. The larger variance indicates a more discrete distribution and a greater likelihood of being noise. Noise bin is due to random noise or outlier pixel values in the image. The removal of noise bins by K-means cluster analysis helps to reduce interference in subsequent classification steps.
S65, performing inverting operation on the obtained secondary color histogram, and enhancing secondary color information. As shown in FIG. 4, in the example of the present invention, the reverse operation is usedTo achieve this. Let the secondary color histogram after the reverse enhancement beThe expression is as follows:
(5-1)
wherein,is an indicator function. If->Then->The method comprises the steps of carrying out a first treatment on the surface of the If->Then->. Finally will->And->Normalization, expressed as->And->
And S70, coding and normalizing all secondary colors reserved in the clustering process according to the gradient direction and the gradient amplitude through morphological analysis.
S71, calculating gradient directions and magnitudes of all pixel points of the clusters reserved in the S60, wherein the expression is as follows:
(6-1)
(6-2)
(6-3)
(6-4)
wherein the method comprises the steps ofIs the position coordinates of the pixel points in the graph, < >>For horizontal gradient +.>For vertical gradient +.>For gradient amplitude +.>Is the gradient direction. Further, there are two information gradient directions and magnitudes for each pixel with secondary color features that remain.
S72, generating a one-dimensional histogram according to the gradient direction, setting every 20 degrees as an interval, and accumulating the amplitude accumulation conditions of the secondary colors in 9 directions in [0 20 40 60 80 100 120 140 160 ]. And carrying out normalization processing on the coded morphological characteristics, and ensuring that each characteristic is subjected to classification analysis on the same scale.
S73, combining the normalized morphological characteristics with the characteristics representing colorsAnd->And generating one-dimensional feature vectors in a row according to a certain sequence, wherein the feature vectors contain two feature information of colors and forms.
And S80, performing classification recognition on the SVM according to the primary and secondary color histogram information and the one-dimensional feature vector generated by morphological coding. In one embodiment, the step S80 may specifically include the following steps:
s81, taking the generated one-dimensional feature vector as input, taking the type of the rice disease as output, and constructing an SVM classification model. And (3) using the disease-free rice sample obtained in the step S40 and the rice image sample with known disease types as training sets to generate classification labels. And (3) taking the one-dimensional feature vector generated in the step (S70) as input, comparing the similarity of the input feature vector with each category in the training set by using a trained SVM classifier, and dividing the input image into the most similar categories, thereby achieving the purpose of identifying rice diseases.
S82, using an independent test set to evaluate the classification performance of the SVM model. And evaluating the classification performance of the model by calculating indexes such as accuracy, recall rate and the like, and performing model tuning according to the requirement.
As shown in fig. 5, in one embodiment, a system for identifying rice diseases based on secondary color cluster analysis is provided, which may specifically include an image acquisition module 10, an image segmentation module 20, a two-dimensional histogram generation module 30, a feature learning module 40, a threshold segmentation module 50, a secondary color cluster analysis module 60, a secondary color feature morphological coding module 70, and a classification identification module 80.
Image acquisition module 10: is used for acquiring the image data of rice diseases.
The image segmentation module 20: the method is used for segmenting the image, extracting the rice leaf image, removing background information and realizing front background segmentation of the image;
two-dimensional histogram generation module 30: for converting the RGB image to HSV color space, utilizing the H and S channels for generating a two-dimensional histogram.
Feature learning module 40: the method is used for learning the two-dimensional color histogram characteristics and morphological characteristics of the acquired disease-free and known disease sample images.
Threshold segmentation module 50: for utilizing dynamic thresholds from mean histogramsThe two-dimensional color histogram is divided into a primary color histogram and a secondary color histogram, and normalized.
Secondary color cluster analysis module 60: and the method is used for carrying out cluster analysis on each bin of the secondary color histogram and removing noise bins with discrete distribution states of pixel points in the image. And taking inverse enhancement and normalization.
Secondary color feature morphological encoding module 70: for encoding and normalizing all secondary colors remaining in the clustering process according to their gradient directions and gradient magnitudes by morphological analysis.
Generating a feature vector classification recognition module 80: the method is used for carrying out classification recognition on the SVM according to the primary and secondary color histogram information and the one-dimensional feature vector generated by morphological coding.
Although the invention has been described hereinabove with reference to embodiments, various modifications thereof may be made and equivalents may be substituted for elements thereof without departing from the scope of the invention. In particular, the features of the disclosed embodiments may be combined with each other in any manner as long as there is no structural conflict, and the exhaustive description of these combinations is not given in this specification merely for the sake of omitting the descriptions and saving resources. Therefore, it is intended that the invention not be limited to the particular embodiment disclosed, but that the invention will include all embodiments falling within the scope of the appended claims.

Claims (7)

1. A rice disease identification method based on secondary color cluster analysis is characterized by comprising the following specific steps:
s10, classifying and collecting images with and without diseases of rice leaves through a high-resolution camera;
s20, preprocessing each collected image to realize front background segmentation;
s30, performing color space conversion, converting the acquired RGB image into an HSV color space, and generating a two-dimensional color histogram by utilizing an H channel and an S channel;
s40, learning two-dimensional color histogram features and morphological features of the acquired disease-free image and the known disease image;
s50, automatically calculating a threshold value through the mean value color histogram, dividing the two-dimensional color histogram into a main color histogram and a secondary color histogram, and normalizing;
s60, carrying out K-means cluster analysis on each bin in the obtained secondary color histogram, removing noise bin interference, and normalizing after inverse enhancement;
s70, coding and normalizing all secondary colors reserved in the clustering process according to gradient directions and gradient amplitudes through morphological analysis;
s80, generating one-dimensional feature vectors according to the primary and secondary color histogram information and morphological codes, and carrying out SVM classification recognition.
2. The method for identifying rice diseases based on secondary color cluster analysis according to claim 1, wherein in the step S30, color space conversion is performed, the collected RGB image is converted into HSV color space, and the specific steps of generating a two-dimensional color histogram using the H-channel and the S-channel are as follows:
performing color space conversion on the acquired RGB image, and transferring to an HSV color space;
removing the influence of the illumination of the V channel on the image, and dividing the image into a plurality of segments according to the value ranges of the H channel and the S channel;
and generating a two-dimensional color histogram consisting of the H channel and the S channel according to the number of the segments.
3. The method for identifying rice diseases based on secondary color cluster analysis according to claim 1, wherein in the step S50, the threshold is automatically obtained through the mean color histogram, the two-dimensional color histogram is divided into the primary color histogram and the secondary color histogram, and the specific steps of normalization are as follows:
taking the mean value of bin corresponding to the position of the two-dimensional color histogram of the image to be detected and the two-dimensional color histogram of the disease-free image, and generating a two-dimensional mean value color histogram;
the frequency of bin in the two-dimensional mean value color histogram is arranged into a one-dimensional color histogram according to the sequence from big to small;
finding the position of the best split primary and secondary colors in the one-dimensional color histogram using a threshold;
averaging the frequencies of two adjacent bins around the position, wherein the average value is used as a threshold value for dividing the primary color and the secondary color in the two-dimensional color histogram;
dividing a two-dimensional color histogram of the image to be detected, dividing the two-dimensional color histogram into a primary color histogram and a secondary color histogram, and normalizing the primary color histogram and the secondary color histogram.
4. The method for identifying rice diseases based on secondary color cluster analysis according to claim 1, wherein in the step S60, the specific steps of performing K-means cluster analysis on the secondary color to remove noise bin interference and taking normalization after inverse enhancement are as follows:
setting the number of clusters, and carrying out cluster analysis on secondary colors by taking bin as a unit;
after clustering, according to the distribution condition of pixel points in each cluster, removing the bin where the cluster with larger variance is located by calculating the variance of each cluster;
removing the bin where the cluster with larger variance is located;
and carrying out inverting operation on the bin in the residual obtained secondary color histogram, and enhancing secondary color information.
5. The method for identifying rice diseases based on secondary color cluster analysis according to claim 1, wherein in the step S70, the specific steps of encoding and normalizing all secondary colors remained in the clustering process according to the gradient direction and the gradient amplitude thereof by morphological analysis are as follows:
calculating the gradient direction and the amplitude of all the pixel points of the reserved clusters, generating a one-dimensional histogram according to the gradient direction, and reasonably setting intervals;
and sequentially arranging the frequencies of the bins in the one-dimensional histogram into one-dimensional feature vectors.
6. The method for identifying rice diseases based on secondary color cluster analysis according to claim 5, wherein in the step S80, a one-dimensional feature vector is generated according to the primary and secondary color histogram information and morphological codes, and the specific steps of performing SVM classification identification are as follows:
the primary color histogram and the secondary color histogram are respectively arranged into one-dimensional feature vectors according to the frequency in sequence and are connected into an integral one-dimensional feature vector;
connecting one-dimensional feature vectors generated by the primary and secondary color histograms with morphological feature vectors;
three features, primary and secondary colors and morphological features are used to generate one-dimensional feature vectors, and an SVM classifier is used for classification.
7. A system for implementing the secondary color cluster analysis-based rice disease identification method of any one of claims 1 to 6, comprising:
the image acquisition module is used for collecting image data of rice;
the image segmentation module is used for preprocessing each collected image to realize front background segmentation;
the two-dimensional histogram generation module is used for converting the RGB image into an HSV color space and generating a two-dimensional color histogram by utilizing H and S channels;
the feature learning module is used for learning the two-dimensional color histogram features and morphological features of the acquired disease-free and known disease sample images;
the threshold segmentation module utilizes dynamic threshold according to the generated mean value histogramDividing the two-dimensional color histogram into a primary color histogram and a secondary color histogram, and normalizing;
the secondary color cluster analysis module is used for carrying out cluster analysis on each bin of the secondary color histogram and removing noise bins with discrete distribution states of pixel points in the image; and taking inverse enhancement and then normalizing;
the secondary color feature morphology coding module codes and normalizes all secondary colors reserved in the clustering process according to gradient directions and gradient amplitudes through morphology analysis;
and the classification and identification module is used for carrying out classification and identification by using the SVM according to the primary and secondary color histogram information and the one-dimensional feature vector generated by morphological coding.
CN202410264215.8A 2024-03-08 2024-03-08 Rice disease identification method and system based on secondary color cluster analysis Active CN117853937B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410264215.8A CN117853937B (en) 2024-03-08 2024-03-08 Rice disease identification method and system based on secondary color cluster analysis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410264215.8A CN117853937B (en) 2024-03-08 2024-03-08 Rice disease identification method and system based on secondary color cluster analysis

Publications (2)

Publication Number Publication Date
CN117853937A true CN117853937A (en) 2024-04-09
CN117853937B CN117853937B (en) 2024-06-04

Family

ID=90543813

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410264215.8A Active CN117853937B (en) 2024-03-08 2024-03-08 Rice disease identification method and system based on secondary color cluster analysis

Country Status (1)

Country Link
CN (1) CN117853937B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102184413A (en) * 2011-05-16 2011-09-14 浙江大华技术股份有限公司 Automatic vehicle body color recognition method of intelligent vehicle monitoring system
CN105488536A (en) * 2015-12-10 2016-04-13 中国科学院合肥物质科学研究院 Agricultural pest image recognition method based on multi-feature deep learning technology
CN111091129A (en) * 2019-12-24 2020-05-01 沈阳建筑大学 Image salient region extraction method based on multi-color characteristic manifold sorting
CN111539293A (en) * 2020-04-17 2020-08-14 北京派得伟业科技发展有限公司 Fruit tree disease diagnosis method and system
CN115769059A (en) * 2020-06-12 2023-03-07 赛多利斯司特蒂姆数据分析公司 Computer-implemented method, computer program product and system for data analysis
CN116228677A (en) * 2023-01-13 2023-06-06 华南师范大学 Ceramic tile surface color difference detection method and device, electronic equipment and storage medium
CN117152706A (en) * 2023-09-06 2023-12-01 江苏普旭科技股份有限公司 Aircraft runway accumulated water identification method, device and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102184413A (en) * 2011-05-16 2011-09-14 浙江大华技术股份有限公司 Automatic vehicle body color recognition method of intelligent vehicle monitoring system
CN105488536A (en) * 2015-12-10 2016-04-13 中国科学院合肥物质科学研究院 Agricultural pest image recognition method based on multi-feature deep learning technology
CN111091129A (en) * 2019-12-24 2020-05-01 沈阳建筑大学 Image salient region extraction method based on multi-color characteristic manifold sorting
CN111539293A (en) * 2020-04-17 2020-08-14 北京派得伟业科技发展有限公司 Fruit tree disease diagnosis method and system
CN115769059A (en) * 2020-06-12 2023-03-07 赛多利斯司特蒂姆数据分析公司 Computer-implemented method, computer program product and system for data analysis
CN116228677A (en) * 2023-01-13 2023-06-06 华南师范大学 Ceramic tile surface color difference detection method and device, electronic equipment and storage medium
CN117152706A (en) * 2023-09-06 2023-12-01 江苏普旭科技股份有限公司 Aircraft runway accumulated water identification method, device and system

Non-Patent Citations (10)

* Cited by examiner, † Cited by third party
Title
于翔;沈美;: "量化的均匀与非均匀对提取颜色直方图的影响及比对研究", 青海大学学报(自然科学版), no. 01, 20 February 2015 (2015-02-20) *
伯晓晨, 刘建平: "基于颜色直方图的图象检索", 中国图象图形学报, no. 01, 25 January 1999 (1999-01-25) *
张云龙;张会敏;谢泽奇;张晴晴;齐国红;: "基于显著区域和PHOG的黄瓜病害识别方法研究", 江苏农业科学, no. 22, 29 November 2018 (2018-11-29) *
方珍红;谢明元;杨玲;: "一种新的基于加权颜色特征的图像检索算法", 激光与红外, no. 04, 20 April 2013 (2013-04-20) *
毛良瑾;何丽莎;解利军;: "一种有效的SAR图像自动目标识别方法", 计算机工程与应用, no. 31, 1 November 2009 (2009-11-01) *
王炜, MICHAEL R.LYU, 武德峰, 张勇: "基于模糊分类的图像颜色直方图研究", 模糊系统与数学, no. 04, 28 December 2003 (2003-12-28) *
郭文;乔谊正;: "改进的DKLT在彩色客票票号分割中的应用", 传感器与微系统, no. 05, 20 May 2009 (2009-05-20) *
金静;党建武;王阳萍;翟凤文;: "区域颜色属性空间直方图背景建模", 中国图象图形学报, no. 05, 16 May 2019 (2019-05-16) *
陈锻生;刘政凯;: "利用图像颜色及其边缘直方图特征的SVM人脸检测", 小型微型计算机系统, no. 12, 21 December 2005 (2005-12-21) *
高进乐;康耀红;伍小芹;: "基于颜色特征图像检索方法的研究", 信息技术, no. 11, 25 November 2008 (2008-11-25) *

Also Published As

Publication number Publication date
CN117853937B (en) 2024-06-04

Similar Documents

Publication Publication Date Title
Chuanlei et al. Apple leaf disease identification using genetic algorithm and correlation based feature selection method
CN109636784B (en) Image saliency target detection method based on maximum neighborhood and super-pixel segmentation
CN101526994B (en) Fingerprint image segmentation method irrelevant to collecting device
O’Connor et al. Facial recognition using modified local binary pattern and random forest
CN104850859A (en) Multi-scale analysis based image feature bag constructing method
CN109145848A (en) A kind of wheat head method of counting
CN111539910B (en) Rust area detection method and terminal equipment
CN107045624B (en) Electroencephalogram signal preprocessing and classifying method based on maximum weighted cluster
Altaei et al. Brain tumor detection and classification using SIFT in MRI images
CN116842210B (en) Textile printing texture intelligent retrieval method based on texture features
CN117115197B (en) Intelligent processing method and system for design data of LED lamp bead circuit board
CN112214746B (en) Identity recognition method based on multi-modal vein image gender information heterogeneous separation
CN111127407B (en) Fourier transform-based style migration forged image detection device and method
CN117853937B (en) Rice disease identification method and system based on secondary color cluster analysis
CN110751660B (en) Color image segmentation method
Guo et al. Breast cancer detection via wavelet energy and support vector machine
CN112241954B (en) Full-view self-adaptive segmentation network configuration method based on lump differentiation classification
Sharma et al. Review paper on brain tumor detection using pattern recognition techniques
CN109241886B (en) Face recognition method and system based on OLBP and PCA
CN113744241A (en) Cell image segmentation method based on improved SLIC algorithm
Rajesh et al. Undecimated dual tree complex wavelet transform based face recognition
CN113139936B (en) Image segmentation processing method and device
CN117746079B (en) Clustering prediction method, system, storage medium and equipment for hyperspectral image
CN109344902B (en) Video texture description method based on local space-time continuity aggregation description
Bharathan et al. Tulsi Leaves Classification System

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant