Dam termite monitoring method and system based on image recognition

By performing overlap analysis of termite monitoring videos and identifying the body length central axis, the problem of inaccurate calculation of termite counts in the existing technology is solved, more accurate termite count estimation is achieved, and the efficiency and safety warning capabilities of termite monitoring in dams are improved.

CN120375271APending Publication Date: 2025-07-25ANHUI ERQISI TECH CO LTD

Patent Information

Application Number
CN202510329400.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-18
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

In the prior art, termite monitoring methods based on image recognition cannot accurately calculate the number of termites exposed, resulting in inaccurate estimation results.

Method used

By obtaining termite monitoring videos, performing overlap analysis, using the body length central axis identification method to identify whether termite images are in contact, separate overlapping and non-overlapping images, and calculate termite count.

Benefits of technology

It improves the accuracy of termite count estimation, enhances the efficiency of termite monitoring in dams, and provides reliable data support for dam safety warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120375271A_ABST
    Figure CN120375271A_ABST
Patent Text Reader

Abstract

The invention discloses a dam termite monitoring method and system based on image recognition. The method specifically comprises the following steps: step 1, obtaining a termite monitoring video; 2, performing overlapping analysis on the termites according to the termite monitoring video; 3, calculating the number of termites according to an overlapping analysis result; the invention relates to the technical field of image processing. According to the dam termite monitoring method and system based on image recognition, after termite image recognition is carried out on the termite monitoring video, the termite area image is obtained, whether the termite image is in contact or not is judged by identifying the body length central axis of the termite image, and then recognition judgment of overlapped images and non-overlapped images is achieved; a more accurate estimation result is provided for calculation of the number of termites, and convenient and reliable data support is provided for safety early warning of a dam while the dam termite monitoring efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and specifically to a method and system for monitoring termites in dikes based on image recognition. Background Art

[0002] Termite prevention refers to taking some measures to prevent termites from causing damage before they cause harm. However, the activities of termites are hidden, and they are usually discovered only after causing huge damage. Therefore, termite monitoring has become a key issue in termite prevention. Most of the existing methods for monitoring termites are based on placing baits at fixed monitoring nodes, and then inferring the activities of termites by monitoring the changes in the baits. For example, the termite monitoring method, device, and storage device described in the patent application No. 201911090273.9 obtain the differential image between the current image frame and the previous image frame of the termite monitoring video, then detect the connected regions in the image, and count the number of connected regions in the image to estimate the number of termites in the current image frame, which facilitates the monitoring by the monitoring personnel.

[0003] Since when the bait is located at the center of the monitoring area, the termites in the termite monitoring video are distributed in a pattern of being dense in the middle and spreading at the edges. For the termites in the dense middle part, the termites are prone to contact. During the image recognition process, these contacting termites will be displayed as a whole. When simply estimating the termite data through the analysis of the connected regions, the two contacting termites will be counted as one termite, resulting in the problem that the estimation result is not accurate enough. Therefore, a method and system for monitoring termites in dikes based on image recognition are specifically proposed to analyze the number of contacting termites to obtain a more accurate estimation result of the number of termites. Summary of the Invention

[0004] In view of the deficiencies of the prior art, the present invention provides a method and system for monitoring termites in dikes based on image recognition, which solves the problem that when calculating the number of termites by using the image recognition method, the contacting termites cannot be effectively calculated.

[0005] To achieve the above objectives, the present invention is realized through the following technical solutions: A method for monitoring termites in dikes based on image recognition specifically includes the following steps:

[0006] Step 1: Obtain the termite monitoring video;

[0007] Step 2: Conduct overlap analysis on the termites according to the termite monitoring video;

[0008] Step 3: Calculate the number of termites according to the overlap analysis result.

[0009] The present invention is further configured such that: after obtaining the termite monitoring video in step one, continuous frame images within a set time period are extracted, and after preprocessing the frame images, analysis images are obtained to construct an analysis image set.

[0010] The present invention is further configured such that: the method for preprocessing the frame images includes:

[0011] Convert the frame images into grayscale images;

[0012] Set a grayscale value threshold, and regard the area in the grayscale image where the grayscale value is higher than or equal to the grayscale value threshold as the foreground, and the area in the grayscale image where the grayscale value is lower than the grayscale value threshold as the background, where the foreground is the termite image;

[0013] Obtain the analysis images.

[0014] The present invention is further configured such that: the method for setting the grayscale value threshold includes: obtaining the grayscale values of the areas where the termite images are located in the grayscale image, and selecting the lowest grayscale value as the grayscale value threshold.

