A method and device for monitoring moss at earthen ruins based on vegetation index and time series correction

Through a method based on vegetation index and time series correction, the problem of low image segmentation accuracy in moss monitoring at earthen sites was solved, and high-precision monitoring of moss growth status and continuous tracking of growth conditions were achieved.

CN119810136BActive Publication Date: 2025-09-26ZHEJIANG UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411870937.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-09-26
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

Existing technologies make it difficult to achieve high-precision image segmentation in moss monitoring at earthen sites, especially when the sample size is small, the edges are blurred, and there is a lack of temporal information, resulting in low credibility of the segmentation results.

Method used

A method based on vegetation index and time series correction is adopted. The time series images are processed through spatial position registration, global illumination correction and white balance equalization. The visible light band difference vegetation index (VDVI) is used for calculation and binary segmentation. Combined with morphological operations and time series correction, the segmentation results are optimized to improve accuracy.

Benefits of technology

It achieves high-accuracy monitoring of moss growth in earthen ruins, can continuously track the segmentation and growth of moss areas, and improves segmentation accuracy and edge smoothness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810136B_ABST
    Figure CN119810136B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for monitoring moss at earthen sites based on vegetation index and time-series correction. The method comprises obtaining a time-series image sequence of the moss growth area at the earthen site; performing spatial position registration, illumination correction, and white balance correction on the time-series image sequence; calculating the corresponding VDVI sequence using the coefficient-adjusted VDVI index; performing threshold segmentation on the VDVI sequence using a binary method and taking the VDVI mean of the edge region of the moss region coarse segmentation result as the target; performing time-series correction on the coarse segmentation image of the moss region using the corresponding previous result; performing shape optimization on the segmented sequence after time-series correction to improve the integrity and edge smoothness of the segmented region; and calculating the actual area of ​​the optimized moss region segmentation result sequence to calculate the growth of moss on the corresponding earthen site surface, thereby completing moss monitoring at the earthen site. This technical solution can achieve accurate monitoring of moss at earthen sites.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of cultural relics monitoring, and in particular relates to a method and device for monitoring mosses in earthen ruins based on vegetation index and time series correction. Background Art

[0002] As direct physical carriers of history, earthen sites often contain a wealth of historical information. Under the influence of factors such as temperature, humidity, and light, earthen sites are prone to the growth of organisms such as mold, moss, and algae. Manual monitoring methods, such as these, make it difficult to accurately detect these diseases in a timely manner. Researching algorithms for monitoring moss at earthen sites can be used to predict moss diseases, quantitatively assess their management, and trace their causes. These algorithms can also provide important insights into the development of environmental control strategies for the preventative protection of earthen sites, and are therefore of great significance.

[0003] In order to achieve continuous monitoring of the moss area of ​​earthen ruins, the current method of monitoring time-series image data of mosses in earthen ruins is used to collect time-series image data of mosses in earthen ruins. It is of great significance to develop a moss monitoring algorithm based on such data.

[0004] The core of moss monitoring algorithms for earthen ruins lies in the image segmentation problem. As a classic problem in computer vision, it has yielded a wealth of research results. Mainstream image segmentation algorithms target natural or medical images and are primarily based on convolutional neural networks. Therefore, applying these algorithms to earthen ruins presents the following challenges:

[0005] First, the sample size of moss images of earthen ruins is extremely small. The lack of samples will make it difficult to conduct effective training, which will lead to low segmentation accuracy.

[0006] Secondly, the edges of mossy areas in earthen ruins are extremely fuzzy, making them difficult to label with high precision. Therefore, when mainstream deep learning algorithms are applied to this scenario, they suffer from unclear learning objectives, which in turn reduces the credibility of the segmentation results.

[0007] Third, common segmentation algorithms are mainly based on a single image and cannot consider the temporal information of the scene.

[0008] Therefore, in view of the above three shortcomings of the existing mainstream image segmentation algorithms when applied to earthen ruins moss monitoring scenarios, there is an urgent need for a special earthen ruins moss monitoring method to realize the monitoring of moss growth status.

[0009] Patent application publication number CN114809698A discloses a fissure grouting method for earthen sites based on real-time monitoring, including: obtaining the site parameters of the fissure's main body and grading the site based on the site parameters; removing loose soil on both sides of the fissure; grooving the fissure surface: determining the control index for grooving the fissure surface based on the site classification, and removing loose soil from the grooves based on the control index; spraying the fissure surface; arranging monitoring sensors in layers; supporting the free surface in layers: supporting the free surface in layers from bottom to top based on the layer height of the monitoring sensors and providing back pressure; and monitoring the layered grouting: grouting begins at the bottom layer, vibrating with a micro vibrator, monitoring the soil data on both sides of the fissure using monitoring sensors, and grouting the next layer when the monitoring data meets a preset threshold. However, this technical solution cannot monitor moss in earthen sites. Summary of the Invention

[0010] In view of the above, the object of the present invention is to provide a method and device for monitoring mosses in earthen ruins based on vegetation index and time series correction, so as to monitor the growth of mosses in earthen ruins.

[0011] To achieve the above-mentioned object of the invention, an embodiment provides a moss monitoring method for earthen ruins based on vegetation index and time series correction, comprising the following steps:

[0012] Step 1: Obtain a time-series image sequence of the moss monitoring area of ​​the earthen site, and perform spatial position alignment, global illumination correction, and white balance equalization operations on the time-series image sequence in sequence to obtain a corrected time-series image sequence;

