Unmanned aerial vehicle slope oblique photography data processing method based on efficient image compression
The data processing method for UAV slope oblique photography, which combines multi-lens oblique photography equipment with wavelet transform and deep learning sparse coding model, solves the storage and transmission problems of image data processing in large slope areas, achieves efficient compression and precise reconstruction, improves data processing efficiency and image quality, and supports slope stability analysis.
Patent Information
- Application Number
- CN202510772939.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-09-19
AI Technical Summary
The existing UAV slope oblique photography data processing technology has problems such as large image data volume, high storage resource usage, slow transmission, image quality degradation, and serious information loss. It is difficult to meet the needs of efficient processing, especially when monitoring large slope areas.
A multi-lens oblique photography device is used to acquire image data, and frequency domain conversion and compression are performed using an improved wavelet transform algorithm and a deep learning sparse coding model. The low-frequency and high-frequency sub-band coefficients are processed using an adaptive threshold quantization method, and a specific storage format is designed to optimize data retrieval and reading.
It achieves efficient compression and precise reconstruction of slope oblique photographic images, significantly saves storage and transmission costs, improves data transmission efficiency, ensures image quality, provides an accurate basis for slope stability analysis, and optimizes data processing efficiency.
Smart Images

Figure CN120676153A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicle (UAV) image processing, and in particular to a method for processing UAV slope oblique photography data based on efficient image compression. Background Art
[0002] With the continuous advancement of infrastructure construction and the growing demand for geological disaster monitoring, slope stability monitoring has become crucial. Drone-based slope oblique photography, as an efficient and convenient means of acquiring data, can capture slopes from multiple angles, yielding rich image information. However, the sheer volume of this image data presents significant challenges in storage, transmission, and processing. For example, when monitoring large slope areas, a single image capture can generate hundreds of GB or even more of image data. Without effective processing, such large amounts of data would not only consume significant storage resources but also slow data transmission, severely impacting subsequent analysis and decision-making efficiency.
[0003] Traditionally, drone-based slope oblique photography data processing typically uses a simple image segmentation approach. This approach often segments images according to fixed dimensions, disregarding image complexity. Furthermore, compression processing often involves conventional treatment of low- and high-frequency subband coefficients, resulting in the loss of significant useful information and a significant degradation in image quality. This inability to accurately reflect the true slope condition, impacting subsequent slope stability analysis and deformation monitoring.
[0004] Existing technologies have made some improvements in processing data from drone-generated slope oblique photography. Some technologies have begun to consider image features for block segmentation, and in terms of compression algorithms, some advanced encoding methods have been introduced, such as compression algorithms based on discrete cosine transform (DCT). However, these existing technologies still have shortcomings. Although image features are taken into account in the block segmentation process, most of them only consider a single feature and do not integrate multiple factors for dynamic block segmentation. For example, block segmentation based solely on grayscale changes ignores important information about texture direction. In terms of compression algorithms, although DCT-based compression algorithms have improved the compression ratio to a certain extent, their adaptability is limited for images with special textures and structures such as slopes, and key details are easily lost during the compression process. Moreover, existing technologies lack specificity in storage formats, making it impossible to quickly and accurately retrieve and read specific image block data, affecting data processing efficiency.
[0005] In general, both traditional and existing technologies are difficult to meet the actual needs of UAV slope tilt photography data processing. Summary of the Invention
[0006] Based on the above content, this application discloses a method for processing UAV slope oblique photography data based on efficient image compression, comprising:
[0007] S1. Using a drone equipped with a multi-lens oblique photography device to photograph the slope from multiple angles, obtaining original oblique photography image data including different sides of the slope; dividing the obtained original oblique photography image data into blocks and generating a unique identifier for each image block;
[0008] S2. For each image block, perform frequency domain conversion using an improved wavelet transform algorithm to convert the image block from the spatial domain to the frequency domain and obtain low-frequency sub-band and high-frequency sub-band coefficients;
[0009] S3. For low-frequency sub-band coefficients, a sparse coding model based on deep learning is used for compression processing; for high-frequency sub-band coefficients, an adaptive threshold quantization method is used for compression based on energy distribution characteristics;
[0010] S4, combining the compressed low-frequency sub-band coefficients, high-frequency sub-band coefficients, and corresponding image block identifiers to form compressed image block data, and storing the data in a specific storage format;
[0011] S5. When the slope data needs to be analyzed or processed, the compressed image block data is read from the storage medium, and the corresponding low-frequency sub-band coefficients and high-frequency sub-band coefficients are extracted according to the image block identifier;
[0012] S6. Decompress the read low-frequency subband coefficients using the inverse process of the deep learning model to restore the low-frequency information; and restore the high-frequency information of the high-frequency subband coefficients through inverse quantization operation;
[0013] S7. Use inverse wavelet transform to convert the restoration coefficients of the low-frequency subband and the high-frequency subband back to the spatial domain to reconstruct the image blocks. According to the original position information of the image blocks, all the reconstructed image blocks are spliced into a complete slope oblique photography image.
[0014] Preferably, the block processing of the acquired original oblique photography image data in S1 is specifically as follows:
[0015] Get the original oblique photography image and calculate the global complexity index C gl , the calculation formula is Where M and N are the height and width of the image respectively. and They are the gradients of the image at position (i, j) along the x-axis and y-axis directions, respectively. According to the global complexity index C gl Determine the initial block size S in , the formula is: where k ris the preset empirical constant, To round down, the image is preliminarily divided into blocks according to the initial block size to obtain multiple initial image blocks. The blocks are divided through local comparison processing to obtain the target image block. A unique identifier is generated for the target image block, which includes the position information of the target image block in the original image and the number of block divisions.
[0016] Preferably, the block division by local comparison processing to obtain the target image block is specifically as follows:
[0017] Get the initial image block and calculate the local complexity index C lo , the formula is: Where m and n are the height and width of the current initial image block, respectively; (a, b) are the starting coordinates of the current initial image block in the original image, and the range is limited to the initial image block. The preset local complexity threshold T lr , if C lo Greater than the preset local complexity threshold T lr , the initial image block is divided into two blocks according to the adaptive ratio α. The formula of the adaptive ratio α is: Until the local complexity of all image blocks is less than or equal to T lr .
[0018] Preferably, the improved wavelet transform algorithm in S2 automatically determines the optimal number of decomposition layers according to the imaging complexity of the target image block. The imaging complexity is comprehensively measured by calculating the grayscale variance and gradient amplitude mean of the image block, wherein the grayscale variance formula is: W and H are the width and height of the target image block, respectively. i,j is the grayscale value at the coordinate (i, j) in the target image block, is the average grayscale value of the target image block; the gradient amplitude mean formula is: The imaging complexity C of the image block is calculated based on the grayscale variance and gradient amplitude mean of the image block. bl , the formula is C bl =β1×V g +β2×M g , where β1 and β2 are preset weight coefficients, respectively, according to the imaging complexity C bl Determine the optimal number of decomposition levels L p , Where γ is the proportionality constant, To round down.
[0019] Preferably, in S3, the low-frequency subband coefficients are compressed by a deep learning sparse coding model, specifically:
[0020] The low-frequency subband coefficients are constructed into an input vector X, and the reconstruction error is minimized through a set of sparse coefficients s and a dictionary matrix D. The reconstruction error loss function L is: in, is the reconstruction error term, which measures the square of the Euclidean distance between the input vector X and the vector reconstructed by the dictionary matrix D and the sparse coefficient s. λ||s||1 is the sparsity constraint term, λ is the preset sparse penalty factor used to control the sparsity of the sparse coefficient s, and ||s||1 is the L1 norm of the sparse coefficient s. The sparse coding model based on deep learning is trained using a large amount of labeled low-frequency subband coefficient data of slope images. The stochastic gradient descent algorithm is used to continuously adjust the dictionary matrix D to minimize the loss function L. For the input low-frequency subband coefficient vector X, the corresponding sparse coefficient s is obtained. Only the sparse coefficient s and the trained dictionary matrix D are saved to achieve compression of the low-frequency subband coefficients.
[0021] Preferably, in said S3, the high frequency sub-band coefficients are compressed by an adaptive threshold quantization method according to their energy distribution characteristics, specifically:
[0022] Calculate each coefficient h in the high frequency subband coefficient matrix H ij Energy value E ij , the formula is: Get the total energy of the high-frequency subband coefficient matrix. The formula is: Among them, M t and N t are the number of rows and columns of the high-frequency subband coefficient matrix, respectively, according to the total energy E t And the preset energy retention ratio ρ sr Determine the adaptive threshold T sr , the formula is where α sr is the adjustment coefficient; each coefficient h in the high frequency subband coefficient matrix H ij , if |h ij |≤T sr , then it is quantized to 0; otherwise, it is quantized, the formula is in To round down, the high-frequency sub-band coefficient matrix Q is quantized to achieve compression of the high-frequency sub-band coefficients.
[0023] Preferably, the specific storage format in S4 is specifically:
[0024] A root node is created, which serves as the entrance to the entire tree storage structure. For each image block, a hash operation is performed on the image block identifier based on its unique image block identifier to obtain a hash value. The image block is assigned to different subtree branches according to the range of the hash value. The root node of each subtree branch is also identified by the hash value range. In each subtree, the hierarchy is further subdivided according to the character combination of the image block identifier, and the coordinate information in the image block identifier is extracted. The intermediate nodes are created in sequence from left to right on the horizontal coordinate and from top to bottom on the vertical coordinate. Each intermediate node represents a coordinate interval. The image block data containing the low-frequency subband coefficients and the high-frequency subband coefficients are stored as leaf node content under the corresponding coordinate interval node. When specific image block data needs to be retrieved and read, the target image block identifier is hashed to locate the corresponding subtree branch. According to the coordinate information in the image block identifier, the leaf node storing the target data is quickly found along the coordinate interval of the intermediate node for rapid retrieval and reading.
[0025] Preferably, in said S6, when the low-frequency subband coefficients are decompressed and the low-frequency information is restored by the inverse process of the deep learning model, the sparse coefficients s read are used as input, and the inverse process of the deep learning model is obtained by training the inverse dictionary matrix D -1 Perform calculations to restore the low-frequency information: in is the recovered low-frequency subband coefficient vector, that is, the recovered low-frequency information, ∈ is the correction vector set according to the statistical characteristics of the training data, which compensates for the information loss during the compression and decompression process. During decompression, according to the inverse dictionary matrix D obtained by training -1 And the calculated correction vector ∈, perform inverse operation on the sparse coefficient s to restore the low-frequency information.
[0026] Preferably, in S6, the read high-frequency sub-band coefficients are subjected to an inverse quantization operation to restore the high-frequency information, specifically:
[0027] Get the high frequency subband coefficient matrix Q and the corresponding adaptive threshold T calculated and stored in the compression stage sr , for each quantized value q in the quantized high-frequency subband coefficient matrix Q ij , restored by the inverse quantization formula, the formula is: in is the high frequency subband coefficient after recovery, Δ ij It is a compensation value dynamically adjusted according to adjacent quantization coefficients and local image features. The formula is: Δ ij =ω r ×(q i+1,j -q i-1,j )×(q i,j+1 -q i,,j-1 ), here ωr is the weight factor, which is determined by analyzing the characteristics of high-frequency sub-band coefficients of a large number of slope images. At the boundary, if i-1<0 or i+1≥M t or j-1<0 or j+1≥N t ,The values of adjacent quantized coefficients are obtained in a mirror symmetric manner, and the high-frequency sub-band coefficients are gradually restored through the inverse quantization operation, thus restoring the high-frequency information.
[0028] Preferably, when the inverse wavelet transform is used in S7 to convert the restoration coefficients of the low-frequency sub-band and the high-frequency sub-band back to the spatial domain to reconstruct the image block, the optimal decomposition layer number L determined in S3 is p Perform the reverse operation and restore the low-frequency subband coefficient matrix A of each layer to the inverse transform. l The corresponding horizontal high frequency, vertical high frequency and diagonal high frequency sub-band restoration coefficient matrix H l , V l , D l (l=1,2,…,L p ) combination, the intermediate reconstruction matrix R after the image block is inversely transformed at the lth layer l The calculation formula is: in Represents the inverse wavelet transform operator, from the bottom layer l = L p First, perform the above inverse transformation operation layer by layer, and use the intermediate reconstruction matrix obtained by the inverse transformation of each layer as the low-frequency subband input of the inverse transformation of the previous layer, until the inverse transformation of the first layer l = 1 is completed, and the reconstructed image block matrix R0 is obtained, realizing the conversion back to the spatial domain reconstructed image block.
[0029] Compared with the prior art, the technical solution of this application has the following technical effects:
[0030] This invention achieves efficient compression of drone-generated slope oblique photography image data, significantly reducing storage and transmission costs. During the image segmentation stage, the segment size is dynamically determined based on the image's global and local complexity indicators. Compared to traditional fixed-size segmentation, this allows for more precise image segmentation and reduces data redundancy. For example, in areas with complex slope textures, smaller segments can capture more detailed details, while in areas with simpler textures, larger segments are used to avoid unnecessary duplicate storage.
[0031] In the compression process, the present invention applies a deep learning sparse coding model to the low-frequency subband coefficients. By minimizing the reconstruction error loss function, the amount of data is significantly reduced while maintaining important information. An adaptive threshold quantization method is used for the high-frequency subband coefficients. The threshold is determined according to the energy distribution characteristics, effectively retaining key information while reducing redundancy. Compared with traditional simple downsampling and fixed threshold quantization, this combined compression method can significantly improve image quality at the same compression ratio while significantly reducing the space required for storage. In terms of transmission, the amount of compressed data is reduced, and the transmission time is significantly shortened, which improves data transmission efficiency and reduces transmission costs, providing strong support for the real-time transmission and storage of large-scale slope monitoring data.
[0032] This method excels in image reconstruction, accurately reconstructing high-quality slope oblique photography images, effectively ensuring data quality and providing an accurate basis for subsequent analysis. During the decompression phase, for low-frequency subband coefficients, the inverse process of the deep learning model and carefully designed correction vectors are used to maximize the recovery of the original low-frequency information and minimize information loss. For high-frequency subband coefficients, an inverse quantization operation is performed, dynamically adjusting the compensation value based on adjacent quantization coefficients and local image features, effectively restoring high-frequency details.
[0033] When reconstructing image blocks through inverse wavelet transform, the present invention performs an inverse operation based on the previously determined optimal number of decomposition layers, accurately converting the restoration coefficients of the low-frequency and high-frequency subbands back into the spatial domain. This precise reconstruction process ensures that the final spliced complete slope oblique photographic image truly reflects the actual slope conditions. When conducting slope stability analysis and deformation monitoring, high-quality images can help professionals more accurately identify subtle changes in the slope, such as cracks and displacements, avoiding misjudgments or omissions due to poor image quality. This greatly improves the accuracy of analysis results and provides reliable data support for ensuring slope safety.
[0034] The specific tree-shaped storage format designed by the present invention greatly optimizes the data retrieval and reading process and significantly improves data processing efficiency. Hash operations and hierarchical divisions are performed based on image block identifiers, and image block data is stored under corresponding coordinate interval nodes. This storage method enables rapid positioning when retrieving and reading specific image block data. For example, when it is necessary to obtain slope image data of a specific area, the corresponding subtree branch can be quickly located by performing a hash operation on the target image block identifier, and then the leaf node storing the target data can be quickly found along the intermediate nodes based on the coordinate information, avoiding disordered searches in large amounts of data.
[0035] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application so that it can be implemented in accordance with the contents of the specification, and to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the following is a detailed description of the preferred embodiment of the present application in conjunction with the accompanying drawings.
[0036] Based on the detailed description of the specific embodiments of the present application in conjunction with the accompanying drawings below, those skilled in the art will become more aware of the above and other objects, advantages and features of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings required for the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without inventive work. In all drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn according to the actual scale.
[0038] Figure 1 This is a flow chart of a method for processing UAV slope oblique photography data based on efficient image compression according to the present invention;
[0039] Figure 2 This is a block processing diagram of the original oblique photography image of the present invention;
[0040] Figure 3 A comparison chart of compression ratios between the present invention and the prior art;
[0041] Figure 4 This is a comparison chart of the peak signal-to-noise ratio and structural similarity index between the present invention and the prior art. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. In the following description, specific details such as specific configurations and components are provided only to help fully understand the embodiments of the present application. Therefore, it should be clear to those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. In addition, for clarity and brevity, the description of known functions and structures has been omitted in the embodiments.
[0043] It should be understood that references throughout this specification to "one embodiment" or "this embodiment" mean that a particular feature, structure, or characteristic associated with the embodiment is included in at least one embodiment of the present application. Therefore, the appearance of "one embodiment" or "this embodiment" throughout this specification does not necessarily refer to the same embodiment. Furthermore, these particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0044] In addition, the present application may repeat reference numerals and / or letters in different examples. This repetition is for the purpose of simplicity and clarity and does not in itself indicate the relationship between the various embodiments and / or settings discussed.
[0045] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, B exists alone, and A and B exist at the same time. The term " / and" in this article describes another type of association object relationship, indicating that two relationships can exist. For example, A / and B can mean: A exists alone, and A and B exist alone. In addition, the character " / " in this article generally indicates that the previous and subsequent associated objects are in an "or" relationship.
[0046] The term "at least one" in this article is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, at least one of A and B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0047] It should also be noted that, in this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include," "comprises," or any other variations thereof are intended to cover non-exclusive inclusion.
[0048] Example 1
[0049] This embodiment mainly describes a method for processing UAV slope oblique photography data based on efficient image compression. Figure 1 Shown, including:
[0050] S1. Using a drone equipped with a multi-lens oblique photography device to photograph the slope from multiple angles, obtaining original oblique photography image data including different sides of the slope; dividing the obtained original oblique photography image data into blocks and generating a unique identifier for each image block;
[0051] S2. For each image block, perform frequency domain conversion using an improved wavelet transform algorithm to convert the image block from the spatial domain to the frequency domain and obtain low-frequency sub-band and high-frequency sub-band coefficients;
[0052] S3. For low-frequency sub-band coefficients, a sparse coding model based on deep learning is used for compression processing; for high-frequency sub-band coefficients, an adaptive threshold quantization method is used for compression based on energy distribution characteristics;
[0053] S4, combining the compressed low-frequency sub-band coefficients, high-frequency sub-band coefficients, and corresponding image block identifiers to form compressed image block data, and storing the data in a specific storage format;
[0054] S5. When the slope data needs to be analyzed or processed, the compressed image block data is read from the storage medium, and the corresponding low-frequency sub-band coefficients and high-frequency sub-band coefficients are extracted according to the image block identifier;
[0055] S6. Decompress the read low-frequency subband coefficients using the inverse process of the deep learning model to restore the low-frequency information; and restore the high-frequency information of the high-frequency subband coefficients through inverse quantization operation;
[0056] S7. Use inverse wavelet transform to convert the restoration coefficients of the low-frequency subband and the high-frequency subband back to the spatial domain to reconstruct the image blocks. According to the original position information of the image blocks, all the reconstructed image blocks are spliced into a complete slope oblique photography image.
[0057] Furthermore, in S1, the acquired original oblique photography image data is processed into blocks, specifically:
[0058] Get the original oblique photography image and calculate the global complexity index C gl , the calculation formula is Where M and N are the height and width of the image respectively. and They are the gradients of the image at position (i, j) along the x-axis and y-axis directions, respectively. According to the global complexity index C gl Determine the initial block size S in , the formula is: where k r is the preset empirical constant, To round down, the image is preliminarily divided into blocks according to the initial block size to obtain multiple initial image blocks. The blocks are divided through local comparison processing to obtain the target image block. A unique identifier is generated for the target image block, which includes the position information of the target image block in the original image and the number of block divisions.
[0059] Furthermore, the target image blocks are obtained by dividing the image into blocks through local comparison processing, specifically:
[0060] Get the initial image block and calculate the local complexity index C lo , the formula is: Where m and n are the height and width of the current initial image block, respectively; (a, b) are the starting coordinates of the current initial image block in the original image, and the range is limited to the initial image block. The preset local complexity threshold T lr , if C lo Greater than the preset local complexity threshold T lr , the initial image block is divided into two blocks according to the adaptive ratio α. The formula of the adaptive ratio α is: Until the local complexity of all image blocks is less than or equal to T lr .
[0061] Furthermore, the improved wavelet transform algorithm in S2 automatically determines the optimal number of decomposition layers according to the imaging complexity of the target image block. The imaging complexity is comprehensively measured by calculating the grayscale variance and gradient amplitude mean of the image block. The grayscale variance formula is: W and H are the width and height of the target image block, respectively. i,j is the grayscale value at the coordinate (i, j) in the target image block, is the average grayscale value of the target image block; the gradient amplitude mean formula is: The imaging complexity C of the image block is calculated based on the grayscale variance and gradient amplitude mean of the image block. bl , the formula is C bl =β1×V g +β2×M g , where β1 and β2 are preset weight coefficients, respectively, according to the imaging complexity C bl Determine the optimal number of decomposition levels L p , Where γ is the proportionality constant, To round down.
[0062] Furthermore, S3 compresses the low-frequency subband coefficients through a deep learning sparse coding model, specifically:
[0063] The low-frequency subband coefficients are constructed into an input vector X, and the reconstruction error is minimized through a set of sparse coefficients s and a dictionary matrix D. The reconstruction error loss function L is: in, is the reconstruction error term, which measures the square of the Euclidean distance between the input vector X and the vector reconstructed by the dictionary matrix D and the sparse coefficient s. λ||s||1 is the sparsity constraint term, λ is the preset sparse penalty factor used to control the sparsity of the sparse coefficient s, and ||s||1 is the L1 norm of the sparse coefficient s. The sparse coding model based on deep learning is trained using a large amount of labeled low-frequency subband coefficient data of slope images. The stochastic gradient descent algorithm is used to continuously adjust the dictionary matrix D to minimize the loss function L. For the input low-frequency subband coefficient vector X, the corresponding sparse coefficient s is obtained. Only the sparse coefficient s and the trained dictionary matrix D are saved to achieve compression of the low-frequency subband coefficients.
[0064] Furthermore, in S3, the high-frequency subband coefficients are compressed by an adaptive threshold quantization method according to their energy distribution characteristics, specifically:
[0065] Calculate each coefficient h in the high frequency subband coefficient matrix H ij Energy value E ij , the formula is: Get the total energy of the high-frequency subband coefficient matrix. The formula is: Among them, M t and N t are the number of rows and columns of the high-frequency subband coefficient matrix, respectively, according to the total energy E t And the preset energy retention ratio ρ sr Determine the adaptive threshold T sr , the formula is where α sr is the adjustment coefficient; each coefficient h in the high frequency subband coefficient matrix H ij , if |h ij |≤T sr , then it is quantized to 0; otherwise, it is quantized, the formula is in To round down, the high-frequency sub-band coefficient matrix Q is quantized to achieve compression of the high-frequency sub-band coefficients.
[0066] Furthermore, the specific storage format in S4 is:
[0067] A root node is created, which serves as the entrance to the entire tree storage structure. For each image block, a hash operation is performed on the image block identifier based on its unique image block identifier to obtain a hash value. The image block is assigned to different subtree branches according to the range of the hash value. The root node of each subtree branch is also identified by the hash value range. In each subtree, the hierarchy is further subdivided according to the character combination of the image block identifier, and the coordinate information in the image block identifier is extracted. The intermediate nodes are created in sequence from left to right on the horizontal coordinate and from top to bottom on the vertical coordinate. Each intermediate node represents a coordinate interval. The image block data containing the low-frequency subband coefficients and the high-frequency subband coefficients are stored as leaf node content under the corresponding coordinate interval node. When specific image block data needs to be retrieved and read, the target image block identifier is hashed to locate the corresponding subtree branch. According to the coordinate information in the image block identifier, the leaf node storing the target data is quickly found along the coordinate interval of the intermediate node for rapid retrieval and reading.
[0068] Furthermore, in S6, when the low-frequency subband coefficients are decompressed and the low-frequency information is restored by the inverse process of the deep learning model, the sparse coefficients s read are used as input, and the inverse process of the deep learning model is obtained by training the inverse dictionary matrix D -1 Perform calculations to restore the low-frequency information: in is the recovered low-frequency subband coefficient vector, that is, the recovered low-frequency information, ∈ is the correction vector set according to the statistical characteristics of the training data, which compensates for the information loss during the compression and decompression process. During decompression, according to the inverse dictionary matrix D obtained by training -1 And the calculated correction vector ∈, perform inverse operation on the sparse coefficient s to restore the low-frequency information.
[0069] Furthermore, in S6, the read high-frequency subband coefficients are inversely quantized to restore the high-frequency information, specifically:
[0070] Get the high frequency subband coefficient matrix Q and the corresponding adaptive threshold T calculated and stored in the compression stage sr , for each quantized value q in the quantized high-frequency subband coefficient matrix Q ij , restored by the inverse quantization formula, the formula is: in is the high frequency subband coefficient after recovery, Δ ij It is a compensation value dynamically adjusted according to adjacent quantization coefficients and local image features. The formula is: Δ ij =ω r ×(q i+1,j -q i-1,j )×(q i,j+1 -q i,j-1 ), here ωr is the weight factor, which is determined by analyzing the characteristics of high-frequency sub-band coefficients of a large number of slope images. At the boundary, if i-1<0 or i+1≥M t or j-1<0 or j+1≥N t ,The values of adjacent quantized coefficients are obtained in a mirror symmetric manner, and the high-frequency sub-band coefficients are gradually restored through the inverse quantization operation, thus restoring the high-frequency information.
[0071] Furthermore, when S7 uses inverse wavelet transform to convert the restoration coefficients of the low-frequency sub-band and the high-frequency sub-band back to the spatial domain to reconstruct the image block, the optimal decomposition layer number L determined in S3 is p Perform the reverse operation and restore the low-frequency subband coefficient matrix A of each layer to the inverse transform. l The corresponding horizontal high frequency, vertical high frequency and diagonal high frequency sub-band restoration coefficient matrix H l , V l , D l (l=1,2,…,L p ) combination, the intermediate reconstruction matrix R after the image block is inversely transformed at the lth layer l The calculation formula is: in Represents the inverse wavelet transform operator, from the bottom layer l = L p First, perform the above inverse transformation operation layer by layer, and use the intermediate reconstruction matrix obtained by the inverse transformation of each layer as the low-frequency subband input of the inverse transformation of the previous layer, until the inverse transformation of the first layer l = 1 is completed, and the reconstructed image block matrix R0 is obtained, realizing the conversion back to the spatial domain reconstructed image block.
[0072] This embodiment describes in detail that this application greatly compresses the data volume and saves storage and transmission costs through blocking strategies, compression algorithms, storage formats, decompression and reconstruction methods; it can accurately reconstruct images, ensure data quality, and provide an accurate basis for slope stability analysis, etc.; it also optimizes the storage format, improves data retrieval and reading efficiency, and helps to quickly respond to slope changes, with obvious advantages in the field of slope monitoring.
[0073] Based on Example 1, this embodiment describes in detail the block processing of the original oblique photography image data obtained in this application, such as Figure 2 As shown, specifically:
[0074] Get the original oblique photography image and calculate the global complexity index C gl , the calculation formula is Where M and N are the height and width of the image respectively. and are the gradients of the image at position (i, j) along the x-axis and y-axis, respectively. The gradient is calculated using the Sobel operator or the Prewitt operator. Taking the Sobel operator as an example, it combines Gaussian smoothing and differential derivation to effectively calculate the approximate gradient of the image grayscale function. For each pixel in the image, the Sobel operator is used to calculate its gradient components along the x-axis and y-axis, and these two components are substituted into the calculation formula of the global complexity index.
[0075] According to the global complexity index C gl Determine the initial block size S in , the formula is: where k r is the preset empirical constant, k r The value of will affect the size of the initial block. If k r If the value is large, the initial block will be relatively large; on the contrary, if k r If the value is small, the initial block will be relatively small. To round down, the image is preliminarily divided into blocks according to the initial block size to obtain multiple initial image blocks. The blocks are divided through local comparison processing to obtain the target image block. A unique identifier is generated for the target image block. The identifier contains the position information of the target image block in the original image and the number of block divisions.
[0076] Determine the initial block size S in After that, the original oblique photography image is preliminarily divided into blocks, starting from the upper left corner of the image and dividing by S in ×S in The size of an initial image block is moved rightward and downward in sequence until the entire image is covered. In the block division process, attention should be paid to the image boundary. If the width or height of the image cannot be S in divisible by S, then the size of the initial image block in the last row or column will be smaller than S in ×S in ,For this case, it is still treated as an independent initial image block;
[0077] Get the initial image block and calculate the local complexity index C lo , the formula is: Where m and n are the height and width of the current initial image block, respectively; (a, b) are the starting coordinates of the current initial image block in the original image, and the range is limited to the initial image block. The preset local complexity threshold T lr , if C lo Greater than the preset local complexity threshold T lr , the initial image block is divided into two blocks according to the adaptive ratio α. The formula of the adaptive ratio α is: Until the local complexity of all image blocks is less than or equal to T lr .
[0078] This example describes a detailed image segmentation technique that dynamically determines segment size based on image complexity, enabling precise image segmentation. Complex areas are subdivided, while simple areas are roughly segmented, reducing data redundancy. Unique identifiers containing the location and segmentation times are generated for each image segment, facilitating storage, retrieval, and processing. This improves the overall efficiency and quality of image data processing, providing a higher-quality data foundation for subsequent analysis.
[0079] Based on Example 1, this embodiment describes in detail the compression ratio comparison and verification of the present application, specifically:
[0080] like Figure 3 The compression ratio comparison chart shows the difference in compression effects of the two technologies on different images. The existing technology uses a compression method based on fixed blocking and discrete cosine transform (DCT). In this experiment, the compression ratio of this technology for different images is relatively stable at around 4.00:1. For example, the compression ratio of image No. 1 is 4.00:1, the compression ratio of image No. 2 is 3.89:1, and the compression ratio of image No. 3 is 4.12:1. This is because the fixed blocking method does not consider the specific content and complexity of the image. Regardless of the texture, details and other features of the image, the same size of blocks are used for processing. Discrete cosine transform (DCT) compression is a more traditional method with limited adaptability to different images. When faced with complex slope oblique photography images, it is difficult to fully tap the compressible space of the image.
[0081] In comparison, the compression ratio of the method of the present application is more outstanding; taking the image number 1 as an example, the compression ratio of the method of the present application reaches 5.6:1, which is 1.67 higher than the existing technology; for the image number 2, the compression ratio of the method of the present application is 5.34:1, which is also far higher than the 3.89:1 of the existing technology; for the image number 3, the compression ratio of the method of the present application is 5.90:1, which is an obvious advantage. From the overall data, the compression ratio of the method of the present application on different images is significantly higher than that of the existing technology, with an average compression ratio of about 5.5:1, while the average compression ratio of the existing technology is about 4.0:1. This is due to the fact that the method of the present application dynamically determines the block size according to the global and local complexity of the image, and uses a deep learning sparse coding model for low-frequency sub-band coefficients and an adaptive threshold quantization method for high-frequency sub-band coefficients. These technical means work together to make full use of the characteristics of image data, effectively improve the compression ratio, and can more efficiently reduce the amount of data, saving storage and transmission costs.
[0082] This embodiment details image segmentation, dynamically adjusting based on complexity to reduce redundancy; compression, processing low-frequency and high-frequency subband coefficients to improve compression ratios; storage formats optimized for retrieval and reading efficiency; and reconstructed images with high accuracy. Compared to existing technologies, this approach offers significant advantages in compression ratio, reconstruction quality, and retrieval speed, providing an efficient and accurate data processing solution for slope monitoring.
[0083] Based on Example 1, this embodiment describes in detail the peak signal-to-noise ratio and structural similarity index comparison verification of the present application, such as Figure 4 As shown, specifically:
[0084] like Figure 4 (a) presents the comparison results of the image reconstruction quality between the method of the present application and the existing technology, using the peak signal-to-noise ratio (PSNR) as an indicator. The higher the PSNR value, the smaller the difference between the reconstructed image and the original image, that is, the higher the reconstruction quality.
[0085] Existing technologies use a processing method based on fixed blocking and discrete cosine transform (DCT) compression. In this experiment, due to factors such as lighting conditions and noise interference when the images were captured, the PSNR values of the images reconstructed by existing technologies fluctuated and were generally low. For example, image number 1 was captured in slightly dim lighting and with a certain amount of noise, and its PSNR value was 29.6358dB; image number 2 was affected by slight motion blur when captured, and its PSNR value was 28.9742dB; image number 3 was located in an area with complex textures, and its PSNR value was 30.2865dB. The fixed blocking method cannot accurately adapt to the complexity of each area of the image, resulting in information redundancy caused by overly large blocks in simple areas and loss of key details due to overly small blocks in complex areas. During the compression process, the discrete cosine transform (DCT) tends to over-compress the high-frequency information of the image, causing the reconstructed image to have blurring and distortion in terms of texture and details, thereby affecting the PSNR value.
[0086] In contrast, the PSNR value of the reconstructed image by the method of the present application is excellent. Taking image number 1 under the same conditions as an example, the PSNR value reaches 34.8564dB, which is 5.2206dB higher than the existing technology; the PSNR value of image number 2 is 33.7829dB, which is 4.8087dB higher than the existing technology; the PSNR value of image number 3 is 35.1037dB, which is also significantly superior. From the overall experimental data, the average PSNR of the reconstructed image by the method of the present application is about 34.5dB, while the existing technology is only about 29.6dB. This is mainly due to a series of optimization technologies used in the decompression and reconstruction process of the method of the present application, such as using the inverse process of the deep learning model and carefully designed correction vectors to restore low-frequency information, recovering high-frequency details by dynamically adjusting the compensation value based on adjacent quantization coefficients and local features of the image through the inverse quantization operation, and reconstructing the image block by accurately performing inverse wavelet transform according to the optimal decomposition layer number. These technologies enable the reconstructed image to more accurately restore the details and structure of the original image, thereby obtaining a higher PSNR value and ensuring the quality of image reconstruction.
[0087] like Figure 4 (b) shows the comparison of the image reconstruction quality between the method of the present application and the prior art based on the structural similarity index (SSIM). The closer the SSIM value is to 1, the higher the similarity between the reconstructed image and the original image in structure and content, and the better the image reconstruction quality.
[0088] Image 1, processed using existing techniques, has an SSIM value of 0.8347. This is because fixed blocking cannot adapt to the differences between complex and simple areas in the image, resulting in the loss of some detailed structure in complex areas, resulting in a decrease in similarity to the original image. Image 2 has an SSIM value of 0.8205. This is because the DCT transform destroys the image's edges and texture structure when compressing high-frequency information, increasing the structural difference between the reconstructed image and the original. Image 3 has an SSIM value of 0.8112. Overall, the average SSIM value of images reconstructed using existing techniques is approximately 0.83, making it difficult to accurately restore the structure of the original image.
[0089] The SSIM performance of the reconstructed image by the method of the present application far exceeds that of the existing technology. Taking the image No. 1 as an example, the SSIM value obtained by the method of the present application reaches 0.9373, which is 0.1026 higher than the existing technology. This is due to the consideration of image complexity when dividing the blocks, which can better retain the characteristics of each region, and in the compression and decompression process, the deep learning model and the adaptive quantization method effectively retain the image details. For the image No. 2, the SSIM value of the method of the present application is 0.9248, which has obvious advantages. For the image No. 3, the SSIM value is 0.9236. From the overall experimental data, the average SSIM value of the image reconstructed by the method of the present application is about 0.91, indicating that the image reconstructed by the method of the present application is more similar to the original image in structure, and can better restore the real texture and structure of the slope, providing a more reliable image data basis for slope monitoring and analysis.
[0090] This embodiment details the application's dynamic segmentation based on image complexity, which effectively reduces data redundancy. Its unique compression algorithm improves compression ratios while accurately reconstructing images, achieving higher PSNR and SSIM values while preserving image detail and structure. Its unique storage structure significantly improves retrieval efficiency, demonstrating significant advantages over existing technologies across the board.
[0091] The above are only preferred embodiments of the present invention, which do not limit the scope of protection of the present invention. For those skilled in the art, the present invention can be modified and varied in various ways. Any changes, modifications, replacements, integrations and parameter changes to these embodiments through conventional substitutions or that can achieve the same functions without departing from the principles and spirit of the present invention fall within the scope of protection of the present invention.
Claims
1. A method for processing UAV slope oblique photography data based on efficient image compression, characterized in that: include: S1. Using a drone equipped with a multi-lens oblique photography device to photograph the slope from multiple angles, obtaining original oblique photography image data including different sides of the slope; dividing the obtained original oblique photography image data into blocks and generating a unique identifier for each image block; S2. For each image block, perform frequency domain conversion using an improved wavelet transform algorithm to convert the image block from the spatial domain to the frequency domain and obtain low-frequency sub-band and high-frequency sub-band coefficients; S3. Compress the low-frequency subband coefficients using a sparse coding model based on deep learning; For high frequency sub-band coefficients, adaptive threshold quantization method is used to compress them according to the energy distribution characteristics; S4, combining the compressed low-frequency sub-band coefficients, high-frequency sub-band coefficients, and corresponding image block identifiers to form compressed image block data, and storing the data in a specific storage format; S5. When the slope data needs to be analyzed or processed, the compressed image block data is read from the storage medium, and the corresponding low-frequency sub-band coefficients and high-frequency sub-band coefficients are extracted according to the image block identifier; S6. Decompress the read low-frequency subband coefficients using the inverse process of the deep learning model to restore the low-frequency information; and restore the high-frequency information of the high-frequency subband coefficients through inverse quantization operation; S7. Use inverse wavelet transform to convert the restoration coefficients of the low-frequency subband and the high-frequency subband back to the spatial domain to reconstruct the image blocks. According to the original position information of the image blocks, all the reconstructed image blocks are spliced into a complete slope oblique photography image.
2. The method for processing data of slope oblique photography using UAV based on efficient image compression according to claim 1, characterized in that: In S1, the acquired original oblique photography image data is subjected to block processing, specifically: Get the original oblique photography image and calculate the global complexity index C gl , the calculation formula is Where M and N are the height and width of the image respectively. and They are the gradients of the image at position (i, j) along the x-axis and y-axis directions, respectively. According to the global complexity index C gl Determine the initial block size S in , the formula is: where k r is the preset empirical constant, To round down, the image is preliminarily divided into blocks according to the initial block size to obtain multiple initial image blocks. The blocks are divided through local comparison processing to obtain the target image block. A unique identifier is generated for the target image block, which includes the position information of the target image block in the original image and the number of block divisions.
3. The method for processing data of slope oblique photography using UAV based on efficient image compression according to claim 2, characterized in that: The block division is performed by local comparison processing to obtain the target image block, specifically: Get the initial image block and calculate the local complexity index C lo , the formula is: Where m and n are the height and width of the current initial image block, respectively; (a, b) are the starting coordinates of the current initial image block in the original image, and the range is limited to the initial image block. The preset local complexity threshold T lr , if C lo Greater than the preset local complexity threshold T lr , the initial image block is divided into two blocks according to the adaptive ratio α. The formula of the adaptive ratio α is: Until the local complexity of all image blocks is less than or equal to T lr .
4. The method for processing data of slope oblique photography using unmanned aerial vehicle (UAV) based on efficient image compression according to claim 1 or 3, characterized in that: The improved wavelet transform algorithm in S2 automatically determines the optimal number of decomposition layers according to the imaging complexity of the target image block. The imaging complexity is comprehensively measured by calculating the grayscale variance and gradient amplitude mean of the image block, where the grayscale variance formula is: W and H are the width and height of the target image block, respectively. i,j is the grayscale value at the coordinate (i, j) in the target image block, is the average grayscale value of the target image block; the gradient amplitude mean formula is: The imaging complexity C of the image block is calculated based on the grayscale variance and gradient amplitude mean of the image block. bl , the formula is C bl =β1×V g +β2×M g , where β1 and β2 are preset weight coefficients, respectively, according to the imaging complexity C bl Determine the optimal number of decomposition levels L p , Where γ is the proportionality constant, To round down.
5. The method for processing data of slope oblique photography using UAV based on efficient image compression according to claim 1, characterized in that: In S3, the low-frequency subband coefficients are compressed using a deep learning sparse coding model, specifically: The low-frequency subband coefficients are constructed into an input vector X, and the reconstruction error is minimized through a set of sparse coefficients s and a dictionary matrix D. The reconstruction error loss function L is: in, is the reconstruction error term, which measures the square of the Euclidean distance between the input vector X and the vector reconstructed by the dictionary matrix D and the sparse coefficient s. λ||s||1 is the sparsity constraint term, λ is the preset sparse penalty factor used to control the sparsity of the sparse coefficient s, and ||s||1 is the L1 norm of the sparse coefficient s. The sparse coding model based on deep learning is trained using a large amount of labeled low-frequency subband coefficient data of slope images. The stochastic gradient descent algorithm is used to continuously adjust the dictionary matrix D to minimize the loss function L. For the input low-frequency subband coefficient vector X, the corresponding sparse coefficient s is obtained. Only the sparse coefficient s and the trained dictionary matrix D are saved to achieve compression of the low-frequency subband coefficients.
6. The method for processing data of slope oblique photography using a UAV based on efficient image compression according to claim 1, characterized in that: In S3, the high frequency subband coefficients are compressed by an adaptive threshold quantization method according to their energy distribution characteristics, specifically: Calculate each coefficient h in the high frequency subband coefficient matrix H ij Energy value E ij , the formula is: Get the total energy of the high-frequency subband coefficient matrix. The formula is: Among them, M t and N t are the number of rows and columns of the high-frequency subband coefficient matrix, respectively, according to the total energy E t And the preset energy retention ratio ρ sr Determine the adaptive threshold T sr , the formula is where α sr is the adjustment coefficient; each coefficient h in the high frequency subband coefficient matrix H ij , if |h ij |≤T sr , then it is quantized to 0; otherwise, it is quantized, the formula is in To round down, the high-frequency sub-band coefficient matrix Q is quantized to achieve compression of the high-frequency sub-band coefficients.
7. The method for processing data of slope oblique photography using a UAV based on efficient image compression according to claim 1, characterized in that: The specific storage format in S4 is: A root node is created, which serves as the entrance to the entire tree storage structure. For each image block, a hash operation is performed on the image block identifier based on its unique image block identifier to obtain a hash value. The image block is assigned to different subtree branches according to the range of the hash value. The root node of each subtree branch is also identified by the hash value range. In each subtree, the hierarchy is further subdivided according to the character combination of the image block identifier, and the coordinate information in the image block identifier is extracted. The intermediate nodes are created in sequence from left to right on the horizontal coordinate and from top to bottom on the vertical coordinate. Each intermediate node represents a coordinate interval. The image block data containing the low-frequency subband coefficients and the high-frequency subband coefficients are stored as leaf node content under the corresponding coordinate interval node. When specific image block data needs to be retrieved and read, the target image block identifier is hashed to locate the corresponding subtree branch. According to the coordinate information in the image block identifier, the leaf node storing the target data is quickly found along the coordinate interval of the intermediate node for rapid retrieval and reading.
8. The method for processing data of slope oblique photography using unmanned aerial vehicle (UAV) based on efficient image compression according to claim 1 or 5, characterized in that: In S6, when the low-frequency subband coefficients are decompressed and the low-frequency information is restored by the inverse process of the deep learning model, the sparse coefficients s read are used as input, and the inverse process of the deep learning model is obtained by training the inverse dictionary matrix D -1 Perform calculations to restore the low-frequency information: in is the recovered low-frequency subband coefficient vector, that is, the recovered low-frequency information, ∈ is the correction vector set according to the statistical characteristics of the training data, which compensates for the information loss during the compression and decompression process. During decompression, according to the inverse dictionary matrix D obtained by training -1 And the calculated correction vector ∈, perform inverse operation on the sparse coefficient s to restore the low-frequency information.
9. The method for processing data of slope oblique photography using unmanned aerial vehicle (UAV) based on efficient image compression according to claim 1 or 6, characterized in that: In S6, the read high-frequency sub-band coefficients are inversely quantized to restore high-frequency information, specifically: Get the high frequency subband coefficient matrix Q and the corresponding adaptive threshold T calculated and stored in the compression stage sr , for each quantized value q in the quantized high-frequency subband coefficient matrix Q ij , restored by the inverse quantization formula, the formula is: in is the high frequency subband coefficient after recovery, Δ ij It is a compensation value dynamically adjusted according to adjacent quantization coefficients and local image features. The formula is: Δ ij =ω r ×(q i+1,j -q i-1,j )×(q i,j+1 -q i,j-1 ), here ω r is the weight factor, which is determined by analyzing the characteristics of high-frequency sub-band coefficients of a large number of slope images. At the boundary, if i-1<0 or i+1≥M t or j-1<0 or j+1≥N t ,The values of adjacent quantized coefficients are obtained in a mirror symmetric manner, and the high-frequency sub-band coefficients are gradually restored through the inverse quantization operation, thus restoring the high-frequency information.
10. The method for processing data of slope oblique photography using unmanned aerial vehicle (UAV) based on efficient image compression according to claim 1 or 4, characterized in that: When the inverse wavelet transform is used in S7 to convert the restoration coefficients of the low-frequency sub-band and the high-frequency sub-band back to the spatial domain to reconstruct the image block, the optimal decomposition layer number L determined in S3 is p Perform the reverse operation and restore the low-frequency subband coefficient matrix A of each layer to the inverse transform. l The corresponding horizontal high frequency, vertical high frequency and diagonal high frequency sub-band restoration coefficient matrix H l , V l , D l (l=1,2,…,L p ) combination, the intermediate reconstruction matrix R after the image block is inversely transformed at the lth layer l The calculation formula is: in Represents the inverse wavelet transform operator, from the bottom layer l = L p First, perform the above inverse transformation operation layer by layer, and use the intermediate reconstruction matrix obtained by the inverse transformation of each layer as the low-frequency subband input of the inverse transformation of the previous layer, until the inverse transformation of the first layer l = 1 is completed, and the reconstructed image block matrix R0 is obtained, realizing the conversion back to the spatial domain reconstructed image block.
Citation Information
Cited By
Self-adaptive digital watermark embedding method and device and readable storage medium
CN122115186A