[0015] The present invention is further configured such that: the method for overlapping analysis of termites in step two includes:

[0016] Take any analysis image in the analysis image set as an analysis sample;

[0017] Mark the body length central axis of the termite images in the analysis sample;

[0018] During the marking process of the body length central axis, when the area difference between two regions in at least one region to be analyzed in the same termite contour region is not within the set error standard, the termite image corresponding to the termite contour region is defined as an overlapping image; on the contrary, when the area difference between the two regions in the two regions to be analyzed is within the set error standard, the termite image corresponding to the termite contour region is defined as a non-overlapping image.

[0019] The present invention is further configured such that: the marking method of the body length central axis includes:

[0020] A1. Construct a unified coordinate system in the analysis sample, equally divide the termite contour edge into several pixel coordinate points, select the two pixel coordinate points with the farthest distance for connection to obtain an imitation line;

[0021] A2. Judge whether all the coordinates of the imitation line are within the region where the termite contour is located. If not, go to A3; if so, go to A4;

[0022] A3. Select the two pixel coordinate points with the farthest distance except the current two pixel coordinate point combinations for connection to obtain an imitation line, and go to A2;

[0023] A4, taking the pixel coordinate points at both ends of the mimicry line as the points to be analyzed, selecting the coordinate points on the mimicry line at a preset distance from the two points to be analyzed as the verification points, obtaining a vertical line with the verification points as the vertical foot and perpendicular to the mimicry line, eliminating the termite contour area between the two vertical lines, and obtaining two areas to be analyzed. At this time, the mimicry line divides the area to be analyzed into two areas, and judging whether there is at least one area to be analyzed in which the area difference between the two areas is within the set error standard. If not, go to A3, if yes, go to A5;

[0024] A5. Use the current mimicry line as the central axis of the body length of the corresponding termite outline.

[0025] The present invention is further configured as follows: the method for calculating the number of termites according to the overlapping analysis results in step 3 includes:

[0026] S=2N1+N2

[0027] Where S is the number of termites, N1 is the number of overlapping images, and N2 is the number of non-overlapping images.

[0028] The present invention also discloses a dam termite monitoring system based on image recognition, comprising a processor and a memory coupled to the processor;

[0029] The memory stores program instructions for implementing the above-mentioned dam termite monitoring method based on image recognition;

[0030] The processor is used to execute the program instructions stored in the memory to achieve termite monitoring.

[0031] The present invention provides a method and system for monitoring termites on dams based on image recognition.

[0032] Beneficial effects:

[0033] The present invention obtains termite area images after performing termite image recognition on termite monitoring videos, and determines whether termite images are in contact by marking the central axis of the termite images' body lengths, thereby realizing recognition and judgment of overlapping images and non-overlapping images, providing more accurate estimation results for the calculation of termite numbers, improving the efficiency of termite monitoring on dams, and providing convenient and reliable data support for safety early warnings of dams. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a schematic diagram of the process of the present invention;

[0035] Figure 2 This is a schematic diagram of the process of marking the central axis of the termite body length in the first embodiment of the present invention;

[0036] Figure 3 is a schematic diagram of non-overlapping images in Embodiment 1 of the present invention;

[0037] Figure 4 It is a schematic diagram of the identification process of the body length central axis of termites in the second embodiment of the present invention;

[0038] Figure 5 It is a schematic diagram of non-overlapping images in the second embodiment of the present invention;

[0039] Figure 6 It is a schematic diagram of overlapping images in the second embodiment of the present invention. Specific implementation manners

[0040] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention.

[0041] Please refer to Figure 1-6 , the embodiments of the present invention provide the following technical solutions:

[0042] Embodiment 1. A method for monitoring termites in dams based on image recognition specifically includes the following steps:

[0043] Step 1. Obtain a termite monitoring video, extract consecutive frame images within a set time period, convert the frame images into grayscale images, set a grayscale value threshold, use the area where the grayscale value in the grayscale image is higher than or equal to the grayscale value threshold as the foreground, and use the area where the grayscale value in the grayscale image is lower than the grayscale value threshold as the background. Among them, the foreground is the termite image, obtain an analysis image, and construct an analysis image set.

[0044] As a detailed description, the method for setting the grayscale value threshold includes: obtaining the grayscale value of the area where the termite image is located in the grayscale image, and selecting the lowest grayscale value as the grayscale value threshold.

[0045] Step 2. Perform overlapping analysis on termites according to the termite monitoring video, specifically including:

[0046] Take any analysis image in the analysis image set as an analysis sample, and perform body length central axis identification on the termite image in the analysis sample. The identification methods include:

