Earthen archaeological site moss monitoring method and device based on vegetation index and time sequence correction
By adopting a method based on vegetation index and timing correction in soil moss monitoring, the problems of small sample size, blurred edges and unconsidered timing information in the prior art are solved, and high-precision moss segmentation and growth monitoring are achieved, improving the accuracy and credibility of monitoring.
Patent Information
- Application Number
- CN202411870937.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-18
AI Technical Summary
The prior art has problems such as small sample size, blurred edges and unconsidered timing information in soil moss monitoring, resulting in low segmentation accuracy and reduced confidence.
Using a method based on vegetation index and timing correction, the spatial position registration, global illumination correction and white balance equalization are obtained by acquiring the timing image sequences, the visible band difference vegetation index (VDVI) is calculated, and the binary method threshold segmentation, timing correction and morphological optimization are performed to achieve high-precision segmentation and growth monitoring of the moss areas of the soil site.
It realizes high-precision segmentation and continuous monitoring of the moss areas of soil sites, improving the accuracy and credibility of monitoring.
Smart Images

Figure CN119810136A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of cultural relics monitoring, and in particular relates to a method and device for monitoring mosses at earthen ruins based on vegetation index and time series correction. Background Art
[0002] As a direct material carrier of history, earthen sites often contain extremely rich historical information. Under the influence of factors such as temperature, humidity, and light, the surface of earthen sites is prone to diseases such as mold, moss, and algae. It is difficult to notice the relevant diseases in a timely and accurate manner using manual monitoring and other methods. The study of corresponding earthen site moss monitoring algorithms can be used for alarm prediction of earthen site moss diseases themselves, quantitative evaluation of disease control, and tracing of the causes of diseases. It can also provide an important basis for formulating environmental control strategies in the preventive protection of earthen sites, which is of great significance.
[0003] In order to realize the continuous monitoring of the moss area of earthen ruins, the time-series image data of the moss in the earthen ruins are collected by monitoring the time-lapse shooting and uploading at this stage. It is of great significance to develop a moss monitoring algorithm based on such data.
[0004] The essence of the moss monitoring algorithm for earthen ruins is the image segmentation problem. As a classic problem in computer vision, it has a wealth of research results. The mainstream image segmentation algorithm targets natural images or medical images, and the algorithm is mainly based on convolutional neural networks. Therefore, there are the following problems when applying mainstream algorithms to earthen ruins:
[0005] First, the sample size of moss images of earthen sites is extremely small. The lack of samples will make it difficult to conduct effective training, which will lead to low segmentation accuracy.
[0006] Second, the edges of moss areas in earthen sites are extremely fuzzy, making it difficult to mark them with high precision. Therefore, when mainstream deep learning algorithms are used in this scenario, there is a problem of unclear learning objectives, which leads to a decrease in the credibility of 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 applied to the moss monitoring scene of earthen ruins, there is an urgent need for a special earthen ruins moss monitoring method to realize the monitoring of the moss growth status.
[0009] The patent application with the publication number CN114809698A discloses a fissure grouting method for earthen sites based on real-time monitoring, including: obtaining the site parameters of the earthen site body of the fissure, and grading the earthen site according to the site parameters; removing the loose soil on both sides of the fissure; grooving the fissure surface: determining the control index of the grooving on the fissure surface according to the grading of the earthen site, and cleaning the loose soil in the grooving according to the control index; spraying the fissure surface; arranging monitoring sensors in layers; supporting the free surface in layers: supporting the free surface of the fissure in layers from bottom to top according to the layer height of the monitoring sensor and providing counter pressure; monitoring the layered grouting: starting the grouting from the bottom layer, vibrating with a micro vibrator, and monitoring the data of the soil on both sides of the fissure using the monitoring sensor, and when the monitoring data meets the preset threshold, grouting the next layer. However, this technical solution cannot realize the monitoring of mosses in earthen sites. Summary of the invention
[0010] In view of the above, an 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 purpose 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, 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;
[0013] Step 2: For the corrected time series image sequence, the visible light band difference vegetation index VDVI with adjusted coefficients is used for calculation to 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 rough segmentation result in the moss area rough segmentation sequence, use its corresponding previous rough segmentation result to perform time sequence correction to obtain a segmentation sequence of the moss area after time sequence correction;
[0016] Step 5, optimizing the segmentation sequence of the moss area after time sequence correction, improving the integrity and edge smoothness of the segmented area, and obtaining a moss area segmentation result sequence;
[0017] Step 6, counting the area of the moss area segmentation result sequence, and calculating the growth of the corresponding moss on the surface of the 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 after global illumination correction.
[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 calculated by VDVI 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 comprises:
[0023] Step 3.1, specify the target value x0 of the VDVI mean value of the surrounding area of the rough 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 area 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 value in the edge area
[0026]
[0027] 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 rough segmentation result of the moss area corresponding to the VDVI image, and the threshold t m is the corresponding segmentation threshold;
[0028] Step 3.5: Perform the above steps 3.2-3.4 for each image in the VDVI image sequence to obtain a rough segmentation sequence R of the moss area consisting of n 0s and 1s. i , and its corresponding segmentation threshold is t i , i=1,2,3...n.
[0029] Preferably, step 4 comprises:
[0030] 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;
[0031] 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 given a larger weight for the time that is closer, and a lower weight for the time that is farther away. i-k+1 To R i-1 Weighted, get its time series weighted image T i ;
[0032] Step 4.3, create a i The time series rough correction 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 whose median value is less than or equal to the preset first threshold, 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 the pixel is recorded as a moss area, otherwise it is a non-moss area; i The median value is 0 and the temporal weighted image T i For pixels whose median value is greater than or equal to the preset second threshold, 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 the pixel is recorded as a non-moss area; for other pixels, if R i The corresponding pixel value in the image is 1, then the image R i′ The position of the pixel is recorded as a moss area, otherwise it is a non-moss area; wherein the value range of the certain amount can be 0.01 to 0.03.
[0033] Step 4.4, the image R after rough time correction ′ k To R ′ n Perform morphological closing operation to increase the integrity of the segmented area, and the result is the segmented sequence S after time sequence correction of the moss area. i , i=k,k+1,k+2...n.
[0034] Preferably, step 5 comprises:
[0035] Step 5.1: Segmentation sequence S after time sequence correction for moss area i Perform morphological dilation operation;
[0036] Step 5.2, for the result after 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 inside of the obtained approximate polygon curve with 1 and keep the outside with 0, and obtain the shape-optimized moss area segmentation sequence S i ′ , i=k,k+1,k+2...n;
[0037] 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 operations. The final moss area segmentation sequence S is obtained. i ″, i=k,k+1,k+2...n.
[0038] Preferably, step 6 comprises:
[0039] 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 moss area segmentation result sequence S is counted. i ″The actual area of the moss area.
[0040] To achieve the above-mentioned purpose of the invention, the embodiment of the present invention further provides a moss monitoring device for earthen ruins based on vegetation index and time series correction, comprising:
[0041] 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 registration, global illumination correction and white balance equalization operations on the time-series image sequence to obtain a corrected time-series image sequence;
[0042] 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;
[0043] 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;
[0044] A timing correction module, which is used to perform timing correction on each rough segmentation result in the moss area rough segmentation sequence using its corresponding previous rough segmentation result to obtain a segmentation sequence of the moss area after timing correction;
[0045] 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;
[0046] 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.
[0047] 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 earthen site moss monitoring method based on vegetation index and timing correction.
[0048] To achieve the above-mentioned purpose of the invention, an embodiment further provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the above-mentioned earthen site moss monitoring method based on vegetation index and time series correction is implemented.
[0049] Compared with the prior art, the present invention has the following beneficial effects:
[0050] The present invention calculates the VDVI index (Visible-band Difference Vegetation Index) after the parameters of the corrected time series image are adjusted, and uses the index calculation result to perform regional segmentation, time series correction and morphological correction to realize the monitoring of the moss growth in the earthen ruins. The monitoring method can realize the segmentation and extraction of the moss area in the earthen ruins and the continuous monitoring of the growth condition with high accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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.
[0052] Figure 1 A flow chart of a moss monitoring method for earthen ruins based on vegetation index and time series correction provided in an embodiment;
[0053] Figure 2 A flow chart of spatial position registration provided for an embodiment;
[0054] Figure 3 A schematic diagram of a rough segmentation mask of a moss area provided in an embodiment;
[0055] Figure 4 A schematic diagram of the adjusted segmentation result provided in the embodiment;
[0056] Figure 5 The calculated earthen ruins provided for the embodiment show the change of moss area;
[0057] 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
[0058] To make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific implementation methods described herein are only used to explain the present invention and do not limit the scope of protection of the present invention.
[0059] The following is an explanation of the definitions or concepts involved in the present invention:
[0060] OpenCV open source library: OpenCV is an open source computer vision library that aims to provide 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, etc.
[0061] Morphological computing: Morphological computing mainly studies how to use structural elements to filter or transform images in order to extract image features, analyze image structure or improve image quality. Morphological computing mainly includes basic operations such as dilation, erosion, opening and closing operations. Combining the above operations can perform various tasks such as region segmentation, feature extraction, and denoising.
[0062] 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:
[0063] 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.
[0064] In the embodiment, the time-series image sequence of the moss monitoring area of the earthen site is an RGB image obtained by taking timed shots of the moss growth area of the same earthen site. i (i=1,2,...,n), where i is the image index and n is a positive integer.
[0065] In the embodiment, Figure 2 As shown, the spatial position registration is performed on the time-series image sequence. 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 To 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:
[0066] (a) Use the SIFT algorithm in the OpenCV open source library to detect image feature points;
[0067] (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;
[0068] (c) Use the warpPerspective function in the OpenCV open source library to apply the transformation matrix and perform spatial position alignment.
[0069] In the embodiment, the time-series image sequence 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:
[0070] (a) Use the cvtColor function in the OpenCV open source library to convert the RGB image to an HSV image;
[0071] (b) Use the GaussianBlur function in the OpenCV open source library to perform multi-scale Gaussian filtering on the V component;
[0072] (c) Correct the V component using the enhanced two-dimensional Gamma function;
[0073] (d) Replace the V component of the original image with the corrected V component, reassemble it into a new HSV image, and convert it back to an RGB image using the cvtColor function.
[0074] In the embodiment, i (i=1,2,...,n) perform local white balance equalization correction to make the color temperature of the image sequence uniform, and obtain the time-series image sequence A after white balance equalization i (i=1,2,...,n). The calibration steps are as follows:
[0075] (a) Use the cvtColor function in the OpenCV open source library to convert the RGB image into a YCrCb image;
[0076] (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;
[0077] (c) Calculate the corrected Cr and Cb components, denoted as Cr new , Cb new The calculation method is,
[0078] (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 convert it back to an RGB image using the cvtColor function.
[0079] S120, for the corrected time-series image sequence, using the visible light band difference vegetation index VDVI with the coefficient adjusted to calculate and obtain a VDVI image sequence.
[0080] In the embodiment, for the corrected time-series image sequence A i (i=1,2,...,n), and the coefficient-adjusted visible light band difference vegetation index (VDVI) is used for calculation to obtain the VDVI image sequence V i (i=1,2,3...n), specifically:
[0081]
[0082] Among them, ρ Green , Red , BlueRespectively represent the values of the green, red, and blue bands in the RGB image, and α is an adjustable coefficient, and the value is usually between 0.8 and 1.4. According to the actual scene, the Bayesian optimization algorithm can be used to optimize and adjust the α value with the goal of maximizing the Dice index of the segmentation result. In this embodiment, the α value adjusted by the Bayesian optimization algorithm is 1.3.
[0083] S130, performing threshold segmentation on the VDVI image sequence using a binary method to obtain a rough segmentation sequence of the moss region, so that the VDVI mean value of the edge region of the rough segmentation sequence of the moss region is equal to a predetermined target value.
[0084] In the embodiment, the specific process of S130 is:
[0085] 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;
[0086] 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 marked as 0 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;
[0087] S133, for the segmentation mask m0, as Figure 3 As shown in the figure, the edge area 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
[0088] S134, using binary selection to select 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 requirement, and S134 ends. At this time, the mask m0 obtained is the rough segmentation result of the moss area corresponding to the VDVI image, and the threshold t m is the corresponding segmentation threshold;
[0089] S135, performing the above steps for each image in the VDVI image sequence, and obtaining a rough segmentation sequence R of the moss area composed of n 0s and 1s. i (i=1,2,3...n), the corresponding segmentation threshold is t i (i=1,2,3...n).
[0090] S140 , for each rough segmentation result in the moss area rough segmentation sequence, a time sequence correction is performed using its corresponding previous rough segmentation result to obtain a segmentation sequence of the moss area after time sequence correction.
[0091] In the embodiment, the moss region rough segmentation sequence R i Each rough segmentation result R in (i=1,2,3...n) i The process of timing correction is:
[0092] S141, roughly segment the moss area 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;
[0093] 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 k, the closer the time, the larger the weight, and the farther the time, the lower the weight. For example, when k = 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;
[0094] S143, create a i Images R of the same size i ′ As the image after the time series rough correction, it is used to record the segmentation result after the time series rough correction. The method of time series rough correction is as follows: i The pixel with median value 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 taken as 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 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 the pixel is 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 in the image 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.
[0095] Specifically, for R i ′ The 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 satisfies P R =0,P T ≥8,P V ≥t i -0.02 PR ′ The value is 1; satisfying P R =1,P T ≤3,P V <t i +0.02, or meet P R =0,P T <8, or meets P R =0,P T ≥8,P V <t i -0.02 P R ′ The value of is 0.
[0096] S144, the obtained time-series 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 of the moss area after time series correction. i (i=k,k+1,k+2...n).
[0097] S150, optimizing the segmentation sequence of the moss region after time sequence correction, improving the integrity and edge smoothness of the segmented region, and obtaining a moss region segmentation result sequence.
[0098] In the embodiment, the segmentation sequence S after the moss region timing correction is i (i=k,k+1,k+2...n), the specific process of optimization is:
[0099] 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;
[0100] S152, for the result after the expansion 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 perimeter of the original contour. Fill the inside of the obtained approximate polygon curve with 1 and keep the outside with 0, and obtain the shape-optimized moss area segmentation sequence S i ′ (i=k,k+1,k+2...n).
[0101] 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, a morphological corrosion operation is performed, and small broken areas whose corrosion value is 1 but whose area is smaller than a preset threshold (e.g., 256 pixels) are removed, such as Figure 4 As shown, the final moss area segmentation sequence S is obtained i ″(i=k,k+1,k+2...n).
[0102] Step 6, counting the area of the moss area segmentation result sequence, and calculating the growth of the corresponding moss on the surface of the earthen ruins.
[0103] 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:
[0104] 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 moss area segmentation result sequence S is counted. i ″The actual area of the moss area.
[0105] The above method was used to conduct experimental tests, and the test results were Figure 5 Show. Figure 5 It can be seen that the present invention realizes the monitoring of the growth area of the moss area of the earthen ruins through the VDVI index calculation after coefficient adjustment, time series correction, morphology correction and other processes, and draws a time-moss growth area relationship diagram. In short, the segmentation and extraction of the moss area of the earthen ruins and the continuous monitoring of the growth status are realized by the method of the present invention, with high accuracy.
[0106] 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 of the moss area after timing correction; the optimization module 650 is used to optimize the segmentation sequence of the moss area after timing correction to improve the integrity and edge smoothness of the segmented area to 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 site.
[0107] It should be noted that the earthen site moss monitoring device based on vegetation index and timing correction provided in the above embodiment should be illustrated by the division of the above-mentioned functional modules when performing earthen site moss monitoring with timing correction. The above-mentioned function allocation 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 timing correction provided in the above embodiment belongs to the same concept as the earthen site moss monitoring method embodiment based on vegetation index and timing correction. The specific implementation process is detailed in the earthen site moss monitoring method embodiment based on vegetation index and timing correction, which will not be repeated here.
[0108] Based on the same inventive concept, an embodiment further provides a computing device, including a memory and one or more processors, wherein executable code is stored in the memory, and when the one or more processors execute the executable code, the method for monitoring mosses in earthen ruins based on vegetation index and time series correction is implemented, specifically including the following steps:
[0109] 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;
[0110] S120, for the corrected time-series image sequence, using the visible light band difference vegetation index VDVI after coefficient adjustment to calculate and obtain a VDVI image sequence;
[0111] S130, performing threshold segmentation on the VDVI image sequence using a binary method to obtain a rough segmentation sequence of the moss region, so that the VDVI mean value of the edge area of the rough segmentation sequence of the moss region is equal to a predetermined target value;
[0112] S140, for each rough segmentation result in the moss region rough segmentation sequence, use its corresponding previous rough segmentation result to perform time sequence correction to obtain a segmentation sequence of the moss region after time sequence correction;
[0113] S150, optimizing the segmentation sequence of the moss region after time sequence correction, improving the integrity and edge smoothness of the segmented region, and obtaining a moss region segmentation result sequence;
[0114] S160, counting the area of the moss area segmentation result sequence, and calculating the growth of the corresponding moss on the surface of the earthen ruins.
[0115] 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 the 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.
[0116] Based on the same inventive concept, an embodiment further provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the above-mentioned earthen site moss monitoring method based on vegetation index and time series correction is implemented, which specifically includes the following steps:
[0117] 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;
[0118] S120, for the corrected time-series image sequence, using the visible light band difference vegetation index VDVI after coefficient adjustment to calculate and obtain a VDVI image sequence;
[0119] S130, performing threshold segmentation on the VDVI image sequence using a binary method to obtain a rough segmentation sequence of the moss region, so that the VDVI mean value of the edge area of the rough segmentation sequence of the moss region is equal to a predetermined target value;
[0120] S140, for each rough segmentation result in the moss region rough segmentation sequence, use its corresponding previous rough segmentation result to perform time sequence correction to obtain a segmentation sequence of the moss region after time sequence correction;
[0121] S150, optimizing the segmentation sequence of the moss region after time sequence correction, improving the integrity and edge smoothness of the segmented region, and obtaining a moss region segmentation result sequence;
[0122] S160, counting the area of the moss area segmentation result sequence, and calculating the growth of the corresponding moss on the surface of the earthen ruins.
[0123] In the embodiment, computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be computer-readable instructions, data structures, program modules or other data.
[0124] 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 protection scope 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, 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; Step 2: For the corrected time series image sequence, the visible light band difference vegetation index VDVI with adjusted coefficients is used for calculation to obtain a VDVI image sequence; 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; Step 4, for each rough segmentation result in the moss area rough segmentation sequence, use its corresponding previous rough segmentation result to perform time sequence correction to obtain a segmentation sequence of the moss area after time sequence correction; Step 5, optimizing the segmentation sequence of the moss area after time sequence correction, improving the integrity and edge smoothness of the segmented area, and obtaining a moss area segmentation result sequence; Step 6, counting the area of the moss area segmentation result sequence, and calculating the growth of the corresponding moss on the surface of the 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 after global illumination correction.
3. 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 2, the visible light band difference vegetation index VDVI after coefficient adjustment is used for calculation to obtain a VDVI image sequence, 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 conditions, the α value is adjusted by reinforcement learning and optimization search. The VDVI image sequence calculated by VDVI is recorded as V i , i=1,2,3...n, i represents the image index, and n is a positive integer.
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 3 includes: Step 3.1, specify the target value x0 of the VDVI mean value of the surrounding area of the rough 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 area 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 value 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 rough 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 a rough segmentation sequence R of the moss area consisting of n 0s and 1s. i , and its corresponding segmentation threshold is t i , i=1,2,3...n.
5. The method for monitoring mosses in earthen ruins based on vegetation index and time series correction according to claim 1, characterized in that: Step 4 includes: 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 given a larger weight for the time that is closer, and a lower weight for the time that is farther away. i-k+1 To R i-1 Weighted, get its time series weighted image T i ; Step 4.3, create a i The time series rough correction 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 whose median value is less than or equal to the preset first threshold, 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 the pixel is recorded as a moss area, otherwise it is a non-moss area; i The median value is 0 and the temporal weighted image T i For pixels whose median value is greater than or equal to the preset second threshold, 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 the pixel is recorded as a non-moss area; for other pixels, if R i The corresponding pixel value in the image 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; Step 4.4, the image R after rough time correction ′ k To R ′ n Perform morphological closing operation to increase the integrity of the segmented area, and the result is the segmented sequence S after time sequence correction of the moss area. i , i=k,k+1,k+2...n.
6. The method for monitoring moss at 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, for the result after 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 inside of the obtained approximate polygon curve with 1 and keep the outside with 0, and 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 operations. The final moss area segmentation sequence S is obtained. i ″, i=k,k+1,k+2...n.
7. 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 moss area segmentation result sequence S is counted. i ″The actual area of the moss area.
8. 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 registration, global illumination correction and white balance equalization operations on the time-series image sequence to obtain a corrected time-series image sequence; 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; 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; A timing correction module, which is used to perform timing correction on each rough segmentation result in the moss area rough segmentation sequence using its corresponding previous rough segmentation result to obtain a segmentation sequence of the moss area after timing correction; 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.
9. 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 as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: A program is stored thereon, and when the program is executed by a processor, the earthen site moss monitoring method based on vegetation index and time series correction as described in any one of claims 1 to 7 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
Sparse vegetation regionalization extraction method based on two-dimensional image
CN114627064A
Method, system and product for extracting blue-green algae area in optical remote sensing image
CN115731475A
Noise detection method for time-series vegetation index derived from remote sensing images
US20210027429A1