Ancient and famous tree longicorn monitoring method and system based on computer vision
By using multiple exposure modes to acquire ultraviolet fluorescence images in low-light environments and combining deep learning technology for analysis, a long-lasting bullock number prediction model was established, solving the problem of inaccurate monitoring in low-light environments in the existing technology, and achieving more accurate long-lasting bullock number prediction and dynamic change recognition.
Patent Information
- Application Number
- CN202510360884.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-26
AI Technical Summary
Existing computer vision-based elixir monitoring technology is difficult to effectively extract weak signals of elixir activity in night or low light environments, and lacks timing analysis, resulting in the lack of monitoring data and inaccuracy.
Ultraviolet fluorescence image acquisition under multiple exposure modes is adopted, semantic segmentation and fluorescence feature extraction are combined with deep learning technology to establish a correlation model between fluorescence features and the number of elixirs, and fluorescence feature change index is generated through fluorescence feature trend analysis in successive time periods, which is used to adjust the exposure mode.
It effectively improves the monitoring capabilities in low-light environments, provides more accurate and quantitative prediction values for the elves, can identify dynamic changes in elves activities, and adjusts the exposure mode to improve the quality of the monitoring data.
Smart Images

Figure CN119888797A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer vision, and in particular to a method and system for monitoring longhorn beetles on ancient and famous trees based on computer vision. Background Art
[0002] In the process of protecting ancient and famous trees, the harm caused by longhorn beetles is particularly prominent. As a major trunk-boring pest in the forestry ecosystem, the boring behavior of the larvae of longhorn beetles not only directly destroys the xylem structure of trees, causing damage to the mechanical support and conduction system, but also creates infection channels for secondary pathogenic microorganisms, thereby causing systemic diseases, which may eventually lead to the death of the host plant. Therefore, timely and accurate monitoring of the activities of longhorn beetles can provide an important basis for the management and protection of ancient and famous trees. In recent years, plant disease and insect pest monitoring technologies based on computer vision have gradually emerged, and accurate identification and monitoring of plant diseases and insect pests have been achieved through image processing and deep learning.
[0003] In the prior art, the publication number is CN117576728A, and the name is a method and system for monitoring pine beetles based on computer vision, wherein the method includes obtaining multiple first images of the target area; using the YOLO-v8 target detection algorithm to perform a first recognition of the pine beetles in each first image, and marking the first recognition result with a detection frame; inputting the second image in the detection frame into the adversarial convolutional autoencoder to extract the deep features of the second image; inputting the deep features of the second image into the Gaussian process classifier to perform a second recognition of the pine beetles in the second image, and obtaining the number of pine beetles in the first image. Through image acquisition and image recognition, the identification and quantity statistics of pine beetles are realized, providing effective pest and disease control support for forestry management.
[0004] Existing monitoring technologies mostly rely on visible light imaging, which makes it difficult to effectively extract weak signals of longhorn beetle activity, especially at night or in low-light environments. Traditional imaging technology is easily affected by insufficient light, resulting in missing and inaccurate monitoring data. In addition, existing technologies usually lack effective temporal analysis and fail to fully utilize information in the time dimension to capture changes in the number and activity patterns of longhorn beetles. Even if fluorescence imaging is used in some cases, the processing and analysis of fluorescence signals are also insufficient, often only providing qualitative observations, but lacking quantitative analysis and model building.
[0005] The above information disclosed in the above Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not form the prior art that is already known to one of ordinary skill in the art. Summary of the invention
[0006] The purpose of the present invention is to provide a computer vision-based method and system for monitoring longhorn beetles on ancient and famous trees to solve the problems raised in the above-mentioned background technology.
[0007] To achieve the above object, the present invention provides the following technical solutions: The computer vision-based method for monitoring longhorn beetles on ancient and famous trees includes the following specific steps: Step S1: at night or in a low-light environment, initially using a medium exposure mode among multiple exposure modes to continuously collect ultraviolet fluorescence images of the surface of the current ancient and famous tree due to the activity of longhorn beetles, and recording the collected ultraviolet fluorescence images as time-series image data; Step S2: preprocessing the ultraviolet fluorescence image data in the time series image data; Step S3: using a deep learning model to perform semantic segmentation on the preprocessed ultraviolet fluorescence image to extract fluorescent areas related to bovine excrement and activity traces; Step S4: obtaining the segmented fluorescence region and extracting and analyzing the fluorescence features, where the fluorescence features include the fluorescence region area and the average fluorescence signal intensity; Step S5: acquiring historical data of the number of longhorn beetles under different fluorescence characteristics, and establishing a correlation model between the fluorescence characteristics of the ultraviolet fluorescence image and the number of longhorn beetles according to the fluorescence characteristics of the fluorescence area; Extract the fluorescence features of the latest ultraviolet fluorescence image in the time series image data; input the extracted fluorescence features into the established correlation model, and finally obtain the prediction value of the number of longhorn beetles based on the medium exposure mode; Step S6: Perform fluorescence characteristic trend analysis of continuous time periods on the currently acquired time series image data to generate a fluorescence characteristic change index, and combine the fluorescence characteristic change index with the predicted value of the number of longhorn beetles for analysis. The analysis results are used to adjust the exposure mode of subsequent ultraviolet fluorescence images accordingly.
[0008] A computer vision-based system for monitoring longhorn beetles on ancient and famous trees, the system being used to execute the computer vision-based method for monitoring longhorn beetles on ancient and famous trees, comprising: Time-series image acquisition module: used to initially use the medium exposure mode in multiple exposure modes to continuously acquire ultraviolet fluorescence images generated by the activities of longicorn beetles on the surface of the current ancient and famous trees at night or in low-light environments, and record the acquired ultraviolet fluorescence images as time-series image data; Preprocessing module: used for preprocessing the ultraviolet fluorescence image data in the time series image data; Fluorescence region determination module: used to perform semantic segmentation on the pre-processed ultraviolet fluorescence image using a deep learning model, and extract the fluorescent regions related to the excretions and activity traces of the cows; Extraction module: used to obtain the segmented fluorescence area and extract and analyze the fluorescence features, including the fluorescence area and the average fluorescence signal intensity; Correlation model building module: used to obtain historical data on the number of longhorn beetles under different fluorescence characteristics, and to establish a correlation model between the fluorescence characteristics of the ultraviolet fluorescence image and the number of longhorn beetles based on the fluorescence characteristics of the fluorescence area; Extract the fluorescence features of the latest ultraviolet fluorescence image in the time series image data; input the extracted fluorescence features into the established correlation model, and finally obtain the prediction value of the number of longhorn beetles based on the medium exposure mode; Judgment and adjustment module: used to perform fluorescence characteristic trend analysis on the currently collected time series image data for continuous time periods to generate a fluorescence characteristic change index, and to conduct a combined analysis of the fluorescence characteristic change index and the predicted value of the number of longhorn beetles. The analysis results are used to make corresponding adjustments to the exposure mode of subsequent ultraviolet fluorescence images.
[0009] Compared with the prior art, the beneficial effects of the present invention are: by utilizing ultraviolet fluorescence image acquisition under multiple exposure modes, combined with deep learning technology for semantic segmentation and fluorescence feature extraction, a correlation model between fluorescence features and the number of longhorn beetles is established; this technical solution can effectively improve the monitoring capability in low-light environments, and provide more accurate and quantitative prediction values for the number of longhorn beetles; at the same time, through the analysis of fluorescence feature trends over continuous time periods, this method helps to identify the dynamic changes in longhorn beetle activities, and then provide adjustment strategies for the exposure modes of subsequent ultraviolet fluorescence images. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 It is a schematic diagram of the overall method flow of the present invention; Figure 2 This is a block diagram of the overall system module of the present invention. DETAILED DESCRIPTION
[0011] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.
[0012] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0013] Embodiment 1: See also Figure 1 , the present invention provides a technical solution: The computer vision-based method for monitoring longhorn beetles on ancient and famous trees includes the following specific steps: Step S1: at night or in a low-light environment, initially using a medium exposure mode among multiple exposure modes to continuously collect ultraviolet fluorescence images of the surface of the current ancient and famous tree due to the activity of longhorn beetles, and recording the collected ultraviolet fluorescence images as time-series image data; Further explanation: The acquisition of the time series image data includes: Set the night time as the time period from 19:00 to 6:00 the next day, and set the low light environment as the light intensity less than 5lux; Using the ultraviolet fluorescence excitation imaging system, multiple ultraviolet fluorescence cameras are arranged around the ancient trees and famous trees. Then, continuous image sampling is performed on the surface of the ancient trees and famous trees at different time periods to obtain complete ultraviolet fluorescence images of the surface of the ancient trees and famous trees. The ultraviolet fluorescence excitation imaging system comprises an ultraviolet fluorescence camera and an excitation light source, wherein the excitation light source adopts an LED ultraviolet lamp with a wavelength of 365nm to 395nm. When the wavelength is within the range of 365nm to 395nm, the excrement of brown oxen can produce a fluorescence effect within the wavelength range of 365nm to 395nm. The ultraviolet fluorescent camera adopts the industrial-grade ultraviolet fluorescent camera of the FLIRUV series. The acquisition angle of the ultraviolet camera is 45° with the shooting target surface. Each ultraviolet fluorescent camera is 1.5 meters to 2 meters away from the shooting target to reduce light interference and improve the response intensity of the fluorescent signal. In this embodiment, there are 4 ultraviolet fluorescent cameras. The multiple exposure modes include: low exposure, medium exposure and high exposure; The exposure time ranges of the multiple exposure modes are set within the interval [BG1, BG2], where BG1 and BG2 are the minimum exposure time and the maximum exposure time, respectively, and the exposure times of low exposure, medium exposure and high exposure increase in sequence; Set i∈{1,2,…,n}, i represents the index of the number of acquisitions, n represents the total number of acquisitions of the ultraviolet fluorescence image in the time series image data, j∈{1,2,3}, j represents the type index of the exposure mode, and j=1 represents the low exposure mode; j=2 represents the medium exposure mode; j=3 represents the high exposure mode. In each acquisition, the initial setting is to perform the ultraviolet fluorescence image acquisition in the medium exposure mode; In the time series image data, the UV fluorescence image acquired in the jth exposure mode at the ith time is recorded as ; Divide the number of acquisitions in {1,2,…,n} into at least two parts, the first part represents the number of acquisitions in the first time period, the second part represents the number of acquisitions in the second time period, and the first time period and the second time period constitute a continuous time period; In this embodiment, the example values of BG1 and BG2 are 10 milliseconds and 100 milliseconds respectively, where: Low exposure is exposure time less than 10 milliseconds; Medium exposure is the exposure time in the interval [10, 100] milliseconds; High exposure exceeds 100 milliseconds exposure time; Each UV fluorescence camera works continuously for 11 hours at a frequency of one frame every 10 minutes, collecting spectral imaging data covering the entire area of ancient and famous trees; the 11 hours are adjusted according to the "condition of light intensity less than 5lux"; The above acquisition process selects a time period with clear weather, moderate humidity and no precipitation for measurement; To determine moderate humidity: monitor humidity in places where longhorn beetles are active, collect long-term humidity data, and analyze the most suitable humidity range based on data on longhorn beetle activity traces.
[0014] Laboratory experiments can simulate different humidity conditions to evaluate the activity intensity of longhorn beetles and the realization of fluorescent signals; In a controlled environment such as a greenhouse, the humidity is artificially adjusted (between 30%-70%) to conduct experiments on longhorn beetle activity and fluorescence signal simulation.
[0015] It should be noted that: The activities of longhorn beetles, including bark feeding, excretion, saliva secretion and other behaviors, can produce or enhance fluorescent signals on the surface of trees; The excrement and saliva of longhorn beetles contain fluorescent active substances that can fluoresce under ultraviolet light; Step S2: preprocessing the ultraviolet fluorescence image data in the time series image data; Further description: The preprocessing of the ultraviolet fluorescence image data specifically includes: Use image registration algorithms to register and stitch images of ancient trees and famous trees taken by multiple UV fluorescence cameras at different viewing angles to generate complete UV fluorescence images of the surface of ancient trees and famous trees; Based on the bilateral filtering algorithm, low-frequency noise in UV fluorescence images is removed, while high-frequency edge features are enhanced; Histogram equalization was performed on the denoised UV fluorescence image to enhance the contrast between the fluorescent area and the background.
[0016] The implementation steps for image registration and stitching, as well as denoising and image enhancement are as follows: 1.1) Feature point extraction: Open each UV fluorescence image, use image processing software (such as ImageJ, Photoshop or MATLAB) or supporting tools to run the SIFT algorithm (OpenCV library can be used), and extract key point features on each UV fluorescence image through the SIFT algorithm; the key point feature determination process is as follows: Creating scale space through Gaussian blur: Gaussian blur is performed on UV fluorescence images of different scales to generate a series of scale space images.
[0017] Detect extreme points: In the generated scale space image, detect local extreme points; extreme points are potential key points.
[0018] Feature descriptor generation: Direction assignment: Each extreme point is assigned one or more directions, ensuring that the descriptor is rotationally invariant.
[0019] Calculate the descriptor: Generate a rotation-invariant 128-dimensional vector descriptor based on the local neighborhood gradient of the extreme point.
[0020] Use MATLAB, Python's OpenCV library, or other image processing software to actually perform the above steps.
[0021] 1.2) Feature point matching: In the software tool, the ultraviolet fluorescence image exposed in the middle is selected as the reference image; and feature points of all ultraviolet fluorescence images are matched with the reference image.
[0022] The RANSAC algorithm is used to filter out incorrect matching points to ensure accurate matching.
[0023] 1.3) Geometric transformation: The transformation matrix of each ultraviolet fluorescence image is calculated, which in this embodiment includes translation, rotation and scaling parameters.
[0024] Apply this transformation matrix in the software to align the image to the reference image.
[0025] Ensure that the feature positions between images from different perspectives coincide.
[0026] 1.4) Image stitching: In the graphics editing software, the aligned images were gradually stitched into a complete UV fluorescence image, and the image edge transition was smoothed using a blending method.
[0027] 2) For noise removal: 2.1) Parameter selection: Use the bilateral filtering function supported by the image editing software to set the filtering parameters.
[0028] Set the spatial domain parameter σd to 10 and the intensity domain parameter σr to 0.1. These settings are directly set in professional image processing tools.
[0029] 2.2) Apply filtering: Performs bilateral filtering, scanning the entire image, including complex and detailed areas, reducing background noise while preserving edge clarity.
[0030] 3) For image enhancement: 3.1) Histogram calculation: Use the built-in histogram function of the graphics editing software to generate a grayscale histogram of the denoised image.
[0031] 3.2) Equalization processing: The histogram equalization function is implemented in software.
[0032] Adjust UV fluorescence image contrast to improve visibility of fluorescent areas relative to background.
[0033] Save the processed images in high-quality format (JPEG / PNG) while maintaining the original resolution.
[0034] Step S3: using a deep learning model to perform semantic segmentation on the preprocessed ultraviolet fluorescence image to extract fluorescent areas related to bovine excrement and activity traces; Further explanation: The deep learning model completes pixel-level image analysis through the semantic segmentation model UNet, in which the fluorescent area is classified using pre-trained model parameters; The fluorescent areas in the segmented results are marked by classification masks to distinguish the fluorescent areas from the non-fluorescent areas, where the fluorescent areas include the areas of longhorn beetle excrement and the areas of longhorn beetle activity traces; Generate a multi-channel two-dimensional segmentation mask for the fluorescent area for subsequent fluorescence feature extraction.
[0035] The pre-trained model parameters are obtained as follows: Model training data preparation: The dataset contains manually annotated UV fluorescence images, the annotations include: Fluorescent area: characteristics of cattle excretion and activity traces; Non-fluorescent areas: invalid information such as bark and background.
[0036] Collect no less than 5,000 manually annotated UV fluorescence image sample data, divided into a training set (80%) and a validation set (20%) to ensure the generalization ability of the model.
[0037] All images are normalized to ensure that the input images have the same size and color space.
[0038] Select UNet as the basic model for semantic segmentation; Pre-training parameter initialization: Using transfer learning technology, ResNet is selected as the backbone network of the encoder, and its pre-trained parameters are loaded to speed up convergence.
[0039] Through transfer learning, the advanced feature representation capabilities of ResNet are effectively combined to improve the accuracy of fluorescent area recognition.
[0040] Training process: The cross entropy loss function is combined with the dice coefficient to optimize the target and clearly distinguish the high signal fluorescence area from the background area.
[0041] Model hyperparameter settings: learning rate is 1e-4, batch size is 16, and ResNet pre-training parameters are used for initialization through transfer learning technology.
[0042] Use stochastic gradient descent (SGD) or Adam optimizer for parameter tuning in the training set.
[0043] Regularly record training and validation errors to prevent overfitting, and perform data augmentation (such as rotation, scaling) as needed; Segmentation result analysis: Use the trained UNet model to perform semantic segmentation on the validation set and new images.
[0044] Each segmented area is represented by a different color: red represents cattle excretion, and blue represents activity traces, which facilitates intuitive analysis.
[0045] Generate a multi-channel 2D segmentation mask: The segmentation results are converted into multi-channel 2D masks, with each channel corresponding to one classification (e.g., cow excrement and activity traces).
[0046] These masks are used for subsequent fluorescence signal feature extraction to improve the analysis accuracy of different biological features.
[0047] Step S4: obtaining the segmented fluorescence region and extracting and analyzing the fluorescence features, where the fluorescence features include the fluorescence region area and the average fluorescence signal intensity; Further explanation: Defining UV fluorescence images The fluorescence area is ; Calculated by counting the total number of pixels in the segmentation mask ; Based on the area of the fluorescence region, the average fluorescence signal intensity of the fluorescence region is defined as , the formula is: ; in, Represents pixel coordinates The gray value of the pixel at Represents pixel coordinates The area of the fluorescent area The set of all pixel coordinates within.
[0048] Step S5: acquiring historical data of the number of longhorn beetles under different fluorescence characteristics, and establishing a correlation model between the fluorescence characteristics of the ultraviolet fluorescence image and the number of longhorn beetles according to the fluorescence characteristics of the fluorescence area; Extract the fluorescence features of the latest ultraviolet fluorescence image in the time series image data; input the extracted fluorescence features into the established correlation model, and finally obtain the prediction value of the number of longhorn beetles based on the medium exposure mode; At night or in low light, collect a dataset of ultraviolet fluorescence images of ancient and famous trees covering the season when longicorn beetles are active. Each ultraviolet fluorescence image records the acquisition time, the i-th acquisition, and the j-th exposure mode. It also includes records of the number of longicorn beetles corresponding to the manually annotated fluorescence feature data. Extract the fluorescence characteristics of each UV fluorescence image in the fluorescence area; specifically, the average fluorescence signal intensity and the fluorescence area ; Match and annotate the fluorescence feature data of the jth exposure mode collected each time with the number of longicorn beetles recorded manually in history to generate an annotated data set; Calibration data is collected through regular experiments to verify the correspondence between the fluorescence features extracted from the UV fluorescence images and the actual measured number of longicorn beetles, ensuring the accuracy and reliability of the data.
[0049] Clean all collected fluorescence feature data to remove outliers and noise data; The data was standardized to ensure that the dimension of the feature data was consistent, using the z-score standardization method (i.e., the mean was 0 and the standard deviation was 1).
[0050] Based on the labeled data set, a nonlinear regression model was selected, and the nonlinear regression model was support vector regression (SVR) or random forest regression (RF) to establish the association model between the fluorescence characteristics and the number of longicorn beetles; Selection criteria: Support vector regression (SVR) is suitable for small sample data sets and has good generalization ability; random forest regression (RF) is suitable for processing high-dimensional feature data and has high robustness.
[0051] The association model under the jth exposure mode is defined as: ; in, is a nonlinear function under the jth exposure mode, which is used to describe the correlation characteristics between the fluorescence characteristics under the jth exposure mode and the number of longicorn beetles; is the predicted value of the number of longicorns corresponding to the fluorescence characteristics under the jth exposure mode; is the average fluorescence signal intensity in the jth exposure mode; is the area of the fluorescent region under the jth exposure mode; Extract the fluorescence features of the latest UV fluorescence image in the time series image data, and record the average fluorescence signal intensity and fluorescence area of the fluorescence features extracted under the jth exposure mode in the nth acquisition as and ; Indicates the acquisition times index of the latest UV fluorescence image; Use 50% of the collected data as the training set to train the association model, and use cross-validation technology to adjust the model hyperparameters to optimize model performance; The remaining 50% of the collected data is used as a test set to evaluate the prediction accuracy and generalization ability of the model; The extracted fluorescence feature data corresponds to and Input into the trained association model, calculate and output the predicted value of the number of longhorn beetles in the jth exposure mode in the nth acquisition ; The predicted value of the number of longhorn beetles under the medium exposure mode is recorded as .
[0052] Step S6: performing fluorescence characteristic trend analysis of the currently collected time series image data in a continuous time period to generate a fluorescence characteristic change index, combining and analyzing the fluorescence characteristic change index and the longicorn number prediction value, and using the analysis result to adjust the exposure mode of subsequent ultraviolet fluorescence images accordingly; The exposure mode adjustment is used to reduce the data storage burden of the UV fluorescence camera; Further explanation: The first time period and the second time period are respectively recorded as T1 and T2, and T1 and T2 are uniformly expressed as T∈{T1, T2}; the fluorescence characteristics in T1 and T2 are differentially calculated, and the following average fluorescence signal intensity and average fluorescence area of the first time period and the second time period are obtained respectively: ; ; ; ; in, and Respectively represent the average fluorescence signal intensity in the first time period and the second time period; and Represent the average fluorescence area in the first time period and the second time period respectively; Indicates the number of collections corresponding to the first time period; Indicates the number of collections corresponding to the second time period; A representation of the number of first acquisitions in the second time period; The difference between the average fluorescence signal intensity of the second time period and the first time period is calculated to obtain a first difference value. ; The difference between the average fluorescence area of the second time period and the first time period is calculated to obtain a second difference value. ; and The calculation formula is as follows: ; ; Combination and , the fluorescence characteristic change index is defined as , the calculation formula is as follows: ; in: , is the weight coefficient, , , The value range is in the interval (0,1); , Used to adjust the contribution of the corresponding parameters to the fluorescence characteristic change index; in this embodiment, select , ; , The corresponding weights are determined by entropy weight method and fuzzy analytic hierarchy process (FAHP); In this embodiment, ; ; For the first difference : represents the change in the average fluorescence signal intensity between two time periods; if Increase, in weight Under the condition of unchanged It then increases.
[0053] For the second difference : represents the change in the average fluorescence area between two time periods; if Increase, in weight Under the condition of unchanged It also increases accordingly; For the weight coefficient , Interaction adjustment: , The sum of the weights is 1: when : Indicates the change of the average fluorescence signal intensity to The contribution is greater.
[0054] when : Indicates the change of the average fluorescence area to The contribution is greater.
[0055] By adjusting , The size of the parameter is determined according to the importance of the parameter in the specific scene. For example, when the activity of the beetle has a greater impact on the fluorescence signal intensity, increase The value of .
[0056] The default value recommended in this example , , that is, the change in fluorescence intensity affects the index by 60%, and the change in area affects by 40%; when or Increase: if and will increase, leading to Reduce, thereby increase The value of .
[0057] and The differences in signal strength and area were measured respectively. , The relative importance of these two parameters is adjusted through weight distribution. Real-time monitoring and and adjust the weights and adjustment factors according to the specific application to ensure Reliability and practicality in different environments.
[0058] The larger the value, the greater the change in the fluorescence characteristics, which means the greater the change in the activity trend of the longhorn beetle; set up The median interval is [q1, q2], q1 and q2 are the minimum and maximum values of the median interval respectively, and [q1, q2] is included in the interval (0,1); Get the predicted value of the number of longhorn beetles in the medium exposure mode ; The warning range of the number of longhorn beetles on the surface of ancient trees and famous trees in the current environment is recorded as ; and They are the lower and upper limits of the warning range for the number of longhorn beetles; like The value is less than q1, and In the interval When the time is within the range, the change in the average fluorescence signal intensity and / or the average fluorescence area between the first time period and the second time period is small, and In the warning zone In the range of 0.1, it means that the number of longhorn beetles on ancient trees is medium. Therefore, when the fluorescence characteristics change slightly, the activity trend of longhorn beetles changes little, and the number of longhorn beetles is within the warning range, choose the medium exposure mode to shoot. Because the low exposure mode will be underexposed, and the high exposure mode will be overexposed, the medium exposure mode is needed to capture the best ultraviolet fluorescence image. like The value is less than q1, and Less than When the average fluorescence signal intensity and / or the average fluorescence area between the first time period and the second time period is small, Less than , indicating that the number of longhorn beetles on ancient trees is small. Therefore, when the fluorescence characteristics change slightly, the activity trend of longhorn beetles changes little, and the number of longhorn beetles is below the warning range, low exposure mode can be used to deal with these small numbers of longhorn beetles. like The value is less than q1, and Greater than When the average fluorescence signal intensity and / or the average fluorescence area between the first time period and the second time period is small, Greater than , indicating that there are many longhorn beetles on ancient trees and famous trees. Therefore, in the scenario where the fluorescence characteristic changes slightly, the activity behavior trend of the longhorn beetles changes slightly, and the number of longhorn beetles is above the warning interval, although the change in the average fluorescence signal intensity and / or the average fluorescence area between the first time period and the second time period is small, the large number of longhorn beetles themselves will produce a large value of the fluorescence characteristic value. The three modes of low exposure, medium exposure and high exposure are selected to shoot together. Specifically, the high exposure mode is required to capture brighter areas. At the same time, the three modes of low exposure, medium exposure and high exposure are also required to shoot together to avoid the loss of details caused by fluorescence intensity saturation; like The value is in the median interval [q1, q2], and In the interval When the average fluorescence signal intensity and / or average fluorescence area between the first time period and the second time period is within the range of 1 to 2, the change in the average fluorescence signal intensity and / or average fluorescence area between the first time period and the second time period is moderate. In the warning zone In, it means that the number of longhorn beetles on ancient trees is medium, so low and medium exposure modes are selected for shooting; like The value is in the median interval [q1, q2], and Less than When , the change in the average fluorescence signal intensity and / or the average fluorescence area between the first time period and the second time period is medium, Less than , indicating that there are few longhorn beetles on ancient and famous trees. Therefore, when the fluorescence characteristic changes in the medium range, the activity trend of the longhorn beetles changes to a medium trend, and the low exposure mode is selected for shooting; like The value is in the median interval [q1, q2], and Greater than When , the change in the average fluorescence signal intensity and / or the average fluorescence area between the first time period and the second time period is medium, Greater than , indicating that there are many longhorn beetles on ancient trees. Therefore, when the fluorescence characteristic change amplitude is medium and the activity behavior trend of the longhorn beetles is medium, three modes of low exposure, medium exposure and high exposure are selected for shooting together; like A value greater than q2 indicates that the activity trend of the longhorn beetle changes greatly, which in turn indicates that the amplitude of the fluorescence characteristic changes greatly, and In the interval When it is within, it means that the number of longhorn beetles on ancient trees is within the warning range, and the activity trend of longhorn beetles is changing greatly. Although the number of longhorn beetles has not exceeded the warning range, the trend of their activity behavior is changing greatly. Therefore, it is necessary to select medium exposure and high exposure mode to avoid loss of details caused by fluorescence intensity saturation; like The value is greater than q2, and Less than When , it means that the activity trend of the longhorn beetles has changed greatly, but the number of longhorn beetles is low. Since a low number of longhorn beetles cannot produce many fluorescent material activity tracks on the surface of the ancient tree, you only need to choose the medium exposure mode to deal with the situation of large changes in activity trend and low number of longhorn beetles. The low exposure mode will be underexposed, while the high exposure mode will be overexposed. At this time, the medium exposure mode is needed to capture the best ultraviolet fluorescence image; like The value is greater than q2, and Greater than When shooting, because a large number of longhorn beetles will produce larger fluorescence characteristic values and the activity of longhorn beetles tends to change greatly, we choose three exposure modes: low exposure, medium exposure and high exposure.
[0059] The method for determining [q1,q2] is as follows: Method 1, statistical quantile method: according to The distribution of [q1,q2] is determined through statistical analysis of historical sample data.
[0060] 1. Statistics Sample data: Collect historical longhorn beetle monitoring data Vary the sample and calculate two appropriate quantiles in the distribution (such as the 25% and 75% quantiles).
[0061] 2.Threshold definition: q1=25% quantile: corresponding to The lower 25% boundary value in the sample; q2=75% quantile: corresponding to The upper 75% boundary value in the sample.
[0062] Features include: Low value Corresponding to the lower interval in the sample; Median value Corresponding sample set value; High value Abnormal or concentrated high activity.
[0063] 3. Example: Assume that the collected The data is [0.1, 0.15, 0.2, 0.3, 0.5, 0.7, 0.9]; Then the 25% quantile is q1=0.2, and the 75% quantile is q2=0.7.
[0064] Final: [q1,q2]=[0.2,0.7].
[0065] Method 2: Refer to the empirical definition method based on actual business needs: Based on the monitoring needs of Tianniu and [q1,q2] is set directly based on empirical observations of fluctuations.
[0066] 1. Setting principles: According to the system's sensitivity to beetle behavior requirements: If more attention is paid to capturing the changes in the activity of longhorn beetles, the interval [q1,q2] is set relatively narrow; If you focus on system stability and loose monitoring, set the interval [q1,q2] wider.
[0067] Make sure [q1,q2] is between (0,1) and matches the actual fluctuation.
[0068] 2. General experience value: If the detection requirements for diffusion and cluster changes are general, set [q1,q2]=[0.3,0.7].
[0069] If we consider that the activities of longhorn beetles have a great impact on the environment and need to be monitored intensively, the interval can be narrowed to [0.4, 0.6].
[0070] 3. Adjustment strategy: Dynamically adjust [q1,q2] according to on-site conditions (such as ambient light, health status of ancient trees, etc.) to better adapt to actual conditions.
[0071] Method 3: Dynamic adaptive method (dynamic calculation based on real-time monitoring data): In scenarios without a clear statistical data basis or in real-time applications, [q1,q2] can be determined dynamically using weights and formulas.
[0072] 1. Data window based on time series: Set a time window (such as the most recent N2 value), calculate the value within the window The mean and standard deviation .
[0073] Dynamic calculation [q1,q2]: : Indicates the deviation below the mean times the standard deviation; : indicates the deviation above the mean times the standard deviation.
[0074] The recommended value range is [0.5,1], which can be adjusted according to real-time monitoring requirements.
[0075] Method 3 can adapt to the mechanism and dynamically capture to adapt to different sampling stages or monitoring environments.
[0076] Embodiment 2: See also Figure 2 , a computer vision-based monitoring system for longhorn beetles on ancient and famous trees, the system is used to execute the computer vision-based monitoring method for longhorn beetles on ancient and famous trees, comprising: Time-series image acquisition module: used to initially use the medium exposure mode in multiple exposure modes to continuously acquire ultraviolet fluorescence images generated by the activities of longicorn beetles on the surface of the current ancient and famous trees at night or in low-light environments, and record the acquired ultraviolet fluorescence images as time-series image data; Preprocessing module: used for preprocessing the ultraviolet fluorescence image data in the time series image data; Fluorescence region determination module: used to perform semantic segmentation on the pre-processed ultraviolet fluorescence image using a deep learning model, and extract the fluorescent regions related to the excretions and activity traces of the cows; Extraction module: used to obtain the segmented fluorescence area and extract and analyze the fluorescence features, including the fluorescence area and the average fluorescence signal intensity; Correlation model building module: used to obtain historical data on the number of longhorn beetles under different fluorescence characteristics, and to establish a correlation model between the fluorescence characteristics of the ultraviolet fluorescence image and the number of longhorn beetles based on the fluorescence characteristics of the fluorescence area; Extract the fluorescence features of the latest ultraviolet fluorescence image in the time series image data; input the extracted fluorescence features into the established correlation model, and finally obtain the prediction value of the number of longhorn beetles based on the medium exposure mode; Judgment and adjustment module: used to perform fluorescence characteristic trend analysis on the currently collected time series image data for continuous time periods to generate a fluorescence characteristic change index, and to conduct a combined analysis of the fluorescence characteristic change index and the predicted value of the number of longhorn beetles. The analysis results are used to make corresponding adjustments to the exposure mode of subsequent ultraviolet fluorescence images.
[0077] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.
[0078] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented using software, the above embodiments may be implemented in whole or in part in the form of a computer program product. Those skilled in the art may appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software methods depends on the specific application and design constraints of the technical solution.
[0079] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0080] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A computer vision-based method for monitoring longhorn beetles on ancient and famous trees, characterized in that: The specific steps include: Step S1: at night or in a low-light environment, initially using a medium exposure mode among multiple exposure modes to continuously collect ultraviolet fluorescence images of the surface of the current ancient and famous tree due to the activity of longhorn beetles, and recording the collected ultraviolet fluorescence images as time-series image data; Step S2: preprocessing the ultraviolet fluorescence image data in the time series image data; Step S3: using a deep learning model to perform semantic segmentation on the preprocessed ultraviolet fluorescence image to extract fluorescent areas related to bovine excrement and activity traces; Step S4: obtaining the segmented fluorescence region and extracting and analyzing the fluorescence features, where the fluorescence features include the fluorescence region area and the average fluorescence signal intensity; Step S5: acquiring historical data of the number of longhorn beetles under different fluorescence characteristics, and establishing a correlation model between the fluorescence characteristics of the ultraviolet fluorescence image and the number of longhorn beetles according to the fluorescence characteristics of the fluorescence area; Extract the fluorescence features of the latest ultraviolet fluorescence image in the time series image data; input the extracted fluorescence features into the established correlation model, and finally obtain the prediction value of the number of longhorn beetles based on the medium exposure mode; Step S6: Perform fluorescence characteristic trend analysis of continuous time periods on the currently acquired time series image data to generate a fluorescence characteristic change index, and combine the fluorescence characteristic change index with the predicted value of the number of longhorn beetles for analysis. The analysis results are used to adjust the exposure mode of subsequent ultraviolet fluorescence images accordingly.
2. The computer vision-based method for monitoring longhorn beetles on ancient and famous trees according to claim 1, characterized in that: The acquisition of the time series image data includes: Using the ultraviolet fluorescence excitation imaging system, multiple ultraviolet fluorescence cameras are arranged around the ancient trees and famous trees, and then continuous image sampling is performed on the surface of the ancient trees and famous trees to obtain a complete ultraviolet fluorescence image of the surface of the ancient trees and famous trees; The multiple exposure modes include: low exposure, medium exposure and high exposure; The exposure time ranges of the multiple exposure modes are set within the interval [BG1, BG2], where BG1 and BG2 are the minimum exposure time and the maximum exposure time, respectively, and the exposure times of low exposure, medium exposure and high exposure increase in sequence; Set i∈{1,2,…,n}, i represents the index of the acquisition times, n represents the total acquisition times of the ultraviolet fluorescence image in the time series image data, j∈{1,2,3}, j represents the type index of the exposure mode, and j=1 represents the low exposure mode; j=2 represents the medium exposure mode; j=3 represents the high exposure mode; in each acquisition, the initial setting is to perform the ultraviolet fluorescence image acquisition in the medium exposure mode; In the time series image data, the UV fluorescence image acquired in the jth exposure mode at the ith time is recorded as ; The number of acquisitions in {1,2,…,n} is divided into two parts, the first part represents the number of acquisitions in the first time period, and the second part represents the number of acquisitions in the second time period, and the first time period and the second time period constitute a continuous time period.
3. The computer vision-based method for monitoring longhorn beetles on ancient and famous trees according to claim 2, characterized in that: The preprocessing of the ultraviolet fluorescence image data specifically includes: Based on the bilateral filtering algorithm, low-frequency noise in UV fluorescence images is removed, while high-frequency edge features are enhanced; Histogram equalization was performed on the denoised UV fluorescence image to enhance the contrast between the fluorescent area and the background.
4. The computer vision-based method for monitoring longhorn beetles on ancient and famous trees according to claim 3, characterized in that: The deep learning model performs pixel-level image analysis through the semantic segmentation model UNet, in which the fluorescent areas are classified using pre-trained model parameters; The fluorescent areas in the segmented results are marked by classification masks to distinguish the fluorescent areas from the non-fluorescent areas, where the fluorescent areas include the areas of longhorn beetle excrement and the areas of longhorn beetle activity traces; Generate a multi-channel two-dimensional segmentation mask for the fluorescent area for subsequent fluorescence feature extraction.
5. The computer vision-based method for monitoring longhorn beetles on ancient and famous trees according to claim 4, characterized in that: Defining UV fluorescence images The fluorescence area is ; Based on the area of the fluorescence region, the average fluorescence signal intensity of the fluorescence region is defined as , the formula is: ; in, Represents pixel coordinates The gray value of the pixel at Indicates the area of the fluorescent region The set of all pixel coordinates within.
6. The computer vision-based method for monitoring longhorn beetles on ancient and famous trees according to claim 5, characterized in that: The historical data of the number of longhorn beetles under different fluorescence characteristics were obtained, and the correlation model between the fluorescence characteristics of the ultraviolet fluorescence image and the number of longhorn beetles was established according to the fluorescence characteristics of the fluorescence area, including: At night or in low light, collect a dataset of ultraviolet fluorescence images of ancient and famous trees covering the season when longhorn beetles are active; each ultraviolet fluorescence image records the acquisition time and exposure mode; and also includes records of the number of longhorn beetles corresponding to the manually annotated fluorescence feature data; Match and annotate the fluorescence feature data of the jth exposure mode with the number of longicorn beetles recorded manually in history to generate an annotated data set; Based on the annotated data set, a nonlinear regression model was selected to establish the association model between fluorescence characteristics and the number of longicorn beetles; The association model under the jth exposure mode is defined as: ; in, is a nonlinear function under the jth exposure mode, which is used to describe the correlation characteristics between the fluorescence characteristics under the jth exposure mode and the number of longicorn beetles; is the predicted value of the number of longicorns corresponding to the fluorescence characteristics under the jth exposure mode; is the average fluorescence signal intensity in the jth exposure mode; is the area of the fluorescent region under the jth exposure mode; Extract the fluorescence features of the latest UV fluorescence image in the time series image data, and record the average fluorescence signal intensity and fluorescence area of the fluorescence features extracted under the jth exposure mode in the nth acquisition as and ; Indicates the acquisition times index of the latest UV fluorescence image; The extracted fluorescence feature data corresponds to and Input into the trained association model, calculate and output the predicted value of the number of longhorn beetles in the jth exposure mode in the nth acquisition ; The predicted value of the number of longhorn beetles under the medium exposure mode is recorded as .
7. The computer vision-based method for monitoring longhorn beetles on ancient and famous trees according to claim 6, characterized in that: The first time period and the second time period are respectively denoted as T1 and T2, and T1 and T2 are uniformly represented as T∈{T1, T2}; the fluorescence features in T1 and T2 are differentially calculated to obtain the following average fluorescence signal intensity and average fluorescence area in the first time period and the second time period, respectively: ; ; ; ; in, and Respectively represent the average fluorescence signal intensity in the first time period and the second time period; and Represent the average fluorescence area in the first time period and the second time period respectively; Indicates the number of collections corresponding to the first time period; Indicates the number of collections corresponding to the second time period; A representation of the number of first acquisitions in the second time period; The difference between the average fluorescence signal intensity of the second time period and the first time period is calculated to obtain a first difference value. ; The difference between the average fluorescence area of the second time period and the first time period is calculated to obtain a second difference value. ; and The calculation formula is as follows: ; ; Combination and , the fluorescence characteristic change index is defined as , the calculation formula is as follows: ; in: , is the weight coefficient, , , The value range is in the interval (0,1); The larger the value, the greater the change in the fluorescence characteristics, which means the greater the change in the activity trend of the longhorn beetle; set up The median interval is [q1, q2], q1, q2 are the minimum and maximum values of the median interval respectively, and [q1, q2] is included in the interval (0, 1); the median interval [q1, q2] is used to characterize the boundary range between behaviors with large trend changes and behaviors with small changes; Get the predicted value of the number of longhorn beetles in the medium exposure mode ; The warning range of the number of longhorn beetles on the surface of ancient trees and famous trees in the current environment is recorded as ; and They are the lower and upper limits of the warning range for the number of longhorn beetles; like The value is less than q1, and In the interval When shooting in the dark, select the medium exposure mode; like The value is less than q1, and Less than When shooting, select low exposure mode; like The value is less than q1, and Greater than When shooting, choose three modes: low exposure, medium exposure and high exposure; like The value is in the median interval [q1, q2], and In the interval When shooting in low or medium exposure mode; like The value is in the median interval [q1, q2], and Less than When shooting, select low exposure mode; like The value is in the median interval [q1, q2], and Greater than When shooting, choose three modes: low exposure, medium exposure and high exposure; like The value is greater than q2, and In the interval When shooting in the dark, choose medium exposure and high exposure modes; like The value is greater than q2, and Less than When shooting, select the medium exposure mode; like The value is greater than q2, and Greater than When shooting, choose three modes: low exposure, medium exposure and high exposure.
8. A computer vision-based monitoring system for longhorn beetles on ancient and famous trees, characterized by: The system is used to execute the computer vision-based method for monitoring longhorn beetles on ancient and famous trees according to any one of claims 1 to 7, comprising: Time-series image acquisition module: used to initially use the medium exposure mode in multiple exposure modes to continuously acquire ultraviolet fluorescence images generated by the activities of longicorn beetles on the surface of the current ancient and famous trees at night or in low-light environments, and record the acquired ultraviolet fluorescence images as time-series image data; Preprocessing module: used for preprocessing the ultraviolet fluorescence image data in the time series image data; Fluorescence region determination module: used to perform semantic segmentation on the pre-processed ultraviolet fluorescence image using a deep learning model, and extract the fluorescent regions related to the excretions and activity traces of the cows; Extraction module: used to obtain the segmented fluorescence area and extract and analyze the fluorescence features, including the fluorescence area and the average fluorescence signal intensity; Correlation model building module: used to obtain historical data on the number of longhorn beetles under different fluorescence characteristics, and to establish a correlation model between the fluorescence characteristics of the ultraviolet fluorescence image and the number of longhorn beetles based on the fluorescence characteristics of the fluorescence area; Extract the fluorescence features of the latest ultraviolet fluorescence image in the time series image data; input the extracted fluorescence features into the established correlation model, and finally obtain the prediction value of the number of longhorn beetles based on the medium exposure mode; Judgment and adjustment module: used to perform fluorescence characteristic trend analysis on the currently collected time series image data for continuous time periods to generate a fluorescence characteristic change index, and to conduct a combined analysis of the fluorescence characteristic change index and the predicted value of the number of longhorn beetles. The analysis results are used to make corresponding adjustments to the exposure mode of subsequent ultraviolet fluorescence images.
Citation Information
Patent Citations
Leaf wetting time monitoring method and system
CN106022370A
Medium longicorn monitoring method and system, terminal equipment and storage medium
CN117392609A
Monochamus alternatus hope monitoring method and system based on computer vision
CN117576728A
Cited By
Health assessment method and system for ancient and famous trees
CN121705908A