[0047] A1. Construct a unified coordinate system in the analysis sample, equally divide the termite contour edge into several pixel coordinate points, select the two pixel coordinate points with the farthest distance for connection, and obtain an imitation line;

[0048] A2. Judge whether all the coordinates of the imitation line are within the area where the termite contour is located. If not, go to A5; if so, go to A3;

[0049] A3. At this time, the imitation line divides the area where the termite contour is located into two areas. Judge whether the area difference between these two areas is within the set error standard. If not, go to A5; if so, go to A4;

[0050] A4. Use the current mimetic line as the body length central axis corresponding to the termite contour;

[0051] A5. Mark the termite contour with a body length central axis that cannot be determined in one step.

[0052] Define the termite image corresponding to the termite contour area marked with a body length central axis that cannot be determined in one step as an overlapping image. Conversely, define the termite image corresponding to the termite contour area with the body length central axis identified as a non-overlapping image.

[0053] Step 3. Calculate the number of termites according to the overlapping analysis result:

[0054] S = 2N1 + N2

[0055] In the formula, S is the number of termites, N1 is the number of overlapping images, and N2 is the number of non-overlapping images.

[0056] For reference, as shown in the appendix Figure 3 It is a non-overlapping image of termites. It can be seen that the mimetic line formed by connecting the two pixel coordinate points farthest from each other in the edge contour of the non-overlapping image can divide the non-overlapping image into upper and lower regions with an area difference within the set error standard, where the set error standard is determined manually.

[0057] In this embodiment, not only can the rapid judgment of whether the termite images overlap be realized, but also a more accurate result can be provided for the estimation of the number of termites.

[0058] Embodiment 2. A method for monitoring termites in dikes based on image recognition, specifically including the following steps:

[0059] Step 1. Obtain the termite monitoring video, extract consecutive frame images within a set time period, convert the frame images into grayscale images, set a grayscale value threshold, use the area in the grayscale image with a grayscale value higher than or equal to the grayscale value threshold as the foreground, and use the area in the grayscale image with a grayscale value lower than the grayscale value threshold as the background. Among them, the foreground is the termite image, obtain the analysis image, and construct an analysis image set.

[0060] For detailed description, the method for setting the grayscale value threshold includes: obtaining the grayscale value of the area where the termite image is located in the grayscale image, and selecting the lowest grayscale value as the grayscale value threshold.

[0061] Step 2. Conduct an overlapping analysis on the termites according to the termite monitoring video, specifically including:

[0062] Take any analysis image in the analysis image set as an analysis sample, and identify the body length central axis of the termite image in the analysis sample. The identification methods include:

[0063] A1. Construct a unified coordinate system in the analysis sample, divide the edge of the termite contour into several pixel coordinate points at equal intervals, select the two pixel coordinate points with the farthest distance to connect them, and obtain the mimicry line;

[0064] A2, determine whether all the coordinates of the mimicry line are in the area where the termite outline is located. If not, go to A3; if yes, go to A4;

[0065] A3, select the two pixel coordinate points with the farthest distance from each other except the current two pixel coordinate points, connect them to obtain the mimic line, and go to A2;

[0066] A4, taking the pixel coordinate points at both ends of the mimicry line as the points to be analyzed, selecting the coordinate points on the mimicry line at a preset distance from the two points to be analyzed as the verification points, obtaining a vertical line with the verification points as the vertical foot and perpendicular to the mimicry line, eliminating the termite contour area between the two vertical lines, and obtaining two areas to be analyzed. At this time, the mimicry line divides the area to be analyzed into two areas, and judging whether there is at least one area to be analyzed in which the area difference between the two areas is within the set error standard. If not, go to A3, if yes, go to A5;

[0067] A5. Use the current mimicry line as the central axis of the body length of the corresponding termite outline.

[0068] During the marking process of the midline of the body length, when the area difference between two areas in at least one area to be analyzed in the same termite contour area is not within the set error standard, the termite image corresponding to the termite contour area is defined as an overlapping image; conversely, when the area difference between two areas in two areas to be analyzed are both within the set error standard, the termite image corresponding to the termite contour area is defined as a non-overlapping image.

[0069] Step 3: Calculate the number of termites based on the overlap analysis results:

[0070] S=2N1+N2

[0071] Where S is the number of termites, N1 is the number of overlapping images, and N2 is the number of non-overlapping images.

