A kind of intelligent monitoring method of green stink bug in tea garden
Through intelligent monitoring methods, using cameras and deep neural networks, the problem of interference in counting green bugs in tea gardens has been solved, accurate detection and real-time monitoring of green bugs have been achieved, the accuracy of pest prediction has been improved, and the ecological environment of tea trees has been protected. .
Patent Information
- Application Number
- CN202311813318.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2043-12-26
AI Technical Summary
In the existing technology, there is an interference problem in the counting of green bugs in tea gardens, which makes it difficult to accurately identify the number of green bugs, which affects the judgment of the pest occurrence period, leads to excessive or untimely control, and affects the growth of tea trees.
Intelligent monitoring methods are used to capture armyworm board images through cameras, and pre-trained detection models and deep neural networks are used, combined with pixel filtering and size thresholds, to eliminate the interference of tea bugs and small green leafhoppers, and achieve the detection of green leafhoppers. Accurate detection and real-time monitoring.
It achieves precise and automated monitoring of green stink bugs, reduces labor costs and detection lag, improves the accuracy of pest prediction, avoids excessive or untimely control, and protects the ecological environment of tea trees.
Smart Images

Figure CN118097535B
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of tea tree pest monitoring, and in particular to an intelligent monitoring method for green stink bugs in a tea garden. Background Art
[0002] Green stink bugs belong to the order Hemiptera. They mainly live in crops such as cotton, tea trees, mulberry trees, jujube trees, flowers, and fruits. They feed on the juice of tender shoots, leaves, and buds. In the process of tea planting, it is usually necessary to prevent and control the adults and nymphs of green stink bugs to prevent them from sucking the tender leaves and buds of tea trees. After the tea trees are sucked by green stink bugs, black dead spots appear on the affected parts, which then become irregular holes as the buds and leaves stretch. They may even cause cracks on the leaf edges and twist and shrink the leaves, resulting in deformed or rough leaves of the tea trees. Tea made from the damaged fresh leaves tastes bitter, which seriously affects the quality of the tea.
[0003] In the prior art, sticky insect boards are usually set up in tea gardens, and the number of pests on the sticky insect boards within a specified time period is counted to determine the period of pest occurrence, so as to achieve the purpose of accurate pest control. However, the pests in tea gardens include not only green stink bugs, but also small green leafhoppers and tea net bugs, which have a large occurrence. Among them, the adult green stink bug and the adult tea net bug have similar morphology, and the insect body color of the small green leafhopper and the green stink bug is consistent. At the same time, the small green leafhopper and the tea net bug are easy to adhere to the sticky insect boards with similar wavelengths, thereby forming interference with the counting of green stink bugs on the sticky insect boards, resulting in the inability to accurately count the number of green stink bugs and the low accuracy of green stink bug identification, which in turn affects the judgment of the period of occurrence of green stink bug pests and the inability to perform accurate pest control, resulting in excessive or untimely pest control. Excessive control is likely to cause ecological damage and affect the normal growth of tea trees. Untimely control is likely to miss the best control period and cause the occurrence of green stink bug pests. In order to accurately identify the green stink bug on the sticky insect board, there is a method of manual photography and counting in the prior art. However, the manual photography and counting method firstly requires high experience of the operator and has high labor costs. Secondly, it increases the labor intensity of the operator, takes a long time, and has low work efficiency. Thirdly, it has low real-time performance and strong lag, and it is easy to miss the best prevention and control time. Summary of the invention
[0004] In view of the problems existing in the above prior art, the object of the present invention is to provide an intelligent monitoring method for green stink bugs in tea gardens, which is used for accurate and automated monitoring of the number of green stink bug adults in a large-scale tea tree planting environment, effectively eliminating the interference of tea net bugs and small green leafhoppers, and real-time and accurate judgment of the occurrence period of green stink bugs, so as to adopt corresponding prevention and control measures to minimize the impact of green stink bugs on tea tree planting.
[0005] The purpose of the present invention is achieved through the following technical solutions:
[0006] An intelligent monitoring method for green stink bugs in tea gardens, comprising:
[0007] Step 1: Photo shooting: The sticky board is photographed regularly by a camera preset opposite to the sticky board, and the photos are uploaded to the control system for quantity statistics; the sticky board faces the camera, and its surface (i.e., the sticky surface) is composed of red and yellow squares of fixed size;
[0008] Step 2, Green Migraine Counting: First, the control system converts the image uploaded by the camera to obtain a single-channel image, and detects the single-channel image through the pre-trained detection model, and outputs the position of the pest detection frame (rectangular detection frame) after excluding the tea net bug and the detection frame pixel size; then, by setting a size threshold value, the size of the detection frame pixels after excluding the tea net bug is compared, the interference of the small green leafhopper in the image is eliminated, and the detection frame pixels containing the green miscellaneous bug are obtained; then, the detection frame pixels of the green miscellaneous bug per unit area of the sticky insect board are counted;
[0009] Step 3: Determine the period of occurrence of pests: Input the number of green stink bugs per unit area obtained in step 2 into the pre-trained deep neural network, and use the deep neural network to determine the period of occurrence of pests at this time and give corresponding prevention and control measures.
[0010] Based on the further optimization of the above scheme, the method for obtaining the single-channel image in step 2 is specifically as follows:
[0011] First, the images uploaded by the camera are preprocessed into three-channel color images to obtain RGB three-channel images;
[0012] Then, pixel filtering is performed on the RGB three-channel image. Since the green leafhopper and the green stink bug are green as a whole and the sticky board is red and yellow, they are mainly concentrated in the R channel and the G channel, while the tea net bug is black and appears as a specific value in the three RBG channels. Pixel filtering is used to reduce the amount of information in the tea net bug channel, thereby reducing the influence of the tea net bug in the image. Specifically:
[0013]
[0014] Where: Respectively represent the pixel values of the R channel, G channel, and B channel after filtering; Respectively represent the pixel values of the R channel, G channel, and B channel at the (x, y) coordinate position on the image, which are directly obtained through the image;
[0015] Represents the filter coefficient, which is calculated by the green channel pixel weight and the red channel pixel weight Obtained to retain the green stink bug position pixels:
[0016]
[0017] After that, pixel fusion is performed on the pixel-filtered image to highlight the green stink bug image and further reduce the influence of the tea net toon and background color:
[0018]
[0019] In the formula, p xy Represents the pixel value of a single-channel image after the three-channel weights are superimposed; λ r , g , b Respectively represent the fusion weight values of the R channel, G channel, and B channel, and λ r +λ b +λ g =1.
[0020] Based on the further optimization of the above scheme, the green channel pixel weight and the red channel pixel weight Specifically:
[0021]
[0022]
[0023] Wherein, Q is the pixel value and Q=128.
[0024] Based on further optimization of the above scheme, the λ r =0.1,λ b =0.1,λ g =0.8.
[0025] Based on further optimization of the above scheme, the detection model pre-trained in step 2 adopts the YOLOv5 detection model, whose backbone is selected as the resnet-50 network model, and is trained and fine-tuned using the green stink bug image with annotated frame on the sticky insect board.
[0026] Based on the further optimization of the above scheme, the specific method of setting the size threshold value and excluding the green leafhopper in the image in step 2 is:
[0027] First, through the center point of the detection frame pixel (green stink bug detection frame pixel, green leafhopper detection frame pixel), obtain the vertex coordinates of the four red and yellow squares closest to the center point, recorded as V1, V2, V3, V4;
[0028] Then, taking any two adjacent vertex pixel coordinates, such as V1 and V2, as reference datums, the other two vertex coordinates, namely V'3 and V'4, are constructed by the square principle; the affine matrix φ of the local area is obtained by the pixel coordinates (V1, V2, V3, V4) and the constructed pixel coordinates (V1, V2, V'3, V'4);
[0029] Due to the imaging angle between the camera and the sticky insect board and the interference of environmental factors, the red and yellow squares will be distorted in the image transmitted by the camera, which will cause them (i.e., the red and yellow squares) to be irregular squares in the actual image; the present invention constructs the other two points based on the two-point and square principles, and quickly constructs a local affine mapping relationship through the correspondence between the actual four fixed points and the constructed vertices, so as to quickly correct the distortion locally, thereby eliminating the image distortion interference caused by imaging and the interference of environmental factors during the imaging process, and realizing fast and accurate recognition of detection frame pixels.
[0030] Afterwards, the length-to-pixel ratio k is obtained by the actual side length σ of the red-yellow square and the pixel length δ of the red-yellow square in the actual image (i.e., the pixel length after affine transformation):
[0031]
[0032] Finally, the length D of the actual pest corresponding to the detection frame is obtained through the length-to-pixel ratio k and the pixel length in each detection frame after affine transformation; the size threshold D0 is set: when D>D0, it is judged as a green stink bug; when D≤D0, it is judged as a small green leafhopper.
[0033] Based on further optimization of the above solution, the center point of the detection frame pixel is obtained by the intersection point of two lines formed by the four vertices of the detection frame (ie, the center of the rectangular detection frame).
[0034] Based on further optimization of the above scheme, the pixel length δ of the red and yellow squares in the actual image is obtained by the Euclidean distance:
[0035]
[0036] Where: (x1, y1) represents the pixel coordinates of V1, and (x2, y2) represents the pixel coordinates of V1.
[0037] The following are the technical effects of the present invention:
[0038] The present application first performs three-channel color picture preprocessing on the image to obtain an RGB three-channel image, and uses pixel filtering and pixel fusion of the color channels to effectively fade the color channels of the tea net bug and the sticky insect board background, and enhance the color channel corresponding to the green blind stink bug. That is, through the color difference between the green blind stink bug and the tea net bug, the tea net bugs of the same adult size are eliminated, and the interference caused by the tea net bug in the green blind stink bug statistics process is avoided; then, through the local image pixel distortion correction and the setting of the size threshold value, the small green leafhoppers of the same color but different sizes are eliminated, and the interference caused by the small green leafhopper in the green blind stink bug statistics process is avoided, thereby realizing fast, efficient and accurate detection of green blind stink bugs in the tea tree planting process, and avoiding the problems of high labor cost, low detection efficiency, strong lag and so on caused by manual monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 Schematic diagram of the structure of the insect sticky board in an embodiment of the present invention.
[0040] Figure 2 The figure is a schematic diagram of the structure of the insect sticky board and the camera arrangement in an embodiment of the present invention. DETAILED DESCRIPTION
[0041] The technical solutions in the embodiments of the present invention will be described clearly and completely below. In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures and technologies are proposed to facilitate a thorough understanding of the embodiments of the present invention.
[0042] Embodiment 1:
[0043] An intelligent monitoring method for green stink bugs in tea gardens, comprising:
[0044] Step 1, photo shooting: through the camera preset opposite to the sticky insect board, take pictures of the sticky insect board regularly, and upload the pictures to the control system for quantity statistics (specifically: the camera and the control system are remotely connected through the built-in Bluetooth module; at the same time, a timing module is set in the camera, and the timing cycle is T. After the timing cycle is reached, the camera starts to take pictures and transmit them to the control system); the sticky insect board faces the camera, and its surface (i.e., the sticky insect surface) is composed of red and yellow squares of fixed size (such as Figure 1 shown);
[0045] Step 2: Green stink bug counting: First, the control system converts the image uploaded by the camera to obtain a single-channel image, specifically:
[0046] First, the image uploaded by the camera is preprocessed with three-channel color images (the conventional three-channel processing means in the art can be used, which is not specifically limited in this embodiment) to obtain an RGB three-channel image;
[0047] Then, pixel filtering is performed on the RGB three-channel image. Since the green leafhopper and the green stink bug are green as a whole and the sticky board is red and yellow, they are mainly concentrated in the R channel and the G channel, while the tea net bug is black and appears as a specific value in the three RBG channels (and its overall proportion is small); pixel filtering is used to reduce the amount of information in the tea net bug channel, thereby reducing the influence of the tea net bug in the image, specifically:
[0048]
[0049] Where: Respectively represent the pixel values of the R channel, G channel, and B channel after filtering; Respectively represent the pixel values of the R channel, G channel, and B channel at the (x, y) coordinate position on the image, which are directly obtained through the image;
[0050] Represents the filter coefficient, which is calculated by the green channel pixel weight and the red channel pixel weight Obtained to retain the green stink bug position pixels:
[0051]
[0052] Green channel pixel weight and the red channel pixel weight Specifically:
[0053]
[0054]
[0055] Wherein, Q is the pixel value and Q=128; in this embodiment, The maximum value is 1, and when the pixel value decreases to 128, the coefficient value is 0.4, which is the best coefficient.
[0056] After that, pixel fusion is performed on the pixel-filtered image to highlight the green stink bug image and further reduce the influence of the tea net toon and background color:
[0057]
[0058] In the formula, p xy Represents the pixel value of a single-channel image after the three-channel weights are superimposed; λ r , g , b Respectively represent the fusion weight values of the R channel, G channel, and B channel, and λ r +λ b +λ g =1; In this embodiment, λ r =0.1,λb =0.1,λ g =0.8.
[0059] The single-channel image is detected through the pre-trained detection model, and the detection frame position and pixel size of the insect pests (including green stink bug and small green leafhopper) after excluding the tea net bug are output; the pre-trained detection model adopts the YOLOv5 detection model, and its backbone is selected as the resnet-50 network model. It is trained and fine-tuned using the green stink bug image with annotated frame on the sticky insect board.
[0060] Then, by setting the size threshold, the size of the detection frame pixels after excluding the tea net bug is compared, the interference of the small green leafhopper in the image is eliminated, and the detection frame pixels containing the green stink bug are obtained; specifically:
[0061] First, through the center point of the detection frame pixel (green stink bug detection frame pixel, green leafhopper detection frame pixel), obtain the vertex coordinates of the four red and yellow squares closest to the center point, recorded as V1, V2, V3, V4; the center point of the detection frame pixel is obtained by the intersection of two lines formed by the four vertices of the detection frame, for example:
[0062] Assume that the coordinates of V1, V2, V3, and V4 are: (x1, y1), (x2, y2), (x3, y3), (x4, y4),
[0063] Through (x1, y1) and (x3, y3), establish the straight line equation l1: A1x+B1y+C1=0, and through (x2, y2) and (x4, y4), establish the straight line equation l2: A2x+B2y+C2=0. Combine the two straight line equations l1 and l2 to obtain their intersection (x0, y0). Since the detection box is a rectangular box, the intersection (x0, y0) is the center point.
[0064] Then, taking any two adjacent vertex pixel coordinates, such as V1 and V2, as reference datums, the other two vertex coordinates, namely V'3 and V'4, are constructed by the square principle (specifically: taking the line connecting V1 and V2 as a side of the square and obtaining the length δ of the side, and then respectively obtaining two vertical lines with V1 and V2 as perpendicular intersection points, respectively selecting two points with a distance of δ from V1 and V2 on the two vertical lines and with the same direction, namely V'3 and V'4); obtaining the affine matrix φ of the local area by the pixel coordinates (V1, V2, V3, V4) and the constructed pixel coordinates (V1, V2, V'3, V'4) (this is a conventional technology in the art and will not be discussed in detail in this embodiment);
[0065] Afterwards, the length-to-pixel ratio k is obtained by the actual side length σ of the red and yellow square and the pixel length δ of the red and yellow square after affine transformation:
[0066]
[0067] δ is obtained through the Euclidean distance:
[0068]
[0069] Where: (x1, y1) represents the pixel coordinates of V1, and (x2, y2) represents the pixel coordinates of V1.
[0070] Finally, the length D of the actual pest corresponding to the detection frame is obtained through the length-to-pixel ratio k and the pixel length in each detection frame in the actual image; the size threshold D0 is set: when D>D0, it is judged as a green stink bug; when D≤D0, it is judged as a small green leafhopper.
[0071] Step 3: Determine the period of occurrence of pests: Input the number of green stink bugs per unit area obtained in step 2 into the pre-trained deep neural network (YOLOv5 can be used), and use the deep neural network to determine the period of occurrence of pests at this time and give corresponding prevention and control measures.
[0072] Embodiment 2:
[0073] As a further optimization of the scheme of the present application, on the basis of the scheme of Example 1, the above monitoring method further includes a rainfall monitoring method, when the rainfall monitoring result is greater than the rainfall threshold value, the control system does not perform target detection and counting of green stink bugs on the image obtained this time, thereby saving computing resources;
[0074] The specific rainfall monitoring method is as follows:
[0075] A rainfall measuring device consisting of a rain collecting cover, a water collecting barrel, a water pressure sensor and an electric valve is arranged near the camera; the water collecting barrel is a cylindrical container with openings at both ends, the rain collecting cover is a cone, installed on the top of the water collecting barrel with its opening facing upward, and is used to collect rainwater into the water collecting barrel; the water pressure sensor is installed at the bottom of the water collecting barrel and is used to measure the water pressure in the water collecting barrel, and the electric valve is sealed and installed at the bottom of the water collecting barrel and is used to control the discharge of rainwater from the water collecting barrel;
[0076] The specific steps are: calculate the amount of rainwater per unit cross-sectional area within a measurement cycle through the pressure value N fed back by the water pressure sensor, specifically:
[0077]
[0078] Where: β represents the ratio constant of liquid level height to pressure, which is obtained through empirical data; N·β represents the depth of the water pressure sensor; S1 represents the cross-sectional area of the water collection bucket; S2 represents the upper surface area of the rain collection cover;
[0079] The rainfall threshold value h0 is set according to the habits of the green stink bug. When h>h0, no photo monitoring is carried out because the green stink bug is not present at this time.
[0080] Embodiment 3:
[0081] As a further optimization of the scheme of the present application, on the basis of the scheme of Example 1 or Example 2, an intelligent monitoring system for green stink bugs is provided, including a sticky insect board replacing device, a camera and a control system. A sticky insect board is arranged on the surface of the sticky insect board replacing device, and the sticky insect board is a red and yellow grid structure. A replacement mechanism is arranged inside the sticky insect board replacing device for replacing the sticky insect board, and the camera is opposite to the red and yellow surface of the sticky insect board replacing device; the control system is remotely connected to the sticky insect board replacing device and the camera, respectively, and the green stink bugs are monitored by the method described in Example 1.
Claims
1. An intelligent monitoring method for green stink bugs in tea gardens, characterized in that: include: Step 1: Photo shooting: Use a camera preset opposite the sticky board to regularly shoot the sticky board, and upload the photos to the control system for quantity statistics; the sticky board faces the camera, and its surface is composed of red and yellow squares of fixed size; Step 2: Green stink bug counting: First, the control system converts the image uploaded by the camera to obtain a single-channel image, and detects the single-channel image through the pre-trained detection model, and outputs the position of the pest detection frame after excluding the tea net stink bug and the pixel size of the detection frame; then, by setting a size threshold value, the size of the detection frame pixels after excluding the tea net stink bug is compared, the interference of the small green leafhopper in the image is eliminated, and the detection frame pixels containing the green stink bug are obtained; then, the detection frame pixels of the green stink bug per unit area of the sticky insect board are counted; The specific method for obtaining a single-channel image is as follows: First, the images uploaded by the camera are preprocessed into three-channel color images to obtain RGB three-channel images; Then, pixel filtering is performed on the RGB three-channel image. Since the green leafhopper and the green stink bug are green as a whole and the sticky board is red and yellow, they are mainly concentrated in the R channel and the G channel, while the tea net bug is black and appears as a specific value in the three RBG channels. Pixel filtering is used to reduce the amount of information in the tea net bug channel, thereby reducing the influence of the tea net bug in the image. Specifically: Where: , , Respectively represent the pixel values of the R channel, G channel, and B channel after filtering; , , Represents the pixel values of the R channel, G channel, and B channel at the (x, y) coordinate position on the image, which are directly obtained from the image; Represents the filter coefficient, which is calculated by the green channel pixel weight and the red channel pixel weight Obtained to retain the green stink bug position pixels: After that, pixel fusion is performed on the pixel-filtered image to highlight the green stink bug image and further reduce the influence of the tea net toon and background color: In the formula, Represents the pixel value of a single-channel image after the three-channel weighted superposition; , , Respectively represent the fusion weight values of the R channel, G channel, and B channel, and ; Among them, the green channel pixel weight and the red channel pixel weight Specifically: in, Q is the pixel value and Q=128 ; Step 3: Determine the period of occurrence of pests: Input the number of green stink bugs per unit area obtained in step 2 into the pre-trained deep neural network, and use the deep neural network to determine the period of occurrence of pests at this time and give corresponding prevention and control measures.
2. The intelligent monitoring method for green stink bug in a tea garden according to claim 1, characterized in that: The detection model pre-trained in the step 2 adopts a YOLOv5 detection model, whose backbone is selected as a resnet-50 network model, and is trained and fine-tuned using an image of a green stink bug with a marked frame on a sticky insect board.
3. The intelligent monitoring method for green stink bug in a tea garden according to claim 2, characterized in that: The specific method of setting the size threshold value in step 2 to exclude the green leafhopper in the image is: First, by detecting the center point of the pixel in the frame, we obtain the vertex coordinates of the four red and yellow squares closest to the center point, which are recorded as V 1 、V 2 、V 3 、V 4; Then, take any two adjacent vertex pixel coordinates, such as V 1 and V 2 is the reference datum, and the coordinates of the other two vertices are constructed by the square principle, namely V’ 3 、V’ 4; By pixel coordinates , and the constructed pixel coordinates Get the affine matrix φ of the local area; Then, the actual side length of the red and yellow squares The pixel length of the red and yellow squares after affine transformation δ , get the length-to-pixel ratio k : ; Finally, by length-to-pixel ratio k And the pixel length of each detection frame in the actual image, get the actual length of the pest corresponding to the detection frame D ; Set size threshold D 0: When When It was identified as a small green leafhopper.
4. The intelligent monitoring method for green stink bug in a tea garden according to claim 3, characterized in that: The pixel length of the red and yellow squares in the actual image δ Obtained by Euclidean distance: ; Where: (x 1 ,y 1 ) express V The pixel coordinates of 1, (x 2 ,y 2 ) express V 1 pixel coordinates.