[0013] Step 2: For the corrected time series image sequence, the visible light band difference vegetation index (VDVI) after coefficient adjustment is used to calculate and obtain a VDVI image sequence;

[0014] Step 3: Using a binary method to perform threshold segmentation on the VDVI image sequence to obtain a rough segmentation sequence of the moss area, so that the VDVI mean value of the edge area of ​​the rough segmentation sequence of the moss area is equal to a predetermined target value;

[0015] Step 4: For each coarse segmentation result in the moss region coarse segmentation sequence, perform time sequence correction using its corresponding previous coarse segmentation result to obtain a moss region time sequence corrected segmentation sequence;

[0016] Step 5, optimizing the segmentation sequence of the moss area after time sequence correction to improve the integrity and edge smoothness of the segmented region, and obtaining a moss area segmentation result sequence;

[0017] Step 6: Count the areas of the moss segmentation result sequence and calculate the growth of mosses on the surface of the corresponding earthen ruins.

[0018] Preferably, in step 1, a local white balance equalization algorithm is used for white balance equalization, and the input is a time-series image sequence that has been corrected for global illumination.

[0019] Preferably, in step 2, the visible light band difference vegetation index VDVI after coefficient adjustment is used for calculation to obtain a VDVI image sequence, including:

[0020]

[0021] Among them, ρ Green , ρ Red , ρ Blue Respectively represent the values ​​of the green, red, and blue bands in the RGB image, and α is an adjustable coefficient. According to the actual scene conditions, the α value is adjusted by reinforcement learning and optimization search. The VDVI image sequence obtained by VDVI calculation is recorded as V i , i=1,2,3...n, i represents the image index, and n is a positive integer.

[0022] Preferably, step 3 includes:

[0023] Step 3.1, specify the target value x0 of the VDVI mean value of the surrounding area of ​​the coarse segmentation sequence of the moss area;

[0024] Step 3.2, select a segmentation threshold t m , and use the segmentation threshold t m Perform binary threshold segmentation on the VDVI image, perform morphological closing operation on the segmentation result, and obtain the segmentation mask m0;

[0025] Step 3.3: First, extract the edge of the moss area from the segmentation mask m0. The extraction method is: perform morphological corrosion operation on the segmentation mask m0 to obtain the mask m ′ 0, calculate the edge area mask m e =m0-m ′ 0; then for the edge area mask m e , calculate the VDVI mean in the edge area

[0026] Step 3.4, re-adjust the segmentation threshold t m , and re-execute steps 3.2 and 3.3 so that the VDVI mean value in the edge area is The mask m0 obtained at this time is the coarse segmentation result of the moss area corresponding to the VDVI image, and the threshold t m is the corresponding segmentation threshold;

[0027] Step 3.5: Perform the above steps 3.2-3.4 for each image in the VDVI image sequence to obtain n coarse segmentation sequences R of moss areas composed of 0s and 1s. i , and its corresponding segmentation threshold is t i , i=1,2,3...n.

[0028] Preferably, step 4 includes:

[0029] Step 4.1: For the rough segmentation sequence R of the moss area i , i=1,2,3...n, starting from the kth image, select the coarse segmentation image R k to R n Timing correction will be performed;

[0030] Step 4.2: For the i-th coarse segmentation image R i The specific time series correction method is as follows: select the coarse segmentation image R i-k+1 to R i Form a set of images, in image R i-k+1 to R i-1 In the example, according to the distance image R i The time of image R is relatively close, and the time of image R is relatively far. i-k+1 to R i-1 Perform weighting to obtain its time series weighted image T i ;

[0031] Step 4.3, create a i The time series coarsely corrected image R of the same size i ′ , used to record the segmentation results after the timing coarse correction. The timing coarse correction method is as follows: i The median value is 1 and the temporal weighted image T i For pixels with a median value less than or equal to the preset first threshold, the image V i The value of the corresponding pixel in exceeds its corresponding segmentation threshold t i After a certain amount, the image R i ′ Only then is the pixel recorded as moss area, otherwise it is recorded as non-moss area; i The median value is 0 and the temporal weighted image T i For pixels with a median value greater than or equal to the preset second threshold, the image V i The value of the corresponding pixel in is lower than its corresponding segmentation threshold t i After a certain amount, the image R i ′ Only then is the pixel recorded as non-moss area; for other pixels, if R i The corresponding pixel value is 1, then the image R i′ The position of the pixel is recorded as a moss area, otherwise it is recorded as a non-moss area; the value range of the certain amount can be 0.01 to 0.03.

[0032] Step 4.4, the image R after time series rough correction ′ k to R ′ n Perform morphological closing operation to increase the integrity of the segmented area, and the result is the segmentation sequence S after time sequence correction of the moss area. i , i=k,k+1,k+2...n.

[0033] Preferably, step 5 includes:

[0034] Step 5.1: Segmentation sequence S after time sequence correction for moss area i Perform morphological dilation operation;

[0035] Step 5.2: Based on the result of the expansion operation, calculate the contour of each connected area with a value of 1, perform approximate calculation on the contour and draw the corresponding approximate polygon curve. Fill the inner part of the obtained approximate polygon curve with 1 and keep the outer part with 0 to obtain the shape-optimized moss area segmentation sequence S i ′ , i=k,k+1,k+2...n;

