CN117974989A - Rapid detection method for garden plant disease and pest areas - Google Patents

Rapid detection method for garden plant disease and pest areas Download PDF

Info

Publication number
CN117974989A
CN117974989A CN202410362779.5A CN202410362779A CN117974989A CN 117974989 A CN117974989 A CN 117974989A CN 202410362779 A CN202410362779 A CN 202410362779A CN 117974989 A CN117974989 A CN 117974989A
Authority
CN
China
Prior art keywords
pixel point
target pixel
pest
target
disease
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
CN202410362779.5A
Other languages
Chinese (zh)
Other versions
CN117974989B (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.)
Jining Municipal Garden Maintenance Center
Original Assignee
Jining Municipal Garden Maintenance Center
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 Jining Municipal Garden Maintenance Center filed Critical Jining Municipal Garden Maintenance Center
Priority to CN202410362779.5A priority Critical patent/CN117974989B/en
Publication of CN117974989A publication Critical patent/CN117974989A/en
Application granted granted Critical
Publication of CN117974989B publication Critical patent/CN117974989B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of image processing, in particular to a rapid detection method for a disease and pest area of a landscape plant, which comprises the following steps: obtaining a target degree value of each suspected plant disease and insect pest pixel point according to the number of the suspected plant disease and insect pest pixel points in the neighborhood range of each suspected plant disease and insect pest pixel point and the distance between the suspected plant disease and insect pest pixel points, and obtaining the target pixel point; obtaining the decay probability of each target pixel according to the gray distribution of the pixel in the neighborhood range of each target pixel, the texture value in the neighborhood range, the target degree value of each target pixel and the gradient difference of the adjacent edge pixels; and obtaining the pest and disease damage areas in the leaf images according to the decay probability of each target pixel point. The invention reduces the influence of illumination on the detection of plant diseases and insect pests and improves the accuracy of the detection of the plant diseases and insect pests in the leaf surfaces of garden plants.

Description