[0072] As a reference, see the attached Figure 5 As shown in the figure, it is a non-overlapping image of termites. It can be seen that the mimicry line can divide the area to be analyzed into two upper and lower areas with area differences within the set error standard. Figure 6 As shown, the overlapping images of two termites are displayed as the foreground. Since the two termites are in contact, the corresponding termite images will partially overlap. It can be seen that when two areas to be analyzed are obtained, one area to be analyzed will have obvious asymmetry, and it can be determined as an overlapping image.

[0073] In this embodiment, while determining the mid-axis of the body length of all termite images, by analyzing the area difference after dividing the area to be analyzed into two regions, the determination of whether termites are in contact is realized. That is, when the area difference between the two regions in a region to be analyzed is within the set error standard, it indicates that termites are in contact, which is an overlapping image. On the contrary, when the area difference between the two regions in two regions to be analyzed is within the set error standard, it indicates that there is no termite contact, which is a non-overlapping image, and the analysis is more comprehensive.

[0074] It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device.

[0075] Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for monitoring termites in dikes based on image recognition, characterized in that: The specific steps include: Step 1: Obtain termite monitoring video; Step 2: Conduct overlapping analysis on termites based on termite monitoring videos; Step 3: Calculate the number of termites based on the overlap analysis results.

2. The termite monitoring method for dikes based on image recognition according to claim 1, characterized in that: After acquiring the termite monitoring video in the step 1, continuous frame images within a set time period are extracted, and after preprocessing the frame images, analysis images are acquired to construct an analysis image set.

3. The method for monitoring termites in dikes based on image recognition according to claim 2, characterized in that: The method of preprocessing the frame image includes: Convert the frame image into a grayscale image; A gray value threshold is set, and the area in the gray value image with a gray value higher than or equal to the gray value threshold is taken as the foreground, and the area in the gray value image with a gray value lower than the gray value threshold is taken as the background, wherein the foreground is the termite image; Acquire images for analysis.

4. The method for monitoring termites in dikes based on image recognition according to claim 3, characterized in that: The method of setting the gray value threshold includes: obtaining the gray value of the area where the termite image is located in the gray value image, and selecting the lowest gray value as the gray value threshold.

5. The method for monitoring termites in dikes based on image recognition according to claim 4, wherein: The method of performing overlapping analysis on termites in step 2 includes: Take any analysis image in the analysis image set as an analysis sample; Mark the midline of the body length of the termite images in the analysis sample; During the marking process of the midline of the body length, when the area difference between two areas in at least one area to be analyzed in the same termite contour area is not within the set error standard, the termite image corresponding to the termite contour area is defined as an overlapping image; conversely, when the area difference between two areas in two areas to be analyzed are both within the set error standard, the termite image corresponding to the termite contour area is defined as a non-overlapping image.

6. The method for monitoring termites in dikes based on image recognition according to claim 5, wherein: The marking method of the body length midline includes: A1. Construct a unified coordinate system in the analysis sample, divide the edge of the termite contour into several pixel coordinate points at equal intervals, select the two pixel coordinate points with the farthest distance to connect them, and obtain the mimicry line; A2, determine whether all the coordinates of the mimicry line are in the area where the termite outline is located. If not, go to A3; if yes, go to A4; A3, select the two pixel coordinate points with the farthest distance from each other except the current two pixel coordinate points, connect them to obtain the mimic line, and go to A2; A4, taking the pixel coordinate points at both ends of the mimicry line as the points to be analyzed, selecting the coordinate points on the mimicry line at a preset distance from the two points to be analyzed as the verification points, obtaining a vertical line with the verification points as the vertical foot and perpendicular to the mimicry line, eliminating the termite contour area between the two vertical lines, and obtaining two areas to be analyzed. At this time, the mimicry line divides the area to be analyzed into two areas, and judging whether there is at least one area to be analyzed in which the area difference between the two areas is within the set error standard. If not, go to A3, if yes, go to A5; A5. Use the current mimicry line as the central axis of the body length of the corresponding termite outline.

7. The method for monitoring termites in a dam based on image recognition according to claim 6, characterized in that: The method of calculating the number of termites according to the overlapping analysis results in step 3 includes: S=2N1+N2 Where S is the number of termites, N1 is the number of overlapping images, and N2 is the number of non-overlapping images.

8. A dam termite monitoring system based on image recognition, characterized in that: comprising a processor and a memory coupled to the processor; The memory stores program instructions for implementing the dam termite monitoring method based on image recognition as described in any one of claims 1 to 9; The processor is used to execute the program instructions stored in the memory to achieve termite monitoring.

Citation Information

Patent Citations

  • Termite monitoring method and device and storage device

    CN110992389A

Cited By

  • Solenopsis invicta identification method, device and equipment applied to biological detection vehicle and medium

    CN121214073A