[0036] Step 5.3: For the moss area segmentation sequence after shape optimization, remove the broken areas with a value of 1 but an area smaller than the preset threshold, and perform morphological erosion operation to obtain the final moss area segmentation sequence S i ″, i=k, k+1, k+2...n.

[0037] Preferably, step 6 includes:

[0038] According to the actual measurement of the moss monitoring area of ​​the earthen site, the actual area of ​​the earthen site surface corresponding to one pixel on the image is calculated, and the sequence S of the moss area segmentation results is counted. i ″The actual area of ​​the moss area.

[0039] To achieve the above-mentioned purpose, an embodiment of the present invention further provides a moss monitoring device for earthen ruins based on vegetation index and time series correction, comprising:

[0040] An image correction module is used to obtain a time-series image sequence of the moss monitoring area of ​​the earthen site, and sequentially perform spatial position alignment, global illumination correction, and white balance equalization operations on the time-series image sequence to obtain a corrected time-series image sequence;

[0041] A VDVI calculation module is used to calculate the visible light band difference vegetation index VDVI after coefficient adjustment for the corrected time series image sequence to obtain a VDVI image sequence;

[0042] A coarse segmentation module is used to perform threshold segmentation on the VDVI image sequence using a binary method to obtain a coarse segmentation sequence of the moss area, so that the VDVI mean value of the edge area of ​​the coarse segmentation sequence of the moss area is equal to a predetermined target value;

[0043] A timing correction module is used to perform timing correction on each coarse segmentation result in the moss area coarse segmentation sequence using its corresponding previous coarse segmentation result to obtain a segmentation sequence of the moss area after timing correction;

[0044] An optimization module is used to optimize the segmentation sequence of the moss area after time sequence correction, improve the integrity and edge smoothness of the segmented area, and obtain a moss area segmentation result sequence;

[0045] The statistical calculation module is used to count the area of ​​the moss area segmentation result sequence and calculate the growth of moss on the surface of the corresponding earthen ruins.

[0046] To achieve the above-mentioned purpose of the invention, an embodiment also provides a computing device, including a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they are used to implement the above-mentioned earthenware site moss monitoring method based on vegetation index and time series correction.

[0047] To achieve the above-mentioned purpose of the invention, an embodiment further provides a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, the above-mentioned earthenware site moss monitoring method based on vegetation index and time series correction is implemented.

[0048] Compared with the prior art, the present invention has the following beneficial effects:

[0049] The present invention calculates the VDVI index (Visible-band Difference Vegetation Index) after adjusting the parameters of the corrected time series image, and uses the index calculation results to perform regional segmentation, time series correction and morphological correction to monitor the growth of mosses in earthen ruins. This monitoring method can achieve the segmentation and extraction of moss areas in earthen ruins and continuous monitoring of growth conditions with high accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0051] Figure 1 A flowchart of a moss monitoring method for earthen ruins based on vegetation index and time series correction provided in an embodiment;

[0052] Figure 2 A flow chart of spatial position registration provided for an embodiment;

[0053] Figure 3 A schematic diagram of a coarse segmentation mask for a moss area provided in an embodiment;

[0054] Figure 4 A schematic diagram of the adjusted segmentation result provided in the embodiment;

[0055] Figure 5 The calculated earthen ruins provided for the embodiment show a graph showing changes in moss area;

[0056] Figure 6 A schematic diagram of the structure of a moss monitoring device for earthen ruins based on vegetation index and time series correction provided in an embodiment. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and do not limit the scope of protection of the present invention.

[0058] The following are some definitions and concepts involved in this invention:

[0059] OpenCV Open Source Library: OpenCV is an open-source computer vision library that provides a range of functions and tools for processing images and videos. It consists of a set of efficient and optimized algorithms for various tasks in the field of computer vision, such as image processing, object detection, face recognition, camera calibration, machine learning, and more.

[0060] Morphological computing: Morphological computing primarily studies how to use structural elements to filter or transform images to extract features, analyze image structure, or improve image quality. Morphological computing primarily includes basic operations such as dilation, erosion, opening, and closing. These operations can be combined to perform a variety of tasks, such as region segmentation, feature extraction, and denoising.

[0061] like Figure 1 As shown, the embodiment provides a moss monitoring method for earthen ruins based on vegetation index and time series correction, comprising the following steps:

[0062] S110 , obtaining a time-series image sequence of the moss monitoring area of ​​the earthen site, and sequentially performing spatial position registration, global illumination correction, and white balance equalization operations on the time-series image sequence to obtain a corrected time-series image sequence.

[0063] In the embodiment, the time sequence image sequence of the moss monitoring area of ​​the earthen ruins is the RGB image obtained by taking timed shots of the moss growth area of ​​the same earthen ruins. i (i=1,2,...,n), where i is the image index and n is a positive integer.

[0064] In the embodiment, Figure 2 As shown, the spatial position registration of the time sequence image sequence is performed. For image O1, the registration algorithm is not executed; for image O2, the registration algorithm is executed to align O2 to O1 to obtain O2 ′ ; For subsequent images, implement O in sequence i+1 Towards O i ′ The registered images are uniformly cropped to ensure that there are no erroneous areas such as black edges in the image sequence. The registration algorithm execution steps are as follows:

[0065] (a) Use the SIFT algorithm in the OpenCV open source library to detect image feature points;

[0066] (b) Use the findHomography function in the OpenCV open source library to calculate the optimal single mapping transformation matrix between the feature point pairs between the images to be registered;