Rapid detection method for garden plant disease and pest areas
Technical Field
The invention relates to the technical field of image processing, in particular to a rapid detection method for a garden plant disease and pest area.
Background
The garden plant diseases and insect pests refer to diseases and insect pests suffered by plants in gardens; among them, powdery mildew of garden plants is a relatively common disease, powdery mildew is a disease caused by a kind of fungi, and is characterized in that white or off-white powdery substances appear on the surfaces of plant leaves. In order to facilitate specific analysis of the disease condition of the landscape plants suffering from powdery mildew, the disease areas on the surfaces of the plant leaves need to be extracted by an image technology.
In the process of detecting plant diseases and insect pests on leaves of garden plants, according to gray level differences among pixel points in leaf images of the garden plants, obtaining plant diseases and insect pest areas in leaf surfaces of the garden plants through a density clustering algorithm; because the influence of illumination exists when the leaf image of the landscape plant is collected, the gray value of the normal pixel point in the suspected disease and pest area is similar to the gray value of the suspected disease and pest pixel point, and the accuracy of detecting the disease and pest area in the leaf surface of the landscape plant can be reduced.
Disclosure of Invention
The invention provides a rapid detection method for a disease and pest area of a landscape plant, which aims to solve the existing problems.
The invention relates to a rapid detection method for a disease and pest area of a landscape plant, which adopts the following technical scheme:
The embodiment of the invention provides a rapid detection method for a disease and pest area of a landscape plant, which comprises the following steps:
acquiring leaf images of garden plants;
Dividing the leaf image to obtain a suspected disease and pest area, marking the pixel points in the suspected disease and pest area as suspected disease and pest pixel points, obtaining a target degree value of each suspected disease and pest pixel point according to the number of the suspected disease and pest pixel points in the neighborhood range of each suspected disease and pest pixel point and the distance between the suspected disease and pest pixel points, and screening out the target pixel points from all the suspected disease and pest pixel points according to the target degree value of each suspected disease and pest pixel point;
obtaining the decay probability of each target pixel point according to the gray level distribution of the pixel point in the neighborhood range of each target pixel point, the gradient distribution of the pixel point in the neighborhood range, the target degree value of each target pixel point and the gradient difference of the adjacent edge pixel points;
And selecting a part of areas corresponding to the pixel points from all the target pixel points according to the decay probability of each target pixel point, and taking the areas as the pest and disease damage areas in the leaf image.
Further, the segmentation of the leaf image to obtain the suspected pest and disease damage region comprises the following specific steps:
And carrying out threshold segmentation on the leaf image through an Ojin threshold algorithm to obtain two segmentation areas, and marking the segmentation area with the maximum average value of gray values of all pixel points in the segmentation area as a suspected disease and pest area.
Further, the method includes the specific steps of:
taking each pixel point suspected to be pest as a local window center point, so as to Obtaining a local window of each suspected plant disease and insect pest pixel point for the size of the local window, wherein/>Presetting a first parameter;
Obtaining a second value of each suspected plant disease and insect pest pixel point according to the difference between the distances between the suspected plant disease and insect pest pixel points; marking the product result between the number of all the suspected plant diseases and insect pests pixels and the second value of each suspected plant diseases and insect pests pixel in the local window of each suspected plant diseases and insect pests pixel as a first product value of each suspected plant diseases and insect pests pixel, carrying out linear normalization on the first product value of all the suspected plant diseases and insect pests pixels, and taking the first product value of each suspected plant diseases and insect pests pixel after normalization as a target degree value of each suspected plant diseases and insect pests pixel;
the target degree value is larger than a preset first threshold value And (3) marking all the suspected plant diseases and insect pests as target pixel points.
Further, the second value of each pixel point of the suspected plant diseases and insect pests is obtained according to the difference between the distances between the pixel points of the suspected plant diseases and insect pests, and the method comprises the following specific steps:
The square of the distance between each suspected plant disease and insect pest pixel point and the average value of the distances between each suspected plant disease and insect pest pixel point and all suspected plant disease and insect pest pixel points in the corresponding local window is recorded as a first difference value of each suspected plant disease and insect pest pixel point in the local window of each suspected plant disease and insect pest pixel point, the sum of the first difference values of all suspected plant disease and insect pest pixel points in the local window of each suspected plant disease and insect pest pixel point is recorded as a first numerical value of each suspected plant disease and insect pest pixel point Will/>A second value as each of the suspected pest pixel points;
Wherein, An exponential function based on a natural constant is represented.
Further, the method obtains the decay probability of each target pixel according to the gray distribution of the pixel in the neighborhood range of each target pixel, the gradient distribution of the pixel in the neighborhood range, the target degree value of each target pixel and the gradient difference of the adjacent edge pixels, and comprises the following specific steps:
Obtaining a decay degree factor of each target pixel point according to the gray values of all the pixel points in the neighborhood range of each target pixel point, the texture values in the neighborhood range and the target degree value of each target pixel point;
Acquiring a centroid point of a leaf image, starting from the centroid point on the leaf image, pointing to the direction of each target pixel point along the centroid point to obtain a ray, and marking the ray as a first ray of each target pixel point; starting from a centroid point on the leaf image, obtaining a ray along the opposite direction of the first ray, and marking the ray as a second ray of each target pixel point; from the centroid point on the leaf image, a counterclockwise rotation along the first ray direction Extending the rear direction to obtain a ray, and marking the ray as a third ray of each target pixel point; clockwise rotation/>, starting from a centroid point on the leaf image, along a first ray directionExtending the rear direction to obtain a ray, and marking the ray as a fourth ray of each target pixel point; acquiring an orthogonal edge pixel point sequence of each target pixel point according to the intersection point of the ray and the leaf edge pixel point;
And obtaining the decay probability of each target pixel according to the distance between the pixels, the decay degree factor of each target pixel and the slope difference of all adjacent edge pixels in the orthogonal edge pixel sequence of each target pixel.
Further, the step of obtaining the attenuation degree factor of each target pixel point according to the gray values of all the pixel points in the neighborhood range of each target pixel point, the texture values in the neighborhood range and the target degree value of each target pixel point comprises the following specific steps:
The average value of gray values of all non-target pixels in a local window of each target pixel is recorded as a first average value of each target pixel, the accumulated sum of texture values of all non-target pixels in the local window of each target pixel is recorded as a third value of the target pixel, the inverse number of the third value of the target pixel is recorded as a fourth value of the target pixel, and the product result among the first average value of each target pixel, the fourth value of the target pixel and the target degree value of each target pixel is used as a decay degree factor of each target pixel.
Further, the step of obtaining the orthogonal edge pixel point sequence of each target pixel point according to the intersection point of the ray and the leaf edge pixel point comprises the following specific steps:
The pixel points, where the first ray of each target pixel point intersects with the leaf edge pixel points, are marked as orthogonal pixel points, B edge pixel points on the left side and B edge pixel points on the right side, which are adjacent to the orthogonal pixel points, are obtained, all 2B+1 edge pixel points are ordered according to the sequence from left to right, and an orthogonal edge pixel point sequence of each target pixel point is obtained;
Wherein B is a preset second parameter.
Further, the method for obtaining the attenuation probability of each target pixel point according to the distance between the pixel points, the attenuation degree factor of each target pixel point, and the gradient difference of all adjacent edge pixel points in the orthogonal edge pixel point sequence of each target pixel point comprises the following specific steps:
The pixel points where the second ray of each target pixel point intersects with the pixel points at the edge of the leaf are marked as inverse intersection pixel points; a pixel point where the third ray of each target pixel point intersects with the pixel point of the edge of the leaf is marked as a first vertical intersection pixel point; a pixel point where the fourth ray of each target pixel point intersects with the pixel point of the edge of the leaf is marked as a second vertical intersection pixel point;
Recording the absolute value of the difference value between the average value of the distances from the orthogonal pixel point to the centroid point of each target pixel point, the inverse intersection pixel point of each target pixel point, the first vertical intersection pixel point and the second vertical intersection pixel point to the centroid point as the first absolute value of each target pixel point;
Recording the slope between any one edge pixel point and any one right adjacent edge pixel point in the orthogonal edge pixel point sequence of each target pixel point as the first slope of each adjacent two edge pixel points in the orthogonal edge pixel point sequence of each target pixel point, according to the sequence of the orthogonal edge pixel point sequence of each target pixel point, obtaining a group of slope sequences, recording as the slope sequence of each target pixel point, recording the absolute value of the difference value between the adjacent two slopes of the slope sequence of each target pixel point as the absolute value of the first difference value of each adjacent two slopes in the slope sequence of each target pixel point, and recording the average value of the absolute values of the first difference values of all adjacent two slopes in the slope sequence of each target pixel point as the second average value of each target pixel point;
And obtaining the decay probability of each target pixel point according to the first absolute value of each target pixel point, the second average value of each target pixel point and the decay degree factor of each target pixel point.
Further, the method for obtaining the attenuation probability of each target pixel point according to the first absolute value of each target pixel point, the second average value of each target pixel point and the attenuation degree factor of each target pixel point comprises the following specific steps:
recording a product result among the first absolute value of each target pixel point, the second average value of each target pixel point and the attenuation degree factor of each target pixel point as a second product value of each target pixel point;
and carrying out linear normalization on the second product value of all the target pixel points, and taking the normalized second product value of each target pixel point as the decay probability of each target pixel point.
Further, according to the attenuation probability of each target pixel, selecting a region corresponding to a part of pixels from all the target pixels as a pest and disease damage region in the leaf image, including the following specific steps:
clustering all the target pixel points through a density clustering algorithm according to the gray values and positions of all the target pixel points to obtain a plurality of class clusters of the target pixel points; the average value of decay probabilities of all target pixel points of each class cluster is smaller than or equal to a preset second threshold value Marking all clusters of the target pixel points of each cluster as pest and disease damage clusters, wherein the average value of decay probability of all target pixel points of each cluster is larger than a preset second threshold/>The target pixel points in all the disease and insect pest clusters are marked as disease and insect pest pixel points, and the area occupied by the disease and insect pest pixel points is marked as the disease and insect pest area in the leaf image.
The technical scheme of the invention has the beneficial effects that: according to the method, the target degree value of each suspected plant disease and insect pest pixel point is obtained according to the number of the suspected plant disease and insect pest pixel points in the neighborhood range of each suspected plant disease and insect pest pixel point and the distance between the suspected plant disease and insect pest pixel points, and the target pixel points are screened out from all the suspected plant disease and insect pest pixel points according to the target degree value of each suspected plant disease and insect pest pixel point, so that the accuracy of gray level difference analysis is improved; obtaining the decay probability of each target pixel according to the gray distribution of the pixel in the neighborhood range of each target pixel, the texture value in the neighborhood range, the target degree value of each target pixel and the gradient difference of the adjacent edge pixels; according to the decay probability of each target pixel point, selecting a part of areas corresponding to the pixel points from all the target pixel points as the pest and disease damage areas in the leaf images, reducing the influence of illumination on pest and disease damage detection, and improving the accuracy of pest and disease damage area detection in the leaf surfaces of garden plants.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart showing the steps of a rapid detection method for a disease and pest area of a landscape plant;
fig. 2 is a flowchart of rapid detection of a pest and disease damage area of a landscape plant.
Detailed Description
In order to further explain the technical means and effects adopted by the invention to achieve the preset aim, the following is a specific implementation, structure, characteristics and effects of a rapid detection method for a disease and pest area of a landscape plant according to the invention, which are described in detail below with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following specifically describes a specific scheme of the rapid detection method for the plant disease and pest areas of the garden plants provided by the invention with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of steps of a method for rapidly detecting pest and disease areas of garden plants according to an embodiment of the present invention is shown, the method includes the following steps:
Step S001: leaf images of garden plants are collected.
In order to analyze whether the leaves of the garden plants have powdery mildew or not, leaf images of the garden plants need to be collected, and the good areas of the leaves are detected by analyzing the leaf images.
Specifically, leaf RGB images of garden plants are collected, the leaf RGB images are segmented through a semantic segmentation algorithm to obtain foreground areas and background areas of the leaves, and then the foreground areas of the leaves are subjected to graying and median filtering denoising pretreatment to obtain leaf images of the garden plants.
The semantic segmentation algorithm, graying and median filtering denoising are all known techniques, and detailed descriptions are not repeated here.
The semantic segmentation network used in this embodiment is DeepLabV network, which is a known technology, and specific results and training methods of the network are not described in detail in this embodiment.
Thus, leaf images of garden plants are obtained.
Step S002: dividing the leaf image to obtain a suspected disease and pest area, marking the pixel points in the suspected disease and pest area as suspected disease and pest pixel points, obtaining a target degree value of each suspected disease and pest pixel point according to the density of the suspected disease and pest pixel points in the neighborhood range of each suspected disease and pest pixel point and the distance between the suspected disease and pest pixel points, and screening out the target pixel points from all the suspected disease and pest pixel points according to the target degree value of each suspected disease and pest pixel point.
It should be noted that, because the gray value of the powdery mildew area is larger, and because the gray value is affected by illumination when the leaf image is acquired, when the leaf image is segmented by the image segmentation technology, the pixel points in the normal area in the leaf image may be divided into the pixel points of the suspected disease and pest area, so that the final disease and pest area needs to be acquired by performing cluster analysis on the pixel points in the suspected disease and pest area.
Specifically, the leaf image is subjected to threshold segmentation through an Ojin threshold algorithm to obtain two segmentation areas, the segmentation area with the smallest average value of gray values of all pixel points in the segmentation area is marked as a normal area, and the segmentation area with the largest average value of gray values of all pixel points in the segmentation area is marked as a suspected disease and pest area. The oxford threshold algorithm is a well-known technique, and will not be described in detail herein.
It should be noted that, since the powdery mildew area often appears in a slice, that is, the more the number of the suspected pest pixels appears in the neighborhood of each suspected pest pixel, the more likely it is that each suspected pest pixel is a pest pixel, and conversely, the less likely it is that each suspected pest pixel is a pest pixel.
Specifically, the pixel points in the normal region are designated as normal pixel points, and the pixel points in the suspected pest and disease damage region are designated as suspected pest and disease damage pixel points. Presetting a first parameterWherein the present embodiment is described as/>To describe the example, the present embodiment is not particularly limited, wherein/>Depending on the particular implementation. Taking each suspected plant disease and insect pest pixel point as a local window center point so as to/>And obtaining a local window of each suspected plant disease and insect pest pixel point by taking the size of the local window as the size of the local window.
According to the number of the suspected plant diseases and insect pests pixels in the local window of each suspected plant diseases and insect pests pixel and the distance between the suspected plant diseases and insect pests pixels, a target degree value of each suspected plant diseases and insect pests pixel is obtained, and as an embodiment, the specific calculation method comprises the following steps:
in the method, in the process of the invention, Represents the/>The number of all the suspected pest pixel points in the local window of each suspected pest pixel point,/>Represents the/>Each suspected plant disease and insect pest pixel point and the corresponding local window are in the first/>Distance between each two suspected pest pixel points,/>Represents the/>Average value of distances between each suspected disease and pest pixel point and all suspected disease and pest pixel points in corresponding local window,/>Representing an exponential function based on a natural constant,/>Representing a linear normalization function,/>Represents the/>Target degree values of the suspected pest pixels.
Wherein,Representing the difference of the distance between each suspected plant disease and insect pest pixel point and any suspected plant disease and insect pest pixel point in the corresponding local window, and judging that the probability that each suspected plant disease and insect pest pixel point is a plant disease and insect pest pixel point is smaller when the difference is larger, namely the target degree value of each suspected plant disease and insect pest pixel point is smaller; when the difference is smaller, the probability that each suspected disease and pest pixel point is judged to be a disease and pest pixel point is larger, namely the target degree value of each suspected disease and pest pixel point is larger. When the number of all the suspected plant diseases and insect pests pixel points in the local window of each suspected plant diseases and insect pests pixel point is larger, the probability that each suspected plant diseases and insect pests pixel point is the plant diseases and insect pests pixel point is judged to be larger, namely the target degree value of each suspected plant diseases and insect pests pixel point is larger; when the number of all the suspected plant diseases and insect pests pixels in the local window of each suspected plant diseases and insect pests pixel is smaller, the probability that each suspected plant diseases and insect pests pixel is a plant diseases and insect pests pixel is judged to be smaller, namely the target degree value of each suspected plant diseases and insect pests pixel is smaller.
Presetting a first threshold valueWherein the present embodiment is described as/>To describe the example, the present embodiment is not particularly limited, wherein/>Depending on the particular implementation.
The target degree value is larger than a preset first threshold valueAnd (3) marking all the suspected plant diseases and insect pests as target pixel points.
So far, all target pixel points are obtained.
Step S003: and obtaining the decay probability of each target pixel point according to the gray level distribution of the pixel point in the neighborhood range of each target pixel point, the gradient distribution of the pixel point in the neighborhood range, the target degree value of each target pixel point and the gradient difference of the adjacent edge pixel points.
It should be noted that, the greater the possibility that the target pixel is a pest pixel, the more gray values of all pixels in the neighborhood range of each target pixel can be analyzed, and the gray values of the pest pixel are greater than those of the normal pixel because the pest region is off-white; the plant diseases and insect pests are caused by powdery mildew, so that the texture of the plant diseases and insect pests in the collected leaf image is more vague compared with the texture of the normal area; therefore, the gray values of all pixels in the neighborhood range of the target pixel point and the texture values in the neighborhood range can be further analyzed.
Specifically, according to the gray values of all the pixels in the neighborhood range of each target pixel, the texture values in the neighborhood range, and the target degree value of each target pixel, the attenuation degree factor of each target pixel is obtained, and as an embodiment, the specific calculation method is as follows:
in the method, in the process of the invention, Represents the/>Target degree value of each target pixel point,/>Represents the/>Average value of gray values of all non-target pixel points in local window of each target pixel point,/>Represents the/>Within the local window of each target pixel point/>Texture value of each non-target pixel point,/>Representing the number of all non-target pixel points in the local window of each target pixel point,/>Represents the/>The degree of decay factor of each target pixel point.
When the target degree value of each target pixel point is larger, the probability that each target pixel point is used as a disease and pest pixel point is larger, and otherwise, the probability that each target pixel point is used as a disease and pest pixel point is smaller; when the average value of gray values of all non-target pixel points in the local window of each target pixel point is larger, the probability that each target pixel point is used as a disease and pest pixel point is larger, otherwise, the probability that each target pixel point is used as a disease and pest pixel point is smaller; The summation of the texture values of all non-target pixel points in the local window of each target pixel point is represented, and when the summation of the texture values of the pixel points is larger, the clearer the texture of the pixel points in the neighborhood range of each target pixel point is indicated, namely, the greater the probability that the target pixel point is a pixel point in a normal area is, the smaller the probability that the target pixel point is a pixel point of diseases and insect pests is; when the summation of the texture values of the pixel points is smaller, the more blurred the texture of the pixel point in the neighborhood range of each target pixel point is, namely, the less the probability that the target pixel point is the pixel point of the normal area is, the greater the probability that the target pixel point is the pixel point of the plant diseases and insect pests is. And when the probability that each target pixel point is a plant disease and insect pest pixel point is higher, the attenuation degree factor of the target pixel point is higher.
The process of obtaining the texture value of the pixel point is known in the art, and detailed description thereof is omitted herein.
So far, the attenuation degree factor of each target pixel point is obtained.
In the leaf image, the leaf edge is affected by powdery mildew, so that the leaf starts to shrink due to the attenuation, the leaf does not become opposite, and the leaf edge starts to become unsmooth.
Specifically, a centroid point of a leaf image is obtained, and a ray is obtained from the centroid point on the leaf image along the direction of pointing to each target pixel point along the centroid point and is recorded as a first ray of each target pixel point; starting from a centroid point on the leaf image, obtaining a ray along the opposite direction of the first ray, and marking the ray as a second ray of each target pixel point; from the centroid point on the leaf image, a counterclockwise rotation along the first ray directionExtending the rear direction to obtain a ray, and marking the ray as a third ray of each target pixel point; clockwise rotation/>, starting from a centroid point on the leaf image, along a first ray directionAnd extending in the rear direction to obtain a ray, and marking the ray as a fourth ray of each target pixel point. The pixel points where the first ray of each target pixel point intersects with the pixel points at the edge of the leaf are marked as orthogonal pixel points; the pixel points where the second ray of each target pixel point intersects with the pixel points at the edge of the leaf are marked as inverse intersection pixel points; a pixel point where the third ray of each target pixel point intersects with the pixel point of the edge of the leaf is marked as a first vertical intersection pixel point; and (3) marking the pixel point where the fourth ray of each target pixel point intersects with the pixel point of the leaf edge as a second vertical intersection pixel point. The edge pixels in this embodiment are only pixels on the edge of the leaf.
A second parameter B is preset, where the embodiment is described by taking b=10 as an example, and the embodiment is not specifically limited, where B may be determined according to the specific implementation. B edge pixel points on the left side and B edge pixel points on the right side, which are adjacent to the orthogonal pixel points, are obtained, and all 2B+1 edge pixel points are ordered according to the sequence from left to right to obtain an orthogonal edge pixel point sequence of each target pixel point. In this embodiment, all 2b+1 edge pixel points may be ordered in the order from right to left, to obtain an orthogonal edge pixel point sequence of each target pixel point.
According to the distance between the intersecting pixel point and the centroid point, the attenuation degree factor of each target pixel point and the gradient difference of all adjacent edge pixel points in the orthogonal edge pixel point sequence of each target pixel point, the attenuation probability of each target pixel point is obtained, and as an embodiment, the specific calculation method comprises the following steps:
in the method, in the process of the invention, Represents the/>The decay degree factor of each target pixel point,/>Represents the/>Distance between orthogonal pixel point of each target pixel point and centroid point,/>Represents the/>Average value of distances between inverse intersecting pixel point, first vertical intersecting pixel point and second vertical intersecting pixel point of each target pixel point and centroid point,/>Represents the/>The first/>, in the orthogonal edge pixel point sequence of each target pixel pointEdge pixel and the/>Slope between edge pixels,/>Represents the/>The first/>, in the orthogonal edge pixel point sequence of each target pixel pointEdge pixel and the/>Slope between edge pixels,/>Representing the number of edge pixel points in the orthogonal edge pixel point sequence of each target pixel point,/>Is the absolute value sign,/>Represents the/>Probability of decay of individual target pixel points,/>An exponential function based on a natural constant is represented.
Wherein,The difference between the average values of the distances between the orthogonal pixel point and the centroid point of each target pixel point, the inverse intersection pixel point of each target pixel point, the first vertical intersection pixel point and the second vertical intersection pixel point and the centroid point is represented, when the difference is larger, the leaf is shrunken due to the influence of diseases and insect pests, the leaf is asymmetric, the greater the possibility that the target pixel point is the disease and insect pest pixel point is indicated, and otherwise, the smaller the possibility that the target pixel point is the disease and insect pest pixel point is indicated. /(I)And (3) representing the average value of the differences of the slopes of all adjacent edge pixel points in the orthogonal edge pixel point sequence of each target pixel point, wherein when the average value of the differences is larger, the edge of the leaf image is not smooth, which indicates that the leaf is shrunken due to the influence of diseases and insect pests, the greater the possibility that the target pixel point is a disease and insect pest pixel point is indicated, and otherwise, the lesser the possibility that the target pixel point is a disease and insect pest pixel point is indicated. And when the attenuation degree factor of the target pixel point is larger, the possibility that the target pixel point is the pest pixel point is indicated to be larger, otherwise, the possibility that the target pixel point is the pest pixel point is smaller. The greater the likelihood that the target pixel is a pest pixel, the greater the probability of decay for each target pixel.
So far, the decay probability of each target pixel point is obtained.
Step S004: and selecting a part of areas corresponding to the pixel points from all the target pixel points according to the decay probability of each target pixel point, and taking the areas as the pest and disease damage areas in the leaf image.
Presetting a second threshold valueWherein the present embodiment is described as/>To describe the example, the present embodiment is not particularly limited, wherein/>Depending on the particular implementation.
And clustering all the target pixel points through a density clustering algorithm according to the gray values and the positions of all the target pixel points to obtain a plurality of class clusters of the target pixel points. And calculating the average value of decay probabilities of all target pixel points of each class cluster. The average value of decay probabilities of all target pixel points of each class cluster is smaller than or equal to a preset second threshold valueMarking all clusters of the target pixel points of each cluster as pest and disease damage clusters, wherein the average value of decay probabilities of all target pixel points of each cluster is larger than a preset second threshold valueThe target pixel points in all the disease and insect pest clusters are marked as disease and insect pest pixel points, and the area occupied by the disease and insect pest pixel points is marked as the disease and insect pest area of the leaves. A flow chart of the rapid detection of the pest and disease areas of the garden plants is shown in figure 2.
The density clustering algorithm is a well-known technique, and will not be described in detail herein.
This embodiment is completed.
The following examples were usedThe model is only used to represent the negative correlation and the result output by the constraint model is at/>In the section, other models with the same purpose can be replaced in the specific implementation, and the embodiment is only to/>The model is described as an example, and is not particularly limited, wherein/>Refers to the input of the model.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the invention, but any modifications, equivalent substitutions, improvements, etc. within the principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A rapid detection method for a garden plant disease and pest area is characterized by comprising the following steps:
acquiring leaf images of garden plants;
Dividing the leaf image to obtain a suspected disease and pest area, marking the pixel points in the suspected disease and pest area as suspected disease and pest pixel points, obtaining a target degree value of each suspected disease and pest pixel point according to the number of the suspected disease and pest pixel points in the neighborhood range of each suspected disease and pest pixel point and the distance between the suspected disease and pest pixel points, and screening out the target pixel points from all the suspected disease and pest pixel points according to the target degree value of each suspected disease and pest pixel point;
obtaining the decay probability of each target pixel point according to the gray level distribution of the pixel point in the neighborhood range of each target pixel point, the gradient distribution of the pixel point in the neighborhood range, the target degree value of each target pixel point and the gradient difference of the adjacent edge pixel points;
And selecting a part of areas corresponding to the pixel points from all the target pixel points according to the decay probability of each target pixel point, and taking the areas as the pest and disease damage areas in the leaf image.
2. The rapid detection method for a disease and pest area of a landscape plant according to claim 1, wherein the step of segmenting the leaf image to obtain a suspected disease and pest area comprises the following specific steps:
And carrying out threshold segmentation on the leaf image through an Ojin threshold algorithm to obtain two segmentation areas, and marking the segmentation area with the maximum average value of gray values of all pixel points in the segmentation area as a suspected disease and pest area.
3. The method for rapidly detecting a plant disease and pest area according to claim 1, wherein the step of obtaining a target degree value of each suspected disease and pest pixel point according to the number of the suspected disease and pest pixel points in the neighborhood range of each suspected disease and pest pixel point and the distance between the suspected disease and pest pixel points, and screening out the target pixel points from all the suspected disease and pest pixel points according to the target degree value of each suspected disease and pest pixel point comprises the following specific steps:
taking each pixel point suspected to be pest as a local window center point, so as to Obtaining a local window of each suspected plant disease and insect pest pixel point for the size of the local window, wherein/>Presetting a first parameter;
Obtaining a second value of each suspected plant disease and insect pest pixel point according to the difference between the distances between the suspected plant disease and insect pest pixel points; marking the product result between the number of all the suspected plant diseases and insect pests pixels and the second value of each suspected plant diseases and insect pests pixel in the local window of each suspected plant diseases and insect pests pixel as a first product value of each suspected plant diseases and insect pests pixel, carrying out linear normalization on the first product value of all the suspected plant diseases and insect pests pixels, and taking the first product value of each suspected plant diseases and insect pests pixel after normalization as a target degree value of each suspected plant diseases and insect pests pixel;
the target degree value is larger than a preset first threshold value And (3) marking all the suspected plant diseases and insect pests as target pixel points.
4. A rapid detection method for a pest area of a landscape plant according to claim 3, wherein the obtaining the second value of each pixel of suspected pest according to the difference between the distances between the pixels of suspected pest comprises the following specific steps:
The square of the distance between each suspected plant disease and insect pest pixel point and the average value of the distances between each suspected plant disease and insect pest pixel point and all suspected plant disease and insect pest pixel points in the corresponding local window is recorded as a first difference value of each suspected plant disease and insect pest pixel point in the local window of each suspected plant disease and insect pest pixel point, the sum of the first difference values of all suspected plant disease and insect pest pixel points in the local window of each suspected plant disease and insect pest pixel point is recorded as a first numerical value of each suspected plant disease and insect pest pixel point Will/>A second value as each of the suspected pest pixel points;
Wherein, An exponential function based on a natural constant is represented.
5. The method for rapidly detecting pest and disease damage areas of garden plants according to claim 1, wherein the obtaining of the decay probability of each target pixel according to the gray distribution of the pixel in the neighborhood range of each target pixel, the gradient distribution of the pixel in the neighborhood range, the target degree value of each target pixel, and the gradient difference of the adjacent edge pixels comprises the following specific steps:
Obtaining a decay degree factor of each target pixel point according to the gray values of all the pixel points in the neighborhood range of each target pixel point, the texture values in the neighborhood range and the target degree value of each target pixel point;
Acquiring a centroid point of a leaf image, starting from the centroid point on the leaf image, pointing to the direction of each target pixel point along the centroid point to obtain a ray, and marking the ray as a first ray of each target pixel point; starting from a centroid point on the leaf image, obtaining a ray along the opposite direction of the first ray, and marking the ray as a second ray of each target pixel point; from the centroid point on the leaf image, a counterclockwise rotation along the first ray direction Extending the rear direction to obtain a ray, and marking the ray as a third ray of each target pixel point; clockwise rotation/>, starting from a centroid point on the leaf image, along a first ray directionExtending the rear direction to obtain a ray, and marking the ray as a fourth ray of each target pixel point; acquiring an orthogonal edge pixel point sequence of each target pixel point according to the intersection point of the ray and the leaf edge pixel point;
And obtaining the decay probability of each target pixel according to the distance between the pixels, the decay degree factor of each target pixel and the slope difference of all adjacent edge pixels in the orthogonal edge pixel sequence of each target pixel.
6. The method for rapidly detecting pest and disease damage areas of garden plants according to claim 5, wherein the obtaining the attenuation degree factor of each target pixel according to the gray values of all pixels in the neighborhood range of each target pixel, the texture values in the neighborhood range, and the target degree value of each target pixel comprises the following specific steps:
The average value of gray values of all non-target pixels in a local window of each target pixel is recorded as a first average value of each target pixel, the accumulated sum of texture values of all non-target pixels in the local window of each target pixel is recorded as a third value of the target pixel, the inverse number of the third value of the target pixel is recorded as a fourth value of the target pixel, and the product result among the first average value of each target pixel, the fourth value of the target pixel and the target degree value of each target pixel is used as a decay degree factor of each target pixel.
7. The rapid detection method for a garden plant disease and pest area according to claim 5, wherein the step of obtaining the orthogonal edge pixel point sequence of each target pixel point according to the intersection point of the ray and the leaf edge pixel points comprises the following specific steps:
The pixel points, where the first ray of each target pixel point intersects with the leaf edge pixel points, are marked as orthogonal pixel points, B edge pixel points on the left side and B edge pixel points on the right side, which are adjacent to the orthogonal pixel points, are obtained, all 2B+1 edge pixel points are ordered according to the sequence from left to right, and an orthogonal edge pixel point sequence of each target pixel point is obtained;
Wherein B is a preset second parameter.
8. The rapid detection method for pest and disease damage areas of landscape plants according to claim 5, wherein the obtaining of the decay probability of each target pixel according to the distance between the pixels, the decay degree factor of each target pixel, and the slope difference of all adjacent edge pixels in the orthogonal edge pixel sequence of each target pixel comprises the following specific steps:
The pixel points where the second ray of each target pixel point intersects with the pixel points at the edge of the leaf are marked as inverse intersection pixel points; a pixel point where the third ray of each target pixel point intersects with the pixel point of the edge of the leaf is marked as a first vertical intersection pixel point; a pixel point where the fourth ray of each target pixel point intersects with the pixel point of the edge of the leaf is marked as a second vertical intersection pixel point;
Recording the absolute value of the difference value between the average value of the distances from the orthogonal pixel point to the centroid point of each target pixel point, the inverse intersection pixel point of each target pixel point, the first vertical intersection pixel point and the second vertical intersection pixel point to the centroid point as the first absolute value of each target pixel point;
Recording the slope between any one edge pixel point and any one right adjacent edge pixel point in the orthogonal edge pixel point sequence of each target pixel point as the first slope of each adjacent two edge pixel points in the orthogonal edge pixel point sequence of each target pixel point, according to the sequence of the orthogonal edge pixel point sequence of each target pixel point, obtaining a group of slope sequences, recording as the slope sequence of each target pixel point, recording the absolute value of the difference value between the adjacent two slopes of the slope sequence of each target pixel point as the absolute value of the first difference value of each adjacent two slopes in the slope sequence of each target pixel point, and recording the average value of the absolute values of the first difference values of all adjacent two slopes in the slope sequence of each target pixel point as the second average value of each target pixel point;
And obtaining the decay probability of each target pixel point according to the first absolute value of each target pixel point, the second average value of each target pixel point and the decay degree factor of each target pixel point.
9. The rapid detection method for pest and disease damage areas of garden plants according to claim 8, wherein the obtaining the decay probability of each target pixel according to the first absolute value of each target pixel, the second average value of each target pixel and the decay degree factor of each target pixel comprises the following specific steps:
recording a product result among the first absolute value of each target pixel point, the second average value of each target pixel point and the attenuation degree factor of each target pixel point as a second product value of each target pixel point;
and carrying out linear normalization on the second product value of all the target pixel points, and taking the normalized second product value of each target pixel point as the decay probability of each target pixel point.
10. The rapid detection method for pest and disease damage areas of landscape plants according to claim 1, wherein the selecting a part of areas corresponding to the pixel points from all the target pixel points as pest and disease damage areas in the leaf image according to the decay probability of each target pixel point comprises the following specific steps:
clustering all the target pixel points through a density clustering algorithm according to the gray values and positions of all the target pixel points to obtain a plurality of class clusters of the target pixel points; the average value of decay probabilities of all target pixel points of each class cluster is smaller than or equal to a preset second threshold value Marking all clusters of the target pixel points of each cluster as pest and disease damage clusters, wherein the average value of decay probability of all target pixel points of each cluster is larger than a preset second threshold/>The target pixel points in all the disease and insect pest clusters are marked as disease and insect pest pixel points, and the area occupied by the disease and insect pest pixel points is marked as the disease and insect pest area in the leaf image.
CN202410362779.5A 2024-03-28 2024-03-28 Rapid detection method for garden plant disease and pest areas Active CN117974989B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410362779.5A CN117974989B (en) 2024-03-28 2024-03-28 Rapid detection method for garden plant disease and pest areas

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410362779.5A CN117974989B (en) 2024-03-28 2024-03-28 Rapid detection method for garden plant disease and pest areas

