CN111539293A - Fruit tree disease diagnosis method and system - Google Patents
Fruit tree disease diagnosis method and system Download PDFInfo
- Publication number
- CN111539293A CN111539293A CN202010306669.9A CN202010306669A CN111539293A CN 111539293 A CN111539293 A CN 111539293A CN 202010306669 A CN202010306669 A CN 202010306669A CN 111539293 A CN111539293 A CN 111539293A
- Authority
- CN
- China
- Prior art keywords
- fruit tree
- disease
- region
- interest
- detected
- 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.)
- Pending
Links
- 201000010099 disease Diseases 0.000 title claims abstract description 174
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 title claims abstract description 174
- 235000013399 edible fruits Nutrition 0.000 title claims abstract description 146
- 238000000034 method Methods 0.000 title claims abstract description 48
- 238000003745 diagnosis Methods 0.000 title claims abstract description 29
- 238000011161 development Methods 0.000 claims abstract description 39
- 238000013145 classification model Methods 0.000 claims abstract description 27
- 238000012549 training Methods 0.000 claims abstract description 12
- 238000012545 processing Methods 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 9
- 230000006870 function Effects 0.000 claims description 9
- 238000001914 filtration Methods 0.000 claims description 4
- 238000001514 detection method Methods 0.000 abstract description 14
- 230000002265 prevention Effects 0.000 abstract description 4
- 230000009286 beneficial effect Effects 0.000 abstract 1
- 235000011430 Malus pumila Nutrition 0.000 description 38
- 235000015103 Malus silvestris Nutrition 0.000 description 38
- 244000141359 Malus pumila Species 0.000 description 33
- 238000012706 support-vector machine Methods 0.000 description 12
- 238000010586 diagram Methods 0.000 description 7
- 241000220225 Malus Species 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 5
- 206010039509 Scab Diseases 0.000 description 4
- 238000004891 communication Methods 0.000 description 4
- 238000000605 extraction Methods 0.000 description 4
- 239000002420 orchard Substances 0.000 description 3
- 208000025865 Ulcer Diseases 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 239000008187 granular material Substances 0.000 description 2
- 230000001788 irregular Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000012163 sequencing technique Methods 0.000 description 2
- 208000024891 symptom Diseases 0.000 description 2
- 231100000397 ulcer Toxicity 0.000 description 2
- 241000196324 Embryophyta Species 0.000 description 1
- 241000238631 Hexapoda Species 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 235000021016 apples Nutrition 0.000 description 1
- 244000052616 bacterial pathogen Species 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 238000007418 data mining Methods 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 210000003097 mucus Anatomy 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000004171 remote diagnosis Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/10—Terrestrial scenes
- G06V20/188—Vegetation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2411—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/46—Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
- G06V10/462—Salient features, e.g. scale invariant feature transforms [SIFT]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/50—Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/56—Extraction of image or video features relating to colour
Abstract
The embodiment of the invention provides a method and a system for diagnosing diseases of fruit trees, wherein the method comprises the following steps: obtaining an interested area of a fruit tree disease image to be detected; acquiring a target characteristic vector according to the HSV color histogram of the region of interest and the texture histogram of the region of interest; and inputting the target characteristic vector into a classification model to obtain the disease part and the disease development stage of the fruit tree disease to be detected, wherein the classification model is obtained by training by taking disease images of different parts and different disease development stages of the fruit tree disease to be detected as samples. After the embodiment of the invention trains the classification model according to the pictures of different development stages of diseases at different parts of the fruit tree, the classifier has the function of predicting the development stage of the fruit tree diseases according to the fruit tree disease images, thereby realizing the automatic, efficient and accurate detection of the development degree of the fruit tree diseases and being beneficial to the timely diagnosis and prevention decision of the diseases.
Description
Technical Field
The invention relates to the technical field of intelligent agriculture, in particular to a method and a system for diagnosing fruit tree diseases.
Background
Anthracnose, also called bitter rot and late rot, is one of the important diseases of apples, most of apple producing areas in China occur, and the disease is particularly serious in high-temperature, rainy and humid areas in summer. Apple anthracnose mainly damages fruits, branches, fruit stands and the like. When the fruits are infected, light brown small round spots appear on the surfaces of the fruits at the initial stage, and then the small round spots gradually expand to be brown or dark brown, the pulp is soft and rotten, the surfaces of diseased parts sink, and the boundary with good pulp is obvious; when the disease spot is enlarged to the diameter of 1-2cm, small granules are formed on the surface and then become black, namely, the conidium discs of the pathogenic bacteria are arranged in a concentric ring; when it is raining or wet in the weather, crimson mucus (conidiophore) overflows; the number of diseased spots on diseased fruits is different, a few are few, a large number is dozens, even hundreds are found, but most of the diseased spots do not spread to become small dry spots; the minority scabs can be expanded from 1 scab to 1/3-1/2 of the whole fruit, and the scabs are connected together to enable the whole fruit to rot and fall off; the pulp of the diseased part with the scab is dug to be in a funnel shape, the diseased fruit is longitudinally cut, and the tissue of the diseased part is in a V shape; some diseased fruits lose water and become black stiff fruits which are hung on trees and do not fall off in winter. When the fruit and branches are damaged, the disease usually starts from the top and gradually spreads downwards. The damage of the branches mostly occurs at the base parts of the weak branches, irregular small spots appear in the initial stage, the irregular small spots gradually expand into ulcer spots, later-stage diseased skins crack and fall off, and xylem is exposed; in severe cases, the branches above the ulcer spots are dry and black granules can also grow on the surface of the affected part. The damaged fruit table spreads from top to bottom to be dark brown, so that the fruit table can not be pulled out to cause the death due to dryness. The anthracnose seriously affects the yield and the quality of apple fruits and brings serious economic loss to fruit growers, so that the method is particularly important for timely and accurately identifying the anthracnose.
Generally, there are 3 methods for identifying and diagnosing fruit tree diseases by using images. One method is dependent on an expert system, through uploading pictures, the pictures are manually identified by experts, and although remote diagnosis service is provided for farmers, the method has the disadvantages of higher cost, low efficiency, influence by various external conditions such as picture shooting effect, system response timeliness, expert capacity and the like, and instability and reliability. The other method is to provide classified disease pictures, guide user identification through a multi-level menu, and deduce diagnosis results layer by layer.
Compared with the prior art, the method has the advantages that the fruit tree diseases are automatically identified by utilizing the image identification technology, the shot images are processed and analyzed by combining the modern scientific technologies such as image processing, deep learning, data mining and analysis and the like, and the identification diagnosis result is obtained. On the basis of the existing image recognition method and system, the method innovation is carried out by combining the development characteristics of disease symptoms, so that the disease recognition can be automatically and efficiently detected, more information such as disease occurrence stages and development degrees can be obtained, and more valuable decision bases are provided for plant protection prevention and control.
In the fruit tree disease diagnosis system disclosed in the prior art, a background module of the system is used for carrying out classification and generalization setting on the types, growth periods, positions, disease categories and disease periods of fruit trees, and a picture navigation and layer-by-layer identification mode is adopted to help farmers determine diseases and treatment schemes thereof.
Therefore, an intelligent diagnosis method and system for fruit tree diseases are needed.
Disclosure of Invention
In order to solve the above problems, embodiments of the present invention provide a method and a system for diagnosing a disease of a fruit tree.
In a first aspect, an embodiment of the present invention provides a method for diagnosing a disease of a fruit tree, including:
obtaining an interested area of a fruit tree disease image to be detected;
acquiring a target characteristic vector according to the HSV color histogram of the region of interest and the texture histogram of the region of interest;
and inputting the target characteristic vector into a classification model to obtain the diseased part and the disease development stage of the fruit tree to be detected, wherein the classification model is obtained by training by taking disease images of different parts and different disease development stages of the fruit tree to be detected as samples.
Preferably, the HSV color histogram of the region of interest is obtained by:
converting the region of interest image to an HSV color space;
dividing each color channel into a plurality of subintervals according to the HSV three color channels of the region of interest;
and acquiring an HSV color histogram of the region of interest according to the histogram of each subinterval of each color channel.
Preferably, the texture histogram of the region of interest is obtained by:
processing the region of interest through a UPLBP operator to obtain a texture feature map of the region of interest;
dividing the texture feature map into a plurality of sub-blocks, and obtaining a histogram of each sub-block;
and acquiring a texture histogram of the region of interest according to the histogram of each sub-block.
Preferably, the classification model is an SVM classifier, and the SVM classifier is obtained by using a radial basis kernel function, and the specific formula is as follows:
K(x,x′)=exp(-||x-x′||2/2σ2),
σ>0,
wherein x is an input characteristic value, x' is a prediction result, and σ is a kernel parameter of the radial basis kernel function.
Preferably, the histogram of each sub-interval is obtained by the following formula:
P(i)=ni/N,
wherein P (i) represents the histogram of the ith subinterval, niThe number of pixels in the ith sub-interval is represented, and N represents the number of pixels on the component image where the ith sub-interval is located.
Preferably, the processing the region of interest by the UPLBP operator further includes, before the obtaining the texture feature of the region of interest:
and carrying out graying processing, median filtering and histogram equalization on the region of interest.
Preferably, the disease images of different parts of the fruit tree to be detected specifically include:
the early disease image of the fruit part corresponding to the fruit tree to be detected, the middle disease image of the fruit part corresponding to the fruit tree to be detected, the late disease image of the fruit part corresponding to the fruit tree to be detected, the early disease image of the branch part corresponding to the fruit tree to be detected, the middle disease image of the branch part corresponding to the fruit tree to be detected, the late disease image of the branch part corresponding to the fruit tree to be detected, the early disease image of the fruit platform part corresponding to the fruit tree to be detected, the middle disease image of the fruit platform part corresponding to the fruit tree to be detected, and the late disease image of the fruit platform part corresponding to the fruit tree.
In a second aspect, an embodiment of the present invention provides a fruit tree disease diagnosis system, including:
the interested region module is used for acquiring an interested region of the fruit tree image to be detected;
the target characteristic module is used for acquiring a target characteristic vector according to the HSV color histogram of the region of interest and the texture histogram of the region of interest;
and the diagnosis module is used for inputting the target characteristic vector into a classification model to obtain the diseased part and the disease development stage of the fruit tree to be detected, wherein the classification model is obtained by training by taking disease images of different parts and different disease development stages of the fruit tree to be detected as samples.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a memory, a processor, and a computer program that is stored in the memory and is executable on the processor, where the processor executes the computer program to implement the steps of the method for diagnosing fruit tree diseases provided in the first aspect of the present invention.
In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for diagnosing fruit tree diseases provided in the first aspect of the present invention.
According to the fruit tree disease diagnosis method and system provided by the embodiment of the invention, after the classification model is trained according to the pictures of different development stages of diseases at different parts of a fruit tree, the classifier has the function of predicting the development stage of the fruit tree disease according to the fruit tree disease image, so that the automatic, efficient and accurate detection of the development degree of the fruit tree disease is realized, and the disease diagnosis and prevention decision can be made in time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a flow chart of a method for diagnosing fruit tree diseases according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a process of extracting a region of interest according to an embodiment of the present invention;
fig. 3 is a flowchart of a fruit tree disease diagnosis method according to a preferred embodiment of the present invention;
FIG. 4 is a flowchart of obtaining a target feature vector according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a fruit tree disease diagnosis system provided in an embodiment of the present invention;
fig. 6 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of a fruit tree disease diagnosis method provided in an embodiment of the present invention, and as shown in fig. 1, the method includes:
s1, obtaining an interested area of the fruit tree disease image to be detected;
s2, acquiring a target feature vector according to the HSV color histogram of the region of interest and the texture histogram of the region of interest;
and S3, inputting the target characteristic vector into a classification model, and obtaining the diseased part and the disease development stage of the fruit tree to be detected, wherein the classification model is obtained by training with disease images of different parts and different disease development stages of the fruit tree to be detected as samples.
In the embodiment of the invention, an apple tree is taken as a fruit tree to be detected, and the disease part and the disease development stage of anthracnose on the apple tree are diagnosed as an example, an orchard is generally provided with Internet of things monitoring equipment, fruit tree disease image information is obtained in real time by relying on the Internet of things monitoring equipment of the orchard, or fruit tree disease image information is obtained in other ways, namely an apple tree disease image is obtained, and then an interested area on the apple tree disease image is extracted.
Specifically, the region of interest is obtained by:
generating a pyramid image according to the apple tree disease image to be detected, and extracting ORB characteristic points of the apple tree disease image to be detected from the pyramid image, wherein the algorithm has scale invariance; and then, whether SIFT feature points are extracted or not is determined according to the comparison result of the number of the feature points and a preset threshold value.
And sequencing the extracted characteristic points in the horizontal and vertical directions, and determining the coordinates of the disease area in the disease image of the apple tree to be detected by calculating the mean value of K adjacent points.
And calculating the absolute coordinate point of the disease area to obtain a relative coordinate point of the interested area of the disease image of the apple tree to be detected, and then determining a rectangular frame area according to the relative coordinate point to be used as the interested area of the disease image of the apple tree to be detected.
And then calculating an HSV color histogram of the region of interest and a texture histogram of the region of interest, and fusing the two features to obtain a target feature vector which can well represent the characteristics of the apple tree disease image.
It should be noted that the color histogram is a color feature widely adopted in many image retrieval systems. It describes the proportion of different colors in the whole image, and does not care about the spatial position of each color, i.e. cannot describe the object or object in the image.
The texture histogram represents the proportion of texture features in the whole image.
And inputting the target characteristic vector into a classification model to obtain the diseased part of the apple tree and the development stage of the anthracnose, wherein the classification model is obtained by training images of different diseased parts of the apple tree in different disease development stages, and the trained classification model can predict the diseased part and the disease development stage of the apple tree according to the disease image of the apple tree to be detected.
Specifically, in the embodiment of the invention, the disease images of different parts of the apple tree and different development stages of anthracnose can be obtained through Chinese knowledge network, Baidu encyclopedia, various disease and insect database, photographing acquisition and other channels, and the images are color images in a JPG format.
According to the fruit tree disease diagnosis method provided by the embodiment of the invention, after the classification model is trained according to the pictures of different development stages of diseases at different parts of a fruit tree, the classifier has the function of predicting the development stage of the fruit tree disease according to the fruit tree disease image, so that the automatic, efficient and accurate detection of the development degree of the fruit tree disease is realized, and the disease diagnosis and prevention decision can be made in time.
Fig. 2 is a flowchart of extracting an area of interest in the embodiment of the present invention, and as shown in fig. 2, a disease image is first obtained, where the disease image in the image is an image of different parts of an apple tree at different disease development stages, then a pyramid image is generated, ORB feature points of the image are extracted, and if the number of ORB feature points is greater than a preset threshold, the average values of K neighboring points are respectively calculated in the horizontal and vertical directions to determine coordinates of the area of interest of the disease image, so as to extract the area of interest of the disease image. And if the digifax of the ORB feature point is smaller than a preset threshold value, extracting the SIFT feature point of the image.
Fig. 3 is a flowchart of a fruit tree disease diagnosis method according to a preferred embodiment of the present invention, and as shown in fig. 3, a disease image in the diagram is an image of an apple tree at different disease development stages at different positions, a large number of disease images are obtained from a database such as a known web, a disease retrieval map library is established, a region of interest (i.e., ROI) of the disease image is detected and extracted, then an ROI target feature vector of the region of interest is extracted, that is, an HSV color histogram and a texture histogram of the region of interest are extracted and then fused to obtain the ROI target feature vector, and an SVM classifier is trained by using the ROI target feature vector of each disease image, so as to obtain a trained SVM classifier.
And then extracting the disease image of the apple tree to be detected, obtaining a target characteristic vector of the disease image of the apple tree to be detected according to the same method, and inputting the target characteristic vector into a trained SVM classifier to obtain a detection result.
On the basis of the above embodiment, preferably, the HSV color histogram of the region of interest is obtained as follows:
converting the region of interest image to an HSV color space;
dividing each color channel into a plurality of subintervals according to the HSV three color channels of the region of interest;
and acquiring an HSV color histogram of the region of interest according to the histogram of each subinterval of each color channel.
On the basis of the above embodiment, preferably, the texture histogram of the region of interest is obtained by:
processing the region of interest through a UPLBP operator to obtain the texture features of the region of interest;
dividing the texture feature map into a plurality of sub-blocks, and obtaining a histogram of each sub-block;
and acquiring a texture histogram of the region of interest according to the histogram of each sub-block.
Specifically, the texture histogram of the region of interest may be obtained by:
the RGB image of the region of interest is converted into an HSV color space, so that the color characteristic dimension can be reduced without losing color information, and the brightness influence of diseases under natural light is eliminated.
And dividing the HSV image into a plurality of color subintervals according to H, S, V three channels respectively. In the embodiment of the invention, H is divided into 30 stages, and S, V is divided into 10 stages respectively, and the total number is 50 subintervals.
And then calculating a histogram of each subinterval according to the subinterval corresponding to each color channel, and calculating an HSV color histogram of the region of interest according to the histogram of each subinterval. Specifically, the histogram of each subinterval is normalized, and then the histograms of each subinterval in 3 color intervals are combined to obtain a one-dimensional feature vector, which is the HSV color histogram.
Specifically, the histogram of each subinterval is obtained by the following formula:
P(i)=ni/N,
wherein P (i) represents the histogram of the ith subinterval, niThe number of pixels in the ith sub-interval is represented, and N represents the number of pixels on the component image where the ith sub-interval is located.
For the ith sub-interval, firstly, the number n of pixels in the ith sub-interval is obtainediIf the ith sub-interval corresponds to the component image of the H channel, N is the number of pixels on the component image of the H channel.
On the basis of the above embodiment, preferably, the texture histogram of the region of interest is obtained by:
processing the region of interest through a UPLBP operator to obtain the texture features of the region of interest;
dividing the texture feature map into a plurality of sub-blocks, and obtaining a histogram of each sub-block;
and acquiring a texture histogram of the region of interest according to the histogram of each sub-block.
Specifically, an original Local Binary Pattern (LBP) operator is firstly adopted to calculate an original LBP value of a region of interest in a 3x3 window neighborhood; and then carrying out equivalent LBP coding by using a UPLBP operator to obtain a UPLBP characteristic diagram of the region of interest.
Dividing the UPLBP characteristic diagram into 64 subblocks of 8 multiplied by 8, calculating a histogram of each subblock region, and arranging the histograms into a row according to the spatial sequence of the subblocks to form a UPLBP histogram characteristic row vector, namely a texture histogram of the region of interest.
Fig. 4 is a flowchart of obtaining a target feature vector in the embodiment of the present invention, and as shown in fig. 4, for an extracted region of interest, a color histogram and a texture histogram of the region of interest are respectively extracted according to the above-mentioned methods, and then the color histogram and the texture histogram are fused to obtain the target feature vector.
Specifically, before extracting the texture histogram of the region of interest, the region of interest needs to be preprocessed, and the specific steps are as follows:
and carrying out graying processing, median filtering and histogram equalization on the region of interest.
Carrying out gray processing on the region of interest, reducing the influence of illumination, and reducing the calculated amount during the image feature extraction of a disease target region, thereby improving the overall speed of a disease identification algorithm; then, a noise reduction method of median filtering is adopted, the gray value of each pixel point in a certain neighborhood of the gray image pixel point is expressed by the gray intermediate value of the other pixel point in the neighborhood, and the gray value of the pixel adjacent to the point reflects the real value; and then histogram equalization operation is carried out to enhance the image contrast.
On the basis of the foregoing embodiment, preferably, the classification model is an SVM classifier, and the SVM classifier is obtained by using a radial basis kernel function, and a specific formula is as follows:
K(x,x′)=exp(-||x-x′||2/2σ2),
σ>0,
wherein x is an input characteristic value, x' is a prediction result, and σ is a kernel parameter of the radial basis kernel function.
Specifically, a nonlinear Support Vector Machine (SVM) is obtained by using a Radial Basis Function (RBF), and the trained SVM classifier can be used for detecting and identifying an apple picture to be detected.
On the basis of the above embodiment, preferably, the disease images of different parts of the fruit tree to be tested specifically include:
the early disease image of the fruit part corresponding to the fruit tree to be detected, the middle disease image of the fruit part corresponding to the fruit tree to be detected, the late disease image of the fruit part corresponding to the fruit tree to be detected, the early disease image of the branch part corresponding to the fruit tree to be detected, the middle disease image of the branch part corresponding to the fruit tree to be detected, the late disease image of the branch part corresponding to the fruit tree to be detected, the early disease image of the fruit platform part corresponding to the fruit tree to be detected, the middle disease image of the fruit platform part corresponding to the fruit tree to be detected, and the late disease image of the fruit platform part corresponding to the fruit tree.
Specifically, the images for training the SVM in the embodiment of the invention comprise an early-stage image of the anthracnose of the fruit part of the apple tree, a middle-stage image of the anthracnose of the fruit part of the apple tree, a late-stage image of the anthracnose of the fruit part of the apple tree, an early-stage image of the branch part of the apple tree, a middle-stage image of the anthracnose of the branch part of the apple tree, a late-stage image of the branch part of the apple tree, an early-stage image of the anthracnose of the fruit platform part of the apple tree, a middle-stage image of the anthracnose of the fruit platform part of the apple tree and a late-stage.
The conversion application of the agricultural informatization technology in the aspect of apple orchard disease identification and detection greatly improves the convenience and timeliness of fruit tree disease diagnosis, and along with the rapid advance of the computer vision technology, higher requirements are provided for the accuracy and reliability of disease image feature extraction and analysis. The method is based on the identification and detection requirements of the apple tree anthracnose, and is innovated by combining the development characteristics of disease symptoms, so that the accurate and efficient detection of the apple tree anthracnose based on image identification is realized. The key points of the invention comprise:
the disease images are classified and stored according to the disease parts and the disease spots development stages, so that the model training is more efficient, the number of pictures required by a single category sample is reduced, the accuracy of disease spot feature extraction is improved, and the information content of a detection result is richer.
The embodiment of the invention provides a method for rapidly detecting an interested area of a fruit tree disease image to be detected, which comprises the steps of firstly extracting OPB (optical fiber bonding) feature points from the fruit tree disease image to be detected, extracting SIFT (scale invariant feature transform) feature points when the number of the feature points is less than a given threshold value, then sequencing coordinate values of the extracted feature points in the horizontal direction and the vertical direction, determining the coordinates of the disease area and extracting the interested area by calculating the mean value of K adjacent points, and has the advantages of simple principle, easy realization and good real-time property.
In the aspect of feature extraction and recognition, the HSV color histogram and the UPLBP texture histogram of a disease region of interest are fused to form a total feature vector, an SVM classifier with RBF as a kernel is trained, the effect of solving the nonlinear problem of small sample multi-classification is good, and the disease recognition accuracy is high.
Compared with the prior art, the embodiment of the invention applies the image recognition technology based on the rapid detection of the region of interest to the recognition and detection of the anthracnose of the apple tree for the first time, and carries out classified database building and accurate detection on the image of the disease of the fruit tree to be detected according to the diseased part and the disease spot development stage, thereby improving the detection efficiency and accuracy of the anthracnose of the apple tree and providing more valuable decision bases for disease control.
Table 1 shows the results of the anthracnose detection of the apple trees in the embodiment of the present invention, and it can be found from table 1 that the identification accuracy of the method and the system of the embodiment of the present invention for the anthracnose detection of the apple trees is up to 100%, the minimum is 90%, and the average can reach 93.89%.
TABLE 1
Fig. 5 is a schematic structural diagram of a fruit tree disease diagnosis system provided in an embodiment of the present invention, and as shown in fig. 5, the system includes: a region of interest module 501, a target feature module 502, and a diagnostic module 503, wherein:
the region-of-interest module 501 is used for acquiring a region of interest of a fruit tree disease image to be detected;
the target feature module 502 is configured to obtain a target feature vector according to the HSV color histogram of the region of interest and the texture histogram of the region of interest;
the diagnosis module 503 is configured to input the target feature vector into a classification model, and obtain an attack part and an illness state development stage of the fruit tree to be detected, where the classification model is obtained by training disease images of different parts and different illness state development stages of the fruit tree to be detected as samples.
For the embodiment of the system, to implement the above method embodiments, please refer to the above method embodiments for specific flows and details, which are not described herein again.
Fig. 6 is a schematic entity structure diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 6, the electronic device may include: a processor 601, a communication Interface 602, a memory 603 and a bus 604, wherein the processor 601, the communication Interface 602 and the memory 603 complete communication with each other through the bus 604. The communication interface 602 may be used for information transfer of an electronic device. The processor 601 may call logic instructions in the memory 603 to perform a method comprising: obtaining an interested area of a fruit tree disease image to be detected; acquiring a target characteristic vector according to the HSV color histogram of the region of interest and the texture histogram of the region of interest; and inputting the target characteristic vector into a classification model to obtain the diseased part and the disease development stage of the fruit tree to be detected, wherein the classification model is obtained by training by taking disease images of different parts and different disease development stages of the fruit tree to be detected as samples.
In addition, the logic instructions in the memory 603 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-described method embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented to perform the transmission method provided in the foregoing embodiments when executed by a processor, and for example, the method includes: obtaining an interested area of a fruit tree disease image to be detected; acquiring a target characteristic vector according to the HSV color histogram of the region of interest and the texture histogram of the region of interest; and inputting the target characteristic vector into a classification model to obtain the diseased part and the disease development stage of the fruit tree to be detected, wherein the classification model is obtained by training by taking disease images of different parts and different disease development stages of the fruit tree to be detected as samples.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. A fruit tree disease diagnosis method is characterized by comprising the following steps:
obtaining an interested area of a fruit tree disease image to be detected;
acquiring a target characteristic vector according to the HSV color histogram of the region of interest and the texture histogram of the region of interest;
and inputting the target characteristic vector into a classification model to obtain the diseased part and the disease development stage of the fruit tree to be detected, wherein the classification model is obtained by training by taking disease images of different parts and different disease development stages of the fruit tree to be detected as samples.
2. The fruit tree disease diagnosis method according to claim 1, wherein the HSV color histogram of the region of interest is obtained by:
converting the region of interest image to an HSV color space;
dividing each color channel into a plurality of subintervals according to the HSV three color channels of the region of interest;
and acquiring an HSV color histogram of the region of interest according to the histogram of each subinterval of each color channel.
3. The fruit tree disease diagnosis method according to claim 1, wherein the texture histogram of the region of interest is obtained by:
processing the region of interest through a UPLBP operator to obtain a texture feature map of the region of interest;
dividing the texture feature map into a plurality of sub-blocks, and obtaining a histogram of each sub-block;
and acquiring a texture histogram of the region of interest according to the histogram of each sub-block.
4. The fruit tree disease diagnosis method according to claim 1, wherein the classification model is an SVM classifier, the SVM classifier is obtained by using a radial basis kernel function, and the specific formula is as follows:
K(x,x′)=exp(-||x-x′||2/2σ2),
σ>0,
wherein x is an input characteristic value, x' is a prediction result, and σ is a kernel parameter of the radial basis kernel function.
5. The fruit tree disease diagnosis method according to claim 2, wherein the histogram of each subinterval is obtained by the following formula:
P(i)=ni/N,
wherein P (i) represents the histogram of the ith subinterval, niThe number of pixels in the ith sub-interval is represented, and N represents the number of pixels on the component image where the ith sub-interval is located.
6. The fruit tree disease diagnosis method according to claim 3, wherein the processing the region of interest by the UPLBP operator further comprises, before obtaining the texture feature of the region of interest:
and carrying out graying processing, median filtering and histogram equalization on the region of interest.
7. The fruit tree disease diagnosis method according to claim 1, wherein the disease images of different parts of the fruit tree to be tested specifically include:
the early disease image of the fruit part corresponding to the fruit tree to be detected, the middle disease image of the fruit part corresponding to the fruit tree to be detected, the late disease image of the fruit part corresponding to the fruit tree to be detected, the early disease image of the branch part corresponding to the fruit tree to be detected, the middle disease image of the branch part corresponding to the fruit tree to be detected, the late disease image of the branch part corresponding to the fruit tree to be detected, the early disease image of the fruit platform part corresponding to the fruit tree to be detected, the middle disease image of the fruit platform part corresponding to the fruit tree to be detected, and the late disease image of the fruit platform part corresponding to the fruit tree.
8. A fruit tree disease diagnosis system is characterized by comprising:
the interested region module is used for acquiring an interested region of the fruit tree disease image to be detected;
the target characteristic module is used for acquiring a target characteristic vector according to the HSV color histogram of the region of interest and the texture histogram of the region of interest;
and the diagnosis module is used for inputting the target characteristic vector into a classification model to obtain the diseased part and the disease development stage of the fruit tree to be detected, wherein the classification model is obtained by training by taking disease images of different parts and different disease development stages of the fruit tree to be detected as samples.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and operable on the processor, wherein the processor implements the steps of the method of diagnosing fruit tree diseases according to any one of claims 1 to 7 when executing the program.
10. A non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program when executed by a processor implements the steps of the method for diagnosing fruit tree diseases according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010306669.9A CN111539293A (en) | 2020-04-17 | 2020-04-17 | Fruit tree disease diagnosis method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010306669.9A CN111539293A (en) | 2020-04-17 | 2020-04-17 | Fruit tree disease diagnosis method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111539293A true CN111539293A (en) | 2020-08-14 |
Family
ID=71975075
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010306669.9A Pending CN111539293A (en) | 2020-04-17 | 2020-04-17 | Fruit tree disease diagnosis method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111539293A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112699805A (en) * | 2020-12-31 | 2021-04-23 | 上海市崇明区蔬菜科学技术推广站 | Intelligent recognition system for vegetable pest control |
CN116363519A (en) * | 2023-04-10 | 2023-06-30 | 上海华维可控农业科技集团股份有限公司 | Cloud computing-based controllable agricultural disease prevention cultivation system and method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103514459A (en) * | 2013-10-11 | 2014-01-15 | 中国科学院合肥物质科学研究院 | Method and system for identifying crop diseases and pests based on Android mobile phone platform |
WO2017194276A1 (en) * | 2016-05-13 | 2017-11-16 | Basf Se | System and method for detecting plant diseases |
CN108319927A (en) * | 2018-02-13 | 2018-07-24 | 南京工程学院 | A kind of method of automatic identification disease |
CN110633720A (en) * | 2018-06-22 | 2019-12-31 | 西北农林科技大学 | Corn disease identification method |
-
2020
- 2020-04-17 CN CN202010306669.9A patent/CN111539293A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103514459A (en) * | 2013-10-11 | 2014-01-15 | 中国科学院合肥物质科学研究院 | Method and system for identifying crop diseases and pests based on Android mobile phone platform |
WO2017194276A1 (en) * | 2016-05-13 | 2017-11-16 | Basf Se | System and method for detecting plant diseases |
CN108319927A (en) * | 2018-02-13 | 2018-07-24 | 南京工程学院 | A kind of method of automatic identification disease |
CN110633720A (en) * | 2018-06-22 | 2019-12-31 | 西北农林科技大学 | Corn disease identification method |
Non-Patent Citations (2)
Title |
---|
张云龙;张会敏;谢泽奇;张晴晴;齐国红;: "基于显著区域和PHOG的黄瓜病害识别方法研究" * |
范振军等: "基于ROI 快速检测与融合特征的马铃薯病害识别" * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112699805A (en) * | 2020-12-31 | 2021-04-23 | 上海市崇明区蔬菜科学技术推广站 | Intelligent recognition system for vegetable pest control |
CN116363519A (en) * | 2023-04-10 | 2023-06-30 | 上海华维可控农业科技集团股份有限公司 | Cloud computing-based controllable agricultural disease prevention cultivation system and method |
CN116363519B (en) * | 2023-04-10 | 2024-01-09 | 上海华维可控农业科技集团股份有限公司 | Cloud computing-based controllable agricultural disease prevention cultivation system and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Chuanlei et al. | Apple leaf disease identification using genetic algorithm and correlation based feature selection method | |
Petrellis | A smart phone image processing application for plant disease diagnosis | |
Anand et al. | An application of image processing techniques for detection of diseases on brinjal leaves using k-means clustering method | |
Shi et al. | Automatic road crack detection using random structured forests | |
Sandika et al. | Random forest based classification of diseases in grapes from images captured in uncontrolled environments | |
CN111797712B (en) | Remote sensing image cloud and cloud shadow detection method based on multi-scale feature fusion network | |
CN112949704B (en) | Tobacco leaf maturity state identification method and device based on image analysis | |
Pereira et al. | Recent advances in image processing techniques for automated harvesting purposes: A review | |
Thakur et al. | An innovative approach for fruit ripeness classification | |
CN113222959B (en) | Fresh jujube wormhole detection method based on hyperspectral image convolutional neural network | |
Lv et al. | A segmentation method of red apple image | |
CN111539293A (en) | Fruit tree disease diagnosis method and system | |
CN116524224A (en) | Machine vision-based method and system for detecting type of cured tobacco leaves | |
CN112164030A (en) | Method and device for quickly detecting rice panicle grains, computer equipment and storage medium | |
CN112257730A (en) | Plant pest image identification method, device, equipment and storage medium | |
CN117456358A (en) | Method for detecting plant diseases and insect pests based on YOLOv5 neural network | |
Taujuddin et al. | Detection of plant disease on leaves using blobs detection and statistical analysis | |
Bairwa et al. | Classification of Fruits Based on Shape, Color and Texture using Image Processing Techniques | |
CN115187878A (en) | Unmanned aerial vehicle image analysis-based blade defect detection method for wind power generation device | |
CN114700941A (en) | Strawberry picking method based on binocular vision and robot system | |
CN113723833A (en) | Method and system for evaluating afforestation actual performance quality, terminal equipment and storage medium | |
Jacques et al. | Development of a machine vision yield monitor for shallot onion harvesters | |
Qiongyan et al. | Study on spike detection of cereal plants | |
Mudgil et al. | Identification of Tomato Plant Diseases Using CNN-A Comparative Review | |
CN116523352B (en) | Forest resource information management method and 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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200814 |