[0067] (c) Use the warpPerspective function in the OpenCV open source library to apply the transformation matrix and perform spatial position alignment.

[0068] In the embodiment, the time series image sequence O after registration is i ′ (i=1,2,...,n) performs global illumination correction to make the overall illumination of a single image uniform, and obtains the time-series image sequence I after illumination correction i (i=1,2,...,n). The calibration steps are as follows:

[0069] (a) Use the cvtColor function in the OpenCV open source library to convert the RGB image to an HSV image;

[0070] (b) Use the GaussianBlur function in the OpenCV open source library to perform multi-scale Gaussian filtering on the V component;

[0071] (c) Correct the V component using the enhanced two-dimensional Gamma function;

[0072] (d) Replace the V component of the original image with the corrected V component, reassemble it into a new HSV image, and use the cvtColor function to convert it back to an RGB image.

[0073] In the embodiment, i (i=1,2,...,n) performs local white balance equalization correction to make the color temperature of the image sequence uniform, and obtains the time-series image sequence A after white balance equalization i (i=1,2,...,n). The calibration steps are as follows:

[0074] (a) Use the cvtColor function in the OpenCV open source library to convert the RGB image into a YCrCb image;

[0075] (b) Use the blur function in the OpenCV open source library to perform mean filtering on the Cr and Cb components with a kernel edge length of 301 to obtain the Cr_blur and Cb_blur components after mean filtering;

[0076] (c) Calculate the corrected Cr and Cb components, denoted as Cr new , Cb new The calculation method is,

[0077] (d) Replace the Cr and Cb components of the original image with the corrected Cr and Cb components, recombine them into a new YCrCb image, and use the cvtColor function to convert it back to an RGB image.

[0078] S120 , calculating the visible light band difference vegetation index VDVI with the coefficient adjusted for the corrected time-series image sequence to obtain a VDVI image sequence.

[0079] In the embodiment, for the corrected time-series image sequence A i (i=1,2,...,n), the visible light band difference vegetation index (VDVI) after coefficient adjustment is used for calculation to obtain the VDVI image sequence V i (i=1,2,3...n), specifically:

[0080]

[0081] Among them, ρ Green , ρ Red , ρ Bluewhere α represents the values ​​of the green, red, and blue bands in the RGB image, respectively. α is an adjustable coefficient, typically ranging from 0.8 to 1.4. Depending on the actual scenario, a Bayesian optimization algorithm can be used to optimize the α value, with the goal of maximizing the Dice index of the segmentation result. In this embodiment, the α value obtained by adjusting the Bayesian optimization algorithm is 1.3.

[0082] S130 , performing threshold segmentation on the VDVI image sequence using a binary method to obtain a coarse segmentation sequence of the moss region, such that the VDVI mean value of the edge region of the coarse segmentation sequence of the moss region is equal to a predetermined target value.

[0083] In the embodiment, the specific process of S130 is:

[0084] S131, specify the VDVI mean target x0 of the surrounding area of ​​the rough segmentation sequence of the moss area, and specify the upper limit of the segmentation threshold t for binary search hi and the lower limit t lo , calculate the segmentation threshold t m =(t hi +t lo ) / 2;

[0085] S132, using the segmentation threshold t m VDVI image V i Perform binary threshold segmentation, greater than t m The pixel marked as 1 represents the moss area, and the pixel smaller than t m The pixels are marked as 0 to represent the moss-free area; for the segmentation result, a circle with a radius of 9 pixels is used as the kernel, and a morphological closing operation is performed to obtain the segmentation mask m0;

[0086] S133, for the segmentation mask m0, as Figure 3 As shown in the figure, the edge of the moss area is extracted. The extraction method is: for the segmentation mask m0, a circle with a radius of 5 pixels is used as the kernel, and a morphological corrosion operation is performed to obtain the mask m ′ 0; Calculate edge area mask m e =m0-m ′ 0. For edge region mask m e , calculate the VDVI mean value in the edge area

[0087] S134, using the binary method to select the segmentation threshold t m , the specific steps are: specify the precision ε=0.00001, if The segmentation result is considered to meet the target requirements, and S134 ends; if and Then we need to lower the segmentation threshold, that is, let t m =thi After that, re-execute S132 and S133; similarly, if and Then we need to increase the segmentation threshold, that is, let t m =t lo After that, S132 and S133 are re-executed. If the number of repetitions reaches 100, it is considered that the segmentation result meets the target requirements, and S134 ends. The mask m0 obtained at this time is the coarse segmentation result of the moss area corresponding to the VDVI image. The threshold t m is the corresponding segmentation threshold;

[0088] S135, performing the above steps for each image in the VDVI image sequence, and obtaining a rough segmentation sequence R of moss area consisting of n 0s and 1s. i (i=1,2,3...n), the corresponding segmentation threshold is t i (i=1,2,3...n).

[0089] S140 , performing time sequence correction on each coarse segmentation result in the moss area coarse segmentation sequence using its corresponding previous coarse segmentation result to obtain a moss area segmentation sequence after time sequence correction.

[0090] In the embodiment, the moss region is roughly segmented into a sequence R i Each coarse segmentation result R in (i=1,2,3...n) i The process of timing correction is:

[0091] S141, roughly segment the moss region into sequence R i (i=1,2,3...n), starting from the kth image, for example, starting from the k=5th image, select the coarse segmentation image R k to R n Timing correction will be performed;