Publications (2)

Publication Number Publication Date
CN117974989A true CN117974989A (en) 2024-05-03
CN117974989B CN117974989B (en) 2024-07-02

Family

ID=90855633

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410362779.5A Active CN117974989B (en) 2024-03-28 2024-03-28 Rapid detection method for garden plant disease and pest areas

Country Status (1)

Country Link
CN (1) CN117974989B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118196841A (en) * 2024-05-17 2024-06-14 山东绿博园市政工程有限公司 Garden plant diseases and insect pests intelligent prevention and control method and system based on infrared image

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020199776A1 (en) * 2019-03-29 2020-10-08 京东方科技集团股份有限公司 Shelf vacancy rate calculation method and device, and storage medium
CN115351598A (en) * 2022-10-17 2022-11-18 南通钜德智能科技有限公司 Numerical control machine tool bearing detection method
CN116630815A (en) * 2023-07-25 2023-08-22 济南玖通志恒信息技术有限公司 Intelligent agricultural pest detection method
CN117557573A (en) * 2024-01-12 2024-02-13 群亿光电(深圳)有限公司 OCA film bubble detection method based on computer vision

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020199776A1 (en) * 2019-03-29 2020-10-08 京东方科技集团股份有限公司 Shelf vacancy rate calculation method and device, and storage medium
CN115351598A (en) * 2022-10-17 2022-11-18 南通钜德智能科技有限公司 Numerical control machine tool bearing detection method
CN116630815A (en) * 2023-07-25 2023-08-22 济南玖通志恒信息技术有限公司 Intelligent agricultural pest detection method
CN117557573A (en) * 2024-01-12 2024-02-13 群亿光电(深圳)有限公司 OCA film bubble detection method based on computer vision

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SHIPING ZHU ET AL.: "An image segmentation algorithm in image processing based on threshold segmentation", 《2007 THIRD INTERNATIONAL IEEE CONFERENCE ON SIGNAL-IMAGE TECHNOLOGIES AND INTERNET-BASED SYSTEM》, 3 September 2008 (2008-09-03) *
王文奇: "基于DeepLabV3+的水培生菜异常叶片分割方法及分选装置研究", 《中国优秀硕士学位论文全文数据库 农业科技辑》, no. 1, 15 January 2022 (2022-01-15) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118196841A (en) * 2024-05-17 2024-06-14 山东绿博园市政工程有限公司 Garden plant diseases and insect pests intelligent prevention and control method and system based on infrared image

