Mangrove pest monitoring method and system
Technical Field
The invention relates to a mangrove pest monitoring method and system.
Background
In the mangrove protection field, the situation of immediate insect damage is mastered and then proper protection measures are taken, so that manpower and material resources are not wasted, and the mangrove can be effectively protected. The pest sticking plate counting method is an ideal counting method, and the pest situation can be estimated accurately by the number of certain pests on the pest sticking plate in a certain time. Compared with other sampling statistical methods, the sticky trap counting method has the advantages of lower cost, relatively accurate counting result, strong operability and strong instantaneity.
The image processing technology is used for realizing the correct identification and quantity statistics of specific insects on the armyworm plate, and is a development direction with vitality in the field of crossing of environment and computer in recent years. At present, most pest counts are still completed manually, the error rate is high, and the long-term accumulated time consumption is obviously more than that of computer counts. In recent years, a part of image recognition and counting system mainly adopts deep learning counting or closed area counting, and compared with manual counting, the technology is more convenient and accurate, but for insects such as eight-point wide-wing wax cicadas, the counting error is larger when the insects overlap and break. Meanwhile, when the insect sticking board is interfered by branches, weeds and other insects, certain error can be generated in counting.
Disclosure of Invention
To overcome the defects in the technology, the invention provides a mangrove pest monitoring method, wherein the mangrove pest monitoring method comprises the following steps:
s1: acquiring an image of a pest sticking plate stuck with pests;
s2: dividing an image of the sticky trap into an area A and an area B, wherein the area A is an area of the sticky trap, to which an object is not attached, and the area B is other areas except the area A in the image;
s3: removing non-target areas in the area B;
s4: and calculating the total area of the area B and the area of the area A after the non-target area is removed, adding the total area B and the area A to obtain the total area of the sticky trap, and dividing the total area B by the area of a single insect to obtain the total number of pests.
Further, in S2, the method specifically includes the following steps:
s2.1: converting the armyworm plate image into an HSV image through an HSV color model;
s2.2: dividing an HSV image into an A area and a B area by adopting a color threshold algorithm; specifically, the color is compared with the set color, if the set color is the same, the area is designated as an area A, and if the set color is different from the set color, the area is designated as an area B, wherein the set color is consistent with the color of the sticky trap.
Further, in S2.2, specifically, an image binarization method is adopted, the region having the same color as the set color is turned to white, the region having different color from the set color is turned to black, the white region is designated as a region, and the black region is designated as B region.
Further, in S3, the method specifically includes the following steps:
s3.1: each continuous region in the B region is detected, and a region having the same shape as the set non-target shape is added to the a region.
S3.2: the area A is increased by the outer boundary line, and the area outside the outer boundary line is removed in the area B.
Further, in S3.1, an APR2 value characterization method is employed.
Further, the armyworm plate is yellow or white.
Further, the area of the individual pests is obtained by:
and obtaining the coefficient ratio of the insect sticking plate to the area of the single insect pest by adopting statistics, and then calculating the area of the single insect pest by utilizing the area of the insect sticking plate to the coefficient ratio.
The invention also provides a system for monitoring mangrove pests:
the image acquisition module is used for acquiring image information of the insect sticking plate stuck with the wax cicada; the image separation module is used for separating the image into an A area and a B area; the area A is a sticky board to which an object is not attached, and the area B is other areas except the area A in the picture information; the non-target eliminating module is used for eliminating non-target areas in the area B; the image area calculation module is used for calculating the area of the area B and the area A of the non-target area, adding the area B and the area A to obtain the total area of the insect sticking plate, and dividing the total area of the area B by the area of a single insect to obtain the total number of the wax hoppers.
Further, the system also comprises a server, a positioning module, a time module, a communication module, a display module, an early warning module and a user login module;
the positioning module is used for acquiring the geographic position of the monitoring system;
the time module is used for acquiring a time point of the image of the pest sticking plate stuck with the pests;
the communication module is used for sending the total number of pests, the geographic position of the system and the information of the time point of acquiring the pest sticking plate image stuck with the pests to the server, and the server is used for storing the information and storing the module.
The display module is used for displaying the geographical position information, the total number of pests and the time acquired by the positioning module.
The early warning module is used for sending warning information according to the total number of pests;
the communication module is used for realizing data transmission between the server and the intelligent equipment.
The invention has the beneficial effects that:
the method and the system are applied to mangrove forest to monitor the number of pests, can eliminate the interference of external factors in the process of counting the number, and have more accurate monitoring number.
Drawings
FIG. 1 is a flow chart of the method of the present invention;
fig. 2 is a system configuration diagram of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, the invention provides a mangrove pest monitoring method, which takes eight-point wide-wing wax cicadas as an example and comprises the following steps:
s1: acquiring an image of a mythic fungus plate adhered with eight-point wide-wing wax cicadas;
s2: dividing an image of the sticky trap into an area A and an area B, wherein the area A is an area of the sticky trap, to which an object is not attached, and the area B is other areas except the area A in the image; preferably, the color of the armyworm plate is yellow;
specifically, the method comprises the following steps:
s2.1: converting the armyworm plate image into an HSV image through an HSV color model;
s2.2: dividing an HSV image into an A area and a B area by adopting a color threshold algorithm; specifically, the set color is compared with the set color, if the set color is the same, the set color is identified as an area a, and if the set color is different from the set color, the set color is identified as an area B, wherein the set color is consistent with the color of the sticky board, for example: the image binarization method is adopted, the region with the same set color is converted into white, the region with the same set color is converted into black, the white region is set as an A region, and the black region is set as a B region.
S3: removing non-target areas in the area B;
the image generally includes some non-target areas, for example, branches are stuck on the sticky board, the branches are shown in the image, and when the image is acquired, the other areas except the sticky board are generally acquired in the image, and the non-target areas need to be removed, specifically, the removing steps are as follows:
s3.1: detecting each continuous area in the area B, and adding the continuous areas with the same shape as the set branch shape into the area A; specifically, an APR2 value characteristic method is adopted.
S3.2: adding the outer boundary line to the region A, and removing the region outside the outer boundary line from the region B
S4: and calculating the total area of the area B and the area of the area A after the non-target area is removed, adding the total area B and the area A to obtain the total area of the armyworm plate, and dividing the total area of the area B by the area of a single insect to obtain the total number of eight-point wide-fin wax hoppers.
Further, the coefficient ratio of the area of the insect sticking plate to the area of the single eight-point wide-wing wax cicada is obtained by a statistical method, and the area of the single eight-point wide-wing wax cicada is calculated by utilizing the area of the insect sticking plate and the coefficient ratio.
Referring to FIG. 2, the invention also provides a mangrove pest monitoring system, which takes eight-point wide-wing wax cicadas as an example, and comprises;
the image acquisition module is used for acquiring image information of the insect sticking plate stuck with the eight-point wide-wing wax cicada;
the image separation module is used for separating the image into an A area and a B area; the area A is a sticky board to which an object is not attached, and the area B is other areas except the area A in the picture information;
the non-target eliminating module is used for eliminating non-target areas in the area B;
the image area calculation module is used for calculating the area of the area B and the area A of the non-target area, adding the area B and the area A to obtain the total area of the insect sticking plate, and dividing the total area of the area B by the area of a single insect to obtain the total number of eight-point wide-fin wax hoppers.
The main control module is used for controlling the work of the modules.
Further, the system also comprises a server, a positioning module, a time module, a communication module, a display module, an early warning module and a user login module;
the positioning module is used for acquiring the geographic position of the monitoring system;
the time module is used for acquiring a time point of the image of the insect sticking plate stuck with the eight-point wide-wing wax cicada;
the communication module is used for sending the total number of the eight-point wide-wing wax cicadas, the geographic position of the system and the information of the time point for acquiring the image of the insect sticking plate stuck with the eight-point wide-wing wax cicadas to the server, and the server is used for storing the information and storing the module.
The display module is used for displaying the geographic position information, the total number of the eight-point wide-wing wax cicadas and the time acquired by the positioning module.
The early warning module is used for sending warning information according to the total number of the eight-point wide-wing wax cicadas;
the communication module is used for realizing data transmission between the server and the intelligent equipment.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.