[0092] S142, for the i-th image R i , select image R i-k+1 to R i Form a set of images, for R i-k+1 to R i Perform weighted summation to obtain image R i The temporal weighted image T i , when weighted, according to the distance image R i The time of the recent time is given a larger weight, and the time of the distant time is given a lower weight. For example, when k=5, T i =R i-4 +2R i-3 +3R i-2 +4R i-1 , where T iThe value of the pixel in is an integer between 0 and 10;

[0093] S143, create a i Images R of the same size i ′ As the image after time series rough correction, it is used to record the segmentation results after time series rough correction. The method of time series rough correction is as follows: i The pixel with median value of 1 corresponds to T i The pixel value in is less than or equal to the preset first threshold, for example, 3, then V i The value of the corresponding pixel in exceeds its corresponding segmentation threshold t i After a certain amount, for example, the certain amount can be set to 0.02, the image R i ′ The pixel position is recorded as moss area, otherwise it is recorded as non-moss area; i The pixel with median value 0, if it corresponds to T i The value in is greater than or equal to the preset second threshold, for example, 8, then V i The value of the corresponding pixel in is lower than its corresponding segmentation threshold t i After a certain amount, for example, the certain amount is 0.02, the image R i ′ Only then is the pixel recorded as non-moss area, otherwise it is recorded as moss area; for other pixels that do not meet the above conditions, if R i The corresponding pixel value is 1, then the image R i ′ The position of the pixel is recorded as the moss area, otherwise it is recorded as the non-moss area.

[0094] Specifically, for R i ′ Pixel P in R ′ , if R i 、T i and VDVI image V i The pixel P at the corresponding position in R 、P T With P V , and R i The corresponding segmentation threshold t i , satisfying P R =1,P T ≤3,P V ≥t i +0.02, or meet P R =1,P T >3, or satisfy P R =0,P T ≥8,P V ≥t i -0.02 PR ′ The value is 1; satisfy P R =1,P T ≤3,P V <t i +0.02, or meet P R =0,P T <8, or satisfy P R =0,P T ≥8,P V <t i -0.02 P R ′ The value of is 0.

[0095] S144, the obtained time sequence corrected image R ′ k to R ′ n , a circle with a radius of 5 pixels is used as the kernel, and a morphological closing operation is performed to increase the integrity of the segmented area. The result is the segmentation sequence S after time series correction of the moss area. i (i=k,k+1,k+2...n).

[0096] S150 , optimizing the segmentation sequence of the moss region after time sequence correction to improve the integrity and edge smoothness of the segmented region, and obtaining a moss region segmentation result sequence.

[0097] In the embodiment, the segmentation sequence S after the moss region time sequence correction i (i=k,k+1,k+2...n), the specific process of optimization is:

[0098] S151, segmentation sequence S after time sequence correction for moss area i (i=k,k+1,k+2...n), using a circle with a radius of 15 pixels as the kernel, perform the morphological dilation operation;

[0099] S152, for the result of the dilation operation, calculate the contour of each connected area with a value of 1, and perform approximate calculation on its contour. The specific method is to use the Douglas-Peucker algorithm to draw an approximate polygon curve corresponding to the contour, and control the maximum distance d between the points on the original contour and the approximate polygon curve to be less than 0.002 times the original contour perimeter. Fill the interior of the obtained approximate polygon curve with 1 and keep the exterior with 0 to obtain the shape-optimized moss area segmentation sequence S i ′ (i=k,k+1,k+2...n).

[0100] S153, segmentation sequence S for the moss area after shape optimization i ′(i=k,k+1,k+2...n), a circle with a radius of 9 pixels is used as the kernel, and a morphological corrosion operation is performed to remove small broken areas whose corrosion value is 1 but whose area is smaller than a preset threshold (e.g., 256 pixels). Figure 4 As shown, the final moss area segmentation sequence S is obtained i ″(i=k,k+1,k+2...n).

[0101] Step 6: Count the areas of the moss segmentation result sequence and calculate the growth of mosses on the surface of the corresponding earthen ruins.

[0102] In the embodiment, the sequence S is segmented according to the moss region i ″(i=k, k+1, k+2...n) is used to calculate the growth of mosses on the surface of the earthen ruins. The specific process is as follows:

[0103] According to the actual measurement of the moss monitoring area of ​​the earthen site, the actual area of ​​the earthen site surface corresponding to one pixel on the image is calculated, and the sequence S of the moss area segmentation results is counted. i ″The actual area of ​​the moss area.

[0104] The above method was used to conduct experimental tests, and the test results were Figure 5 Show. Figure 5 As can be seen in the figure, the present invention monitors the growth area of ​​moss areas at earthen ruins through the calculation of the VDVI index after coefficient adjustment, time series correction, and morphological correction, and draws a time-moss growth area relationship diagram. In short, the present method achieves the segmentation and extraction of moss areas at earthen ruins and the continuous monitoring of their growth status with high accuracy.