Also Published As

Publication number Publication date
CN117974989B (en) 2024-07-02

Similar Documents

Publication Publication Date Title
CN117974989B (en) Rapid detection method for garden plant disease and pest areas
CN110120042B (en) Crop image pest and disease damage area extraction method based on SLIC super-pixel and automatic threshold segmentation
CN110309781B (en) House damage remote sensing identification method based on multi-scale spectrum texture self-adaptive fusion
CN109636784B (en) Image saliency target detection method based on maximum neighborhood and super-pixel segmentation
JP6192271B2 (en) Image processing apparatus, image processing method, and program
CN106340016B (en) A kind of DNA quantitative analysis method based on microcytoscope image
CN116310360A (en) Reactor surface defect detection method
CN109978848B (en) Method for detecting hard exudation in fundus image based on multi-light-source color constancy model
CN112598713A (en) Offshore submarine fish detection and tracking statistical method based on deep learning
CN116229335B (en) Livestock and poultry farm environment recognition method based on image data
CN109685045A (en) A kind of Moving Targets Based on Video Streams tracking and system
CN115661669B (en) Method and system for monitoring illegal farmland occupancy based on video monitoring
CN115908371B (en) Plant leaf disease and pest degree detection method based on optimized segmentation
CN111339924B (en) Polarized SAR image classification method based on superpixel and full convolution network
CN109871900A (en) The recognition positioning method of apple under a kind of complex background based on image procossing
CN112184684A (en) Improved YOLO-v3 algorithm and application thereof in lung nodule detection
CN114581451A (en) Scattering map neural network-based brain magnetic resonance image segmentation method
CN1564600A (en) Detection method of moving object under dynamic scene
CN114283431B (en) Text detection method based on differentiable binarization
CN115631372A (en) Land information classification management method based on soil remote sensing data
CN117292137B (en) Aerial remote sensing image optimization segmentation processing method
CN116977827A (en) Iron ore detection method and system based on artificial intelligence
CN116524269A (en) Visual recognition detection system
CN106611418A (en) Image segmentation algorithm
CN115861308A (en) Disease detection method for acer truncatum

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