[0105] like Figure 6As shown, the embodiment also provides a moss monitoring device 600 for earthen ruins based on vegetation index and time series correction, including an image correction module 610, a VDVI calculation module 620, a coarse segmentation module 630, a time series correction module 640, an optimization module 650, and a statistical calculation module 660, wherein the image correction module 610 is used to obtain a time series image sequence of the earthen ruins moss monitoring area, and sequentially perform spatial position alignment, global illumination correction and white balance equalization operations on the time series image sequence to obtain a corrected time series image sequence; the VDVI calculation module 620 is used to calculate the visible light band difference vegetation index VDVI after coefficient adjustment for the corrected time series image sequence to obtain a VDVI image sequence ; The coarse segmentation module 630 is used to perform threshold segmentation on the VDVI image sequence using a binary method to obtain a coarse segmentation sequence of the moss area, so that the VDVI mean value of the edge area of ​​the coarse segmentation sequence of the moss area is equal to a predetermined target value; the timing correction module 640 is used to perform timing correction on each coarse segmentation result in the coarse segmentation sequence of the moss area using its corresponding previous coarse segmentation result to obtain a segmentation sequence after timing correction of the moss area; the optimization module 650 is used to optimize the segmentation sequence after timing correction of the moss area, improve the integrity and edge smoothness of the segmentation area, and obtain a moss area segmentation result sequence; the statistical calculation module 660 is used to count the area of ​​the moss area segmentation result sequence and calculate the growth of the corresponding moss on the surface of the earthen ruins.

[0106] It should be noted that the earthen site moss monitoring device based on vegetation index and time series correction provided in the above embodiment should be illustrated by the division of the above functional modules when performing earthen site moss monitoring with time series correction. The above functional distribution can be completed by different functional modules as needed, that is, the internal structure of the terminal or server is divided into different functional modules to complete all or part of the functions described above. In addition, the earthen site moss monitoring device based on vegetation index and time series correction provided in the above embodiment and the earthen site moss monitoring method embodiment based on vegetation index and time series correction belong to the same concept. The specific implementation process is detailed in the earthen site moss monitoring method embodiment based on vegetation index and time series correction, which will not be repeated here.

[0107] Based on the same inventive concept, an embodiment further provides a computing device including a memory and one or more processors. The memory stores executable code. When the one or more processors execute the executable code, the device is used to implement the above-mentioned earthenware site moss monitoring method based on vegetation index and time series correction. The method specifically includes the following steps:

[0108] S110, obtaining a time-series image sequence of the moss monitoring area of ​​the earthen site, and sequentially performing spatial position registration, global illumination correction, and white balance equalization operations on the time-series image sequence to obtain a corrected time-series image sequence;

[0109] S120, calculating the visible light band difference vegetation index (VDVI) after coefficient adjustment for the corrected time-series image sequence to obtain a VDVI image sequence;

[0110] S130, performing threshold segmentation on the VDVI image sequence using a binary method to obtain a coarse segmentation sequence of the moss region, such that the VDVI mean value of the edge region of the coarse segmentation sequence of the moss region is equal to a predetermined target value;

[0111] S140, for each coarse segmentation result in the moss region coarse segmentation sequence, performing time sequence correction using its corresponding previous coarse segmentation result to obtain a moss region time sequence corrected segmentation sequence;

[0112] S150, optimizing the segmentation sequence of the moss region after time sequence correction to improve the integrity and edge smoothness of the segmented region, thereby obtaining a moss region segmentation result sequence;

[0113] S160 , counting the area of ​​the moss region segmentation result sequence and calculating the growth of the moss on the surface of the corresponding earthen ruins.

[0114] The computing device provided in the embodiment, in addition to the processor and memory, also includes hardware required for other services such as internal bus, network interface, memory, etc. at the hardware level. The memory is a non-volatile memory, and the processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the earthen site moss monitoring method based on vegetation index and timing correction described in S110-S160 above. Of course, in addition to software implementation, the present invention does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0115] Based on the same inventive concept, an embodiment further provides a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, the above-mentioned method for monitoring mosses at earthen ruins based on vegetation index and time series correction is implemented, specifically comprising the following steps:

[0116] S110, obtaining a time-series image sequence of the moss monitoring area of ​​the earthen site, and sequentially performing spatial position registration, global illumination correction, and white balance equalization operations on the time-series image sequence to obtain a corrected time-series image sequence;

[0117] S120, calculating the visible light band difference vegetation index (VDVI) after coefficient adjustment for the corrected time-series image sequence to obtain a VDVI image sequence;

[0118] S130, performing threshold segmentation on the VDVI image sequence using a binary method to obtain a coarse segmentation sequence of the moss region, so that the VDVI mean value of the edge region of the coarse segmentation sequence of the moss region is equal to a predetermined target value;

[0119] S140, for each coarse segmentation result in the moss region coarse segmentation sequence, performing time sequence correction using its corresponding previous coarse segmentation result to obtain a moss region time sequence corrected segmentation sequence;

[0120] S150, optimizing the segmentation sequence of the moss region after time sequence correction to improve the integrity and edge smoothness of the segmented region, thereby obtaining a moss region segmentation result sequence;

[0121] S160, counting the area of ​​the moss region segmentation result sequence, and calculating the growth of the moss on the surface of the corresponding earthen ruins.

[0122] In the embodiment, computer-readable media includes permanent and non-permanent, removable and non-removable media and can implement information storage by any method or technology. The information can be computer-readable instructions, data structures, program modules or other data.

[0123] The specific implementation methods described above provide a detailed description of the technical solutions and beneficial effects of the present invention. It should be understood that the above is only the most preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, supplements and equivalent substitutions made within the scope of the principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A moss monitoring method for earthen ruins based on vegetation index and time series correction, characterized in that: The following steps are involved: Step 1: Obtain a time-series image sequence of the moss monitoring area of ​​the earthen site, and perform spatial position alignment, global illumination correction, and white balance equalization operations on the time-series image sequence in sequence to obtain a corrected time-series image sequence; Step 2: For the corrected time series image sequence, the visible light band difference vegetation index (VDVI) with the coefficient adjusted is used to calculate and obtain the VDVI image sequence, which specifically includes: Among them, ρ Green , ρ Red , ρ Blue Respectively represent the values ​​of the green, red, and blue bands in the RGB image, and α is an adjustable coefficient. According to the actual scene, the α value is adjusted by reinforcement learning or optimization search. The VDVI image sequence obtained by VDVI calculation is recorded as V i , i=1,2,3...n, i represents the image index, n is a positive integer; Step 3: perform threshold segmentation on the VDVI image sequence using a binary method to obtain a coarse segmentation sequence of the moss region, so that the VDVI mean value of the edge area of ​​the coarse segmentation sequence of the moss region is equal to a predetermined target value, specifically including: Step 3.1, specify the target value x0 of the VDVI mean value of the surrounding area of ​​the coarse segmentation sequence of the moss area; Step 3.2, select a segmentation threshold t m , and use the segmentation threshold t m Perform binary threshold segmentation on the VDVI image, perform morphological closing operation on the segmentation result, and obtain the segmentation mask m0; Step 3.3: First, extract the edge of the moss area from the segmentation mask m0. The extraction method is: perform morphological corrosion operation on the segmentation mask m0 to obtain the mask m ′ 0, calculate the edge area mask m e =m0-m ′ 0; then for the edge area mask m e , calculate the VDVI mean in the edge area Step 3.4, re-adjust the segmentation threshold t m , and re-execute steps 3.2 and 3.3 so that the VDVI mean value in the edge area is The mask m0 obtained at this time is the coarse segmentation result of the moss area corresponding to the VDVI image, and the threshold t m is the corresponding segmentation threshold; Step 3.5: Perform the above steps 3.2-3.4 for each image in the VDVI image sequence to obtain n coarse segmentation sequences R of moss areas composed of 0s and 1s. i , and its corresponding segmentation threshold is t i , i=1,2,3...n; Step 4, for each coarse segmentation result in the moss area coarse segmentation sequence, using its corresponding previous coarse segmentation result to perform time sequence correction to obtain a moss area time sequence corrected segmentation sequence, specifically including: Step 4.1: For the rough segmentation sequence R of the moss area i , i=1,2,3...n, starting from the kth image, select the coarse segmentation image R k to R n Timing correction will be performed; Step 4.2: For the i-th coarse segmentation image R i The specific time series correction method is as follows: select the coarse segmentation image R i-k+1 to R i Form a set of images, in image R i-k+1 to R i-1 In the example, according to the distance image R i The time of image R is relatively close, and the time of image R is relatively far. i-k+1 to R i-1 Perform weighting to obtain its time series weighted image T i ; Step 4.3, create a i The time series coarsely corrected image R of the same size i ′ , used to record the segmentation results after the timing coarse correction. The timing coarse correction method is as follows: i The median value is 1 and the temporal weighted image T i For pixels with a median value less than or equal to the preset first threshold, the image V i The value of the corresponding pixel in exceeds its corresponding segmentation threshold t i After a certain amount, the image R i ′ Only then is the pixel recorded as moss area, otherwise it is recorded as non-moss area; i The median value is 0 and the temporal weighted image T i For pixels with a median value greater than or equal to the preset second threshold, the image V i The value of the corresponding pixel in is lower than its corresponding segmentation threshold t i After a certain amount, the image R i ′ Only then is the pixel recorded as non-moss area; for other pixels, if R i The corresponding pixel value is 1, then the image R i ′ The pixel location is recorded as moss area, otherwise it is recorded as non-moss area; Step 4.4, the image R after time series rough correction ′ k to R ′ n Perform morphological closing operation to increase the integrity of the segmented area, and the result is the segmentation sequence S after time sequence correction of the moss area. i , i=k,k+1,k+2...n; Step 5, optimizing the segmentation sequence of the moss area after time sequence correction to improve the integrity and edge smoothness of the segmented region, and obtaining a moss area segmentation result sequence; Step 6: Count the areas of the moss segmentation result sequence and calculate the growth of mosses on the surface of the corresponding earthen ruins.

2. The method for monitoring mosses in earthen ruins based on vegetation index and time series correction according to claim 1, characterized in that: In step 1, a local white balance equalization algorithm is used for white balance equalization, and the input is a time-series image sequence that has been corrected for global illumination.

3. The method for monitoring mosses in earthen ruins based on vegetation index and time series correction according to claim 1, characterized in that: Step 5 includes: Step 5.1: Segmentation sequence S after time sequence correction for moss area i Perform morphological dilation operation; Step 5.2: Based on the result of the expansion operation, calculate the contour of each connected area with a value of 1, perform approximate calculation on the contour and draw the corresponding approximate polygon curve. Fill the inner part of the obtained approximate polygon curve with 1 and keep the outer part with 0 to obtain the shape-optimized moss area segmentation sequence S i ′ , i=k,k+1,k+2...n; Step 5.3: For the moss area segmentation sequence after shape optimization, remove the broken areas with a value of 1 but an area smaller than the preset threshold, and perform morphological corrosion operation to obtain the final moss area segmentation result sequence S i ″, i=k, k+1, k+2...n.

4. The method for monitoring mosses in earthen ruins based on vegetation index and time series correction according to claim 1, characterized in that: Step 6 includes: According to the actual measurement of the moss monitoring area of ​​the earthen site, the actual area of ​​the earthen site surface corresponding to one pixel on the image is calculated, and the sequence S of the moss area segmentation results is counted. i ″The actual area of ​​the moss area.

5. A moss monitoring device for earthen ruins based on vegetation index and time series correction, characterized in that: include: An image correction module is used to obtain a time-series image sequence of the moss monitoring area of ​​the earthen site, and sequentially perform spatial position alignment, global illumination correction, and white balance equalization operations on the time-series image sequence to obtain a corrected time-series image sequence; The VDVI calculation module is used to calculate the visible light band difference vegetation index (VDVI) after coefficient adjustment for the corrected time series image sequence to obtain a VDVI image sequence, specifically including: Among them, ρ Green , ρ Red , ρ Blue Respectively represent the values ​​of the green, red, and blue bands in the RGB image, and α is an adjustable coefficient. According to the actual scene, the α value is adjusted by reinforcement learning or optimization search. The VDVI image sequence obtained by VDVI calculation is recorded as V i , i=1,2,3...n, i represents the image index, n is a positive integer; The coarse segmentation module is used to perform threshold segmentation on the VDVI image sequence using a binary method to obtain a coarse segmentation sequence of the moss area, so that the VDVI mean value of the edge area of ​​the coarse segmentation sequence of the moss area is equal to a predetermined target value. Specifically, the module includes: Step 3.1, specify the target value x0 of the VDVI mean value of the surrounding area of ​​the coarse segmentation sequence of the moss area; Step 3.2, select a segmentation threshold t m , and use the segmentation threshold t m Perform binary threshold segmentation on the VDVI image, perform morphological closing operation on the segmentation result, and obtain the segmentation mask m0; Step 3.3: First, extract the edge of the moss area from the segmentation mask m0. The extraction method is: perform morphological corrosion operation on the segmentation mask m0 to obtain the mask m ′ 0, calculate the edge area mask m e =m0-m ′ 0; then for the edge area mask m e , calculate the VDVI mean in the edge area Step 3.4, re-adjust the segmentation threshold t m , and re-execute steps 3.2 and 3.3 so that the VDVI mean value in the edge area is The mask m0 obtained at this time is the coarse segmentation result of the moss area corresponding to the VDVI image, and the threshold t m is the corresponding segmentation threshold; Step 3.5: Perform the above steps 3.2-3.4 for each image in the VDVI image sequence to obtain n coarse segmentation sequences R of moss areas composed of 0s and 1s. i , and its corresponding segmentation threshold is t i , i=1,2,3...n; The timing correction module is used to perform timing correction on each coarse segmentation result in the moss area coarse segmentation sequence using its corresponding previous coarse segmentation result to obtain a segmentation sequence of the moss area after timing correction, specifically including: Step 4.1: For the rough segmentation sequence R of the moss area i , i=1,2,3...n, starting from the kth image, select the coarse segmentation image R k to R n Timing correction will be performed; Step 4.2: For the i-th coarse segmentation image R i The specific time series correction method is as follows: select the coarse segmentation image R i-k+1 to R i Form a set of images, in image R i-k+1 to R i-1 In the example, according to the distance image R i The time of image R is relatively close, and the time of image R is relatively far. i-k+1 to R i-1 Perform weighting to obtain its time series weighted image T i ; Step 4.3, create a i The time series coarsely corrected image R of the same size i ′ , used to record the segmentation results after the timing coarse correction. The timing coarse correction method is as follows: i The median value is 1 and the temporal weighted image T i For pixels with a median value less than or equal to the preset first threshold, the image V i The value of the corresponding pixel in exceeds its corresponding segmentation threshold t i After a certain amount, the image R i ′ Only then is the pixel recorded as moss area, otherwise it is recorded as non-moss area; i The median value is 0 and the temporal weighted image T i For pixels with a median value greater than or equal to the preset second threshold, the image V i The value of the corresponding pixel in is lower than its corresponding segmentation threshold t i After a certain amount, the image R i ′ Only then is the pixel recorded as non-moss area; for other pixels, if R i The corresponding pixel value is 1, then the image R i ′ The pixel location is recorded as moss area, otherwise it is recorded as non-moss area; Step 4.4, the image R after time series rough correction ′ k to R ′ n Perform morphological closing operation to increase the integrity of the segmented area, and the result is the segmentation sequence S after time sequence correction of the moss area. i , i=k,k+1,k+2...n; An optimization module is used to optimize the segmentation sequence of the moss area after time sequence correction, improve the integrity and edge smoothness of the segmented area, and obtain a moss area segmentation result sequence; The statistical calculation module is used to count the area of ​​the moss area segmentation result sequence and calculate the growth of moss on the surface of the corresponding earthen ruins.

6. A computing device comprising a memory and one or more processors, wherein the memory stores executable code, characterized in that: When the one or more processors execute the executable code, they are used to implement the earthen ruins moss monitoring method based on vegetation index and time series correction according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that A program is stored thereon, and when the program is executed by a processor, the earthen ruins moss monitoring method based on vegetation index and time series correction according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Earthen archaeological site fracture grouting method based on real-time monitoring

    CN114809698A

  • Soil information extraction method and device for unmanned aerial vehicle visible light image

    CN110738134A

  • Method, system and product for extracting blue-green algae area in optical remote sensing image

    CN115731475A