CN109448065A - A kind of compression sensing method based on the measurement of gradient block adaptive - Google Patents
A kind of compression sensing method based on the measurement of gradient block adaptive Download PDFInfo
- Publication number
- CN109448065A CN109448065A CN201811181710.3A CN201811181710A CN109448065A CN 109448065 A CN109448065 A CN 109448065A CN 201811181710 A CN201811181710 A CN 201811181710A CN 109448065 A CN109448065 A CN 109448065A
- Authority
- CN
- China
- Prior art keywords
- block
- row
- image
- column
- matrix
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000005259 measurement Methods 0.000 title claims abstract description 50
- 238000000034 method Methods 0.000 title claims abstract description 27
- 230000003044 adaptive effect Effects 0.000 title claims abstract description 14
- 238000007906 compression Methods 0.000 title description 10
- 230000006835 compression Effects 0.000 title description 9
- 239000011159 matrix material Substances 0.000 claims abstract description 59
- 239000013598 vector Substances 0.000 claims abstract description 16
- 230000011218 segmentation Effects 0.000 claims description 24
- 238000009499 grossing Methods 0.000 claims description 16
- 238000005070 sampling Methods 0.000 claims description 6
- 230000000903 blocking effect Effects 0.000 claims description 5
- 238000005192 partition Methods 0.000 claims description 3
- 238000011176 pooling Methods 0.000 claims description 3
- 230000000694 effects Effects 0.000 abstract description 13
- 230000006870 function Effects 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 2
- 238000000691 measurement method Methods 0.000 description 2
- 238000000638 solvent extraction Methods 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000000354 decomposition reaction Methods 0.000 description 1
- 230000006837 decompression Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T9/00—Image coding
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
Abstract
本发明涉及一种基于梯度分块自适应测量的压缩感知方法。该方法包括:将不重叠的基础块作为图像的划分单元,利用图像的垂直方向和水平方向的梯度计算每个基础块的平滑度,根据平滑度将图像分割成尺寸不均匀的图像块并且计算各图像块的测量率;按照图像块尺寸分类选择测量矩阵分别对各图像块进行测量,得到测量值;解码端引入向量夹角作为相似性判断标准,采用非局部低秩正则化压缩感知重构算法进行重构。本发明设计了一种不均匀分块自适应测量压缩感知方法,使其解码图像具有鲁棒性并且获得更好的重构效果。The invention relates to a compressed sensing method based on gradient block adaptive measurement. The method comprises: using a non-overlapping basic block as a dividing unit of an image, calculating a smoothness of each basic block by using a vertical direction and a horizontal gradient of the image, and dividing the image into image blocks of uneven size according to the smoothness and calculating The measurement rate of each image block; the measurement matrix is selected according to the image block size to measure each image block to obtain the measured value; the decoding end introduces the vector angle as the similarity judgment standard, and adopts the non-local low rank regularized compressed sensing reconstruction. The algorithm performs reconstruction. The invention designs a non-uniform block adaptive measurement compressed sensing method, which makes the decoded image robust and obtains better reconstruction effect.
Description
技术领域Technical field
本发明涉及计算机图像处理领域,特别是涉及一种基于梯度分块自适应测量的压缩感知方法。The present invention relates to the field of computer image processing, and in particular to a compressed sensing method based on gradient block adaptive measurement.
背景技术Background technique
压缩感知是一种突破奈奎斯特采样定理的全新信号处理框架。信息压缩和信号重构是压缩感知的两个重要组成部分。信息压缩方法主要分成两类,对整幅图像进行压缩与对图像分块后分别进行压缩。整体压缩感知往往需要存储较大的测量矩阵,占用较大内存,同时,整体压缩感知的计算量也十分庞大。Compressed sensing is a new signal processing framework that breaks through the Nyquist sampling theorem. Information compression and signal reconstruction are two important components of compressed sensing. The information compression methods are mainly divided into two categories, which compress the entire image and compress the image separately. The overall compressed sensing often needs to store a large measurement matrix, occupying a large memory, and at the same time, the calculation of the overall compressed sensing is also very large.
为此,科研人员提出了分块压缩方法,该方法先将图像分成指定大小的小块,再对每一小块图像使用同一的测量矩阵进行压缩。例如中国专利文献CN 106301384 A的“一种基于分块压缩感知的信号重构方法”:将原始信号均匀分成子块,对子块稀疏变换后滤波;得到的子信号再进行观测,得到观测向量;利用观测向量和测量矩阵恢复出子信号,再对子信号线性组合得到重构信号。分块压缩感知具有存储测量矩阵较小,重构算法计算更加简单的优点;但是该算法对每个子信号单独重构,然后线性组合,鲁棒性不强并且容易引起重构图像块效应。To this end, researchers have proposed a block compression method, which first divides the image into small blocks of a specified size, and then compresses each small block image using the same measurement matrix. For example, the Chinese patent document CN 106301384 A "a signal reconstruction method based on block compression sensing": the original signal is evenly divided into sub-blocks, and the sub-blocks are sparsely transformed and filtered; the obtained sub-signals are observed again to obtain an observation vector. The sub-signal is recovered by using the observation vector and the measurement matrix, and the reconstructed signal is obtained by linearly combining the sub-signals. Block-compressed sensing has the advantage that the storage measurement matrix is small and the reconstruction algorithm is simpler to calculate; however, the algorithm reconstructs each sub-signal separately and then linearly combines, which is not robust and easily causes reconstructed image block effects.
在文献“Compressive sampling based on frequency saliency for remotesensing imaging”中,为了提高分块压缩感知重构效果,根据块的显著性信息分配测量率,有效提升了重构效果。但该算法在重构时采用OMP算法,没用充分利用图像的先验知识,且设定的稀疏度值对重构效果的影响较大。In the literature "Compressive sampling based on frequency saliency for remote sensing imaging", in order to improve the effect of block compression sensing reconstruction, the measurement rate is allocated according to the saliency information of the block, which effectively improves the reconstruction effect. However, the algorithm uses the OMP algorithm in reconstruction, and does not make full use of the prior knowledge of the image, and the set sparsity value has a great influence on the reconstruction effect.
目前的分块压缩感知算法都是采用均匀分块,分块降低了计算复杂度,但也破坏了图像块之间的原始结构,导致分块压缩感知算法存在块效应;所以有不少学者提出了很多滤波的方法平滑复原块与块之间的差别,进而去除块效应,但是这也导致在去除块效应的同时破坏了图像复原结构,降低了图像重构效果。At present, the block-compression sensing algorithm adopts uniform block, which reduces the computational complexity, but also destroys the original structure between image blocks, resulting in block-blocking perceptual sensing algorithm. Therefore, many scholars have proposed A lot of filtering methods smooth the difference between the block and the block, and then remove the block effect, but this also causes the image restoration structure to be destroyed while the block effect is removed, and the image reconstruction effect is reduced.
在文献“Compressive Sensing via Nonlocal Low-Rank Regularization”中提出的非局部低秩正则化压缩感知重构算法,充分利用的图像的非局部相似性,取得了非常好的重构效果,但该算法在压缩端采用整体均匀测量,没有充分利用测量信息。为了取得更优秀的重构效果,本发明在解码端采用该非局部低秩方法进行重构。The non-local low-rank regularization compressed sensing reconstruction algorithm proposed in the literature "Compressive Sensing via Nonlocal Low-Rank Regularization" makes a very good reconstruction effect by fully utilizing the non-local similarity of the image, but the algorithm is The compression end uses an overall uniform measurement and does not make full use of the measurement information. In order to achieve a better reconstruction effect, the present invention performs reconstruction using the non-local low rank method at the decoding end.
发明内容Summary of the invention
为了解决现有技术中存在的上述缺陷,解决分块压缩感知重构问题并且提高重构图像峰值信噪比,本发明的目的是:提供一种基于梯度分块自适应测量的压缩感知方法。In order to solve the above-mentioned defects existing in the prior art, to solve the problem of block compressed sensing reconstruction and to improve the peak signal to noise ratio of the reconstructed image, an object of the present invention is to provide a compressed sensing method based on gradient block adaptive measurement.
本发明解决其技术问题所采取的技术方案是:为了降低分块方法在去块效应和保留复原结构的矛盾,结合图像几何结构,提供一种不均匀分块策略,将具有相似结构的区域尽可能的划分到一个块,减少图像的整体分块数量和块效应的产生,进而减少在去块效应时的结构损失。在测量时,根据不均匀块的平滑度进行自适应测量,在整体测量率不变的情况下,根据平滑度自适应的减少平滑区域的测量率和增加复杂区域的测量率,以提升有效信息的利用率。The technical solution adopted by the present invention to solve the technical problem is: in order to reduce the contradiction between the deblocking effect and the retained restoration structure of the blocking method, combined with the image geometric structure, an uneven blocking strategy is provided, and the region with similar structure is exhausted. Possible division into a block reduces the overall number of blocks of the image and the generation of blockiness, thereby reducing the structural loss in the deblocking effect. In the measurement, the adaptive measurement is performed according to the smoothness of the uneven block. When the overall measurement rate is constant, the measurement rate of the smooth region is reduced according to the smoothness adaptively, and the measurement rate of the complex region is increased to improve the effective information. Utilization.
包括如下步骤:Including the following steps:
(1)输入待处理图像,其中,待处理图像的数字化矩阵为X∈Rm×n,m、n分别为图像矩阵的行数和列数;(1) inputting a to-be-processed image, wherein the digitized matrix of the image to be processed is X∈R m×n , where m and n are the number of rows and columns of the image matrix, respectively;
(2)对图像进行分块,基于图像梯度分成d个不均匀块图像,对所有的图像块展开成列向量xj,其中j={1,2,...,d},组合成一个列向量x=[x1;x2;...;xd];(2) The image is divided into blocks, and the image gradient is divided into d uneven block images, and all the image blocks are expanded into a column vector x j , where j={1, 2, ..., d}, combined into one Column vector x=[x 1 ;x 2 ;...;x d ];
(3)根据图像所需的采样率M和每个块的平滑度分配每个块的测量率Mj,j={1,2,...,d};(3) assigning a measurement rate M j of each block according to the sampling rate M required for the image and the smoothness of each block, j={1, 2, ..., d};
(4)将元素数量相同的块分成一类,生成同尺寸的高斯随机正交矩阵,结合每个块的测量率Mj,选择高斯随机正交矩阵的前round(Mj×length(xj))行作为测量矩阵φj;对数据进行测量,得到测量值y=Φx=diag(φ1,φ2,...,φd)[x1;x2;...;xd];(4) Divide the blocks with the same number of elements into one class, and generate a Gaussian random orthogonal matrix of the same size. Combine the measurement rate M j of each block and select the front round of the Gaussian random orthogonal matrix (M j ×length(x j )) as the measurement matrix φ j ; measure the data to obtain the measured value y = Φx = diag (φ 1 , φ 2 , ..., φ d ) [x 1 ; x 2 ;...; x d ] ;
(5)利用测量值、块测量率、行分割位置和测量矩阵对原信号进行重构,采用非局部低秩正则化压缩感知重构算法进行求解,输出重构图像;(5) Reconstruct the original signal by using the measured value, block measurement rate, line segmentation position and measurement matrix, and solve the problem by using the non-local low rank regularized compressed sensing reconstruction algorithm to output the reconstructed image;
xj表示分块后的图像块矩阵按列展开成的列向量,j为图像块的次序,共d块;x j represents a column vector in which the block image matrix after the block is expanded into columns, and j is the order of the image blocks, and is a total of d blocks;
φj表示xj的测量矩阵,根据采样率选择行数,列数由图像块的尺寸决定;Φ j represents a measurement matrix of x j , and the number of rows is selected according to the sampling rate, and the number of columns is determined by the size of the image block;
yj为每一个图像块展成列向量的测量值;y j is a measured value of a column vector for each image block;
所述的步骤(2)中的分块算法如下:The blocking algorithm in the step (2) is as follows:
步骤1:计算图像X∈Rm×n垂直方向梯度矩阵Dv和水平方向梯度矩阵Dh:Step 1: Calculate the image X∈R m×n vertical direction gradient matrix D v and horizontal direction gradient matrix D h :
其中,X(i,j)表示图像矩阵X中处于i行j列的像素值,Dv(i,j)、Dv(i,j)分别表示图像矩阵X中处于i行j列的垂直方向梯度和水平方向梯度。Where X(i,j) represents the pixel value of i row j column in image matrix X, and D v (i,j), D v (i,j) respectively represent the vertical of i row j column in image matrix X Directional gradient and horizontal gradient.
步骤2:将图像X划分成互不重叠的r×r的基础块,r取2的倍数,若不足r×r,用0补齐。Step 2: The image X is divided into basic blocks of r × r which do not overlap each other, and r is a multiple of 2, and if it is less than r × r, it is complemented by 0.
步骤3:分别对垂直方向梯度矩阵Dv和水平方向梯度矩阵Dh以基础块为单元进行池化操作,分别得出垂直方向平滑矩阵和水平方向平滑矩阵根据垂直方向的梯度和水平方向的梯度分别计算出表示每一个基础块的垂直和水平方向的平滑度:Step 3: Perform a pooling operation on the vertical direction gradient matrix D v and the horizontal direction gradient matrix D h as a unit, respectively, to obtain a vertical direction smoothing matrix And horizontal direction smoothing matrix The vertical and horizontal smoothness of each basic block is calculated according to the gradient in the vertical direction and the gradient in the horizontal direction, respectively:
其中,Sv(p,q)、Sh(p,q)分别表示以基础块为单位的第p行第q列基础块的垂直方向平滑度和水平方向平滑度;ε为常数,避免分母为零,当取ε=1时,Sv(p,q),Sh(p,q)∈(1,255],值越大代表平滑性越好。Where S v (p, q), S h (p, q) respectively represent the vertical smoothness and horizontal smoothness of the p-th row q-th column basic block in units of the basic block; ε is a constant, avoiding the denominator Zero, when taking ε = 1, S v (p, q), S h (p, q) ∈ (1, 255), the larger the value, the better the smoothness.
步骤4:将Sv的每一行的元素分成两类,设置阈值Tv,Sv(i,j)<Tv为非平滑块,Sv(i,j)≥Tv为平滑块,记Nv(i)为第i行平滑块个数,计算行分割参数:Step 4: Divide the elements of each row of S v into two categories, set a threshold T v , S v (i, j) < T v is a non-smooth block, and S v (i, j) ≥ T v is a smooth block, N v (i) is the number of smoothing blocks in the ith row, and the row segmentation parameters are calculated:
表示第i行平滑块所占比例,因为图像结构具有区域性,所以采用平滑块个数占比作为行分割的参考值。Indicates the proportion of the smoothing block of the i-th row. Since the image structure has a regionality, the proportion of the number of smoothing blocks is used as a reference value for the row division.
步骤5:根据垂直平滑度矩阵Sv对基础块图像从上至下进行行块的分割,Rv存储行块中的最后一行基础块的行索引,length(Rv)为最终行块个数。Step 5: Perform row segmentation on the base block image from top to bottom according to the vertical smoothness matrix S v , and R v store the row index of the last row of the basic block in the row block, and length(R v ) is the final row block number. .
5.1:初始i=1,j=1,Rv(j)=1,σv为常数,表示行块分割阈值。5.1: Initial i=1, j=1, R v (j)=1, σ v is a constant, indicating the line block partitioning threshold.
5.2:i=i+1,判断|Lv(i)-Lv(i-1)|<σv,如果成立,表示第i基础块行和第i-1基础块行垂直方向的平滑度在阈值范围内,则将第i基础块行归入包含第i-1基础块行的同一行块中,此时Rv(j)=i;否则,表示两基础块行的垂直方向平滑度不在阈值内,则将第i基础块行划分到下一行块中,此时j=j+1,Rv(j)=i。5.2: i=i+1, judge |L v (i)-L v (i-1)|<σ v , if it is true, indicating the smoothness of the vertical direction of the ith base block row and the i-1 base block row Within the threshold range, the i-th base block row is classified into the same row block containing the i-1th base block row, at which time R v (j)=i; otherwise, the vertical smoothness of the two basic block rows is indicated. If it is not within the threshold, the i-th base block row is divided into the next row of blocks, at this time j=j+1, R v (j)=i.
5.3:判断如果成立,表示行块划分完成,执行步骤6,如果不成立,执行5.2。5.3: Judging If it is established, it indicates that the row block division is completed, and step 6 is performed. If not, execute 5.2.
步骤6:对划分的每一行块,根据水平平滑度矩阵Sh从左至右进行列分割,分割方法与行分割方法类似。Step 6: For each row block that is divided, the column segmentation is performed from left to right according to the horizontal smoothness matrix S h , and the segmentation method is similar to the row segmentation method.
6.1:初始j=0,Rv(0)=0;6.1: initial j=0, R v (0)=0;
6.2:j=j+1,提取Sh的第j个行块sh,sh=Sh(Rv(j-1)+1:Rv(j),:),对sh的每一列的元素分成两类,设置阈值Th,sh(i,j)<Th为非平滑块,sh(i,j)≥Th为平滑块,记Nh(k)表示sh第k列平滑块个数,计算列分割参数:6.2: j = j + 1, S h extracting j-th line block s h, s h = S h (R v (j-1) +1: R v (j), :), each pair of s h The elements of a column are divided into two categories, the threshold T h is set , s h (i, j) < T h is a non-smooth block, and s h (i, j) ≥ T h is a smooth block, and N h (k) represents s h The kth column smoothes the number of blocks and calculates the column segmentation parameters:
其中,Lh(k)表示sh第k列平滑块所占比例,Rv存储分割行块的最后一行基础块的行索引,Where L h (k) represents the proportion of the smooth block of the kth column of s h , and R v stores the row index of the base block of the last row of the split line block,
Rv(j)-Rv(j-1)表示sh每一列中基础块的个数,其值等于sh每一列中元素个数,。 R v (j) -R v ( j-1) s h represents the number of blocks in each column base, which is equal to the number of elements in each column s h,.
6.3:对sh列分割,Rh(j,k)存储分割第j个行块的第k个列块的最后一列索引。length(Rh(j,:))为sh列块个数,由于每一行块的平滑度不一样,所以每一行块的分割列块数量不一样。6.3: For the s h column partition, R h (j, k) stores the last column index of the kth column block dividing the jth row block. Length(R h (j,:)) is the number of s h column blocks. Since the smoothness of each row block is different, the number of divided column blocks of each row block is different.
6.4:初始i=1,k=1,Rh(j,k)=1,σh为常数,分割列块阈值。6.4: Initial i=1, k=1, R h (j, k)=1, σ h is a constant, and the column block threshold is divided.
6.5:i=i+1,判断|Lh(k)-Lh(k-1)|<σh,如果成立,表示第j个行块中的第k基础块列和第k-1基础块列水平方向的平滑度在阈值范围内,则将第k基础块列归入包含第k-1基础块列的同一列块中,此时Rh(j,k)=i;否则,表示两基础块列的水平方向平滑度不在阈值内,则将第k基础块列划分到下一列块中,此时k=k+1,Rh(j,k)=i。6.5: i=i+1, judge |L h (k)-L h (k-1)|<σ h , if it is true, represent the kth basic block column and the k-1th base in the jth row block If the smoothness of the horizontal direction of the block column is within the threshold range, the kth base block column is classified into the same column block containing the k-1th basic block column, and then R h (j, k)=i; otherwise, If the horizontal smoothness of the two basic block columns is not within the threshold, the kth basic block column is divided into the next column block, where k=k+1, R h (j, k)=i.
6.6:判断如果不成立,表示第j行块的列划分未完成,执行6.5;如果成立,判断j=length(Rv),如果不成立,执行步骤6.2,如果成立,全部分块完成,保存Rh(j,k)。6.6: Judgment If not, it indicates that the column division of the jth row block is not completed, and 6.5 is performed; if it is, judge j=length(R v ), if not, execute step 6.2. If it is established, the whole partial block is completed, and R h (j, k).
所述的步骤(3)中的测量率采用自适应分配算法,算法如下:The measurement rate in the step (3) is an adaptive allocation algorithm, and the algorithm is as follows:
步骤1:输入图像整体测量率M,计算图像块xj,j=1,...,q中所有基础块的平滑度和:Step 1: Enter the overall measurement rate M of the image, and calculate the smoothness of all the basic blocks in the image block x j , j=1,...,q:
步骤2:根据子块平滑度分配测量率:Step 2: Assign measurement rate based on sub-block smoothness:
其中,M0>0为块最低测量率。Where M 0 >0 is the lowest measurement rate of the block.
所述的步骤(4)采用非局部低秩正则化压缩感知重构算法进行重构,重构时将列向量重组为图像后进行处理;The step (4) is performed by using a non-local low rank regularized compressed sensing reconstruction algorithm, and the column vector is reconstructed into an image and processed after reconstruction;
由于采用了上述的技术方案,本发明的有益效果是:通过采用本发明的分块压缩感知图像重构算法,有效地减少了分块压缩感知带来的块效应;并且与现有的自适应分块测量方法比,有更高的峰值信噪比以及更好的图像视觉效果。Since the above technical solution is adopted, the beneficial effects of the present invention are: by using the block compressed sensing image reconstruction algorithm of the present invention, the block effect caused by the block compression sensing is effectively reduced; and the existing adaptive The block measurement method has a higher peak signal-to-noise ratio and better image visual effects.
附图说明DRAWINGS
图1是本发明的一种基于梯度分块自适应测量的压缩感知方法算法总体流程图;1 is a general flow chart of a method for compressive sensing based on gradient block adaptive measurement according to the present invention;
图2是本发明的基于梯度不均匀分块的算法流程图;2 is a flow chart of an algorithm based on gradient uneven block of the present invention;
具体实施方式Detailed ways
下面结合附图和一个典型的具体实施方式对本发明的一种基于梯度分块自适应测量的压缩感知方法做详细说明,该算法具体包括如下部分:A method for compressive sensing based on gradient block adaptive measurement according to the present invention will be described in detail below with reference to the accompanying drawings and a typical embodiment. The algorithm specifically includes the following parts:
压缩端利用基于梯度不均匀分块自适应测量方法对图像进行压缩,步骤如下:The compression side compresses the image by using a gradient-based non-uniform block adaptive measurement method. The steps are as follows:
输入待处理图像X∈Rm×n,计算图像水平方向和垂直方向梯度;将图像梯度按照基础块大小进行池化降维,得到图像基础块的水平方向和垂直方向的平滑度;根据垂直方向的平滑度对图像从上到下分割成行块,然后对每一个行块根据水平方向平滑度从左至右分割成列块,由此完成不均匀分块,本发明中采用r×r基础块,增大分割基础单元,降低计算量。具体步骤如下:Input the image to be processed X∈R m×n , calculate the horizontal and vertical gradients of the image; pool the image gradient according to the basic block size to obtain the smoothness of the horizontal and vertical directions of the image basic block; according to the vertical direction The smoothness of the image is divided into line blocks from top to bottom, and then each line block is divided into column blocks from left to right according to the horizontal smoothness, thereby completing uneven block, and the r×r basic block is used in the present invention. Increase the split base unit and reduce the amount of calculation. Specific steps are as follows:
步骤1:计算图像X∈Rm×n垂直方向梯度矩阵Dv和水平方向梯度矩阵Dh:Step 1: Calculate the image X∈R m×n vertical direction gradient matrix D v and horizontal direction gradient matrix D h :
其中,X(i,j)表示图像矩阵X中处于i行j列的像素值,Dv(i,j)、Dv(i,j)分别表示图像矩阵X中处于i行j列的垂直方向梯度和水平方向梯度。Where X(i,j) represents the pixel value of i row j column in image matrix X, and D v (i,j), D v (i,j) respectively represent the vertical of i row j column in image matrix X Directional gradient and horizontal gradient.
步骤2:将图像X划分成互不重叠的r×r的基础块,r取2的倍数,若不足r×r,用0补齐。Step 2: The image X is divided into basic blocks of r × r which do not overlap each other, and r is a multiple of 2, and if it is less than r × r, it is complemented by 0.
步骤3:分别对垂直方向梯度矩阵Dv和水平方向梯度矩阵Dh以基础块为单元进行池化操作,分别得出垂直方向平滑矩阵和水平方向平滑矩阵根据垂直方向的梯度和水平方向的梯度分别计算出表示每一个基础块的垂直和水平方向的平滑度:Step 3: Perform a pooling operation on the vertical direction gradient matrix D v and the horizontal direction gradient matrix D h as a unit, respectively, to obtain a vertical direction smoothing matrix And horizontal direction smoothing matrix The vertical and horizontal smoothness of each basic block is calculated according to the gradient in the vertical direction and the gradient in the horizontal direction, respectively:
其中,Sv(p,q)、Sh(p,q)分别表示以基础块为单位的第p行第q列基础块的垂直方向平滑度和水平方向平滑度;ε为常数,避免分母为零,当取ε=1时,Sv(p,q),Sh(p,q)∈(1,255],值越大代表平滑性越好。Where S v (p, q), S h (p, q) respectively represent the vertical smoothness and horizontal smoothness of the p-th row q-th column basic block in units of the basic block; ε is a constant, avoiding the denominator Zero, when taking ε = 1, S v (p, q), S h (p, q) ∈ (1, 255), the larger the value, the better the smoothness.
步骤4:将Sv的每一行的元素分成两类,设置阈值Tv,Sv(i,j)<Tv为非平滑块,Sv(i,j)≥Tv为平滑块,记Nv(i)为第i行平滑块个数,计算行分割参数:Step 4: Divide the elements of each row of S v into two categories, set a threshold T v , S v (i, j) < T v is a non-smooth block, and S v (i, j) ≥ T v is a smooth block, N v (i) is the number of smoothing blocks in the ith row, and the row segmentation parameters are calculated:
表示第i行平滑块所占比例,因为图像结构具有区域性,所以采用平滑块个数占比作为行分割的参考值。Indicates the proportion of the smoothing block of the i-th row. Since the image structure has a regionality, the proportion of the number of smoothing blocks is used as a reference value for the row division.
步骤5:根据垂直平滑度矩阵Sv对基础块图像从上至下进行行块的分割,Rv存储行块中的最后一行基础块的行索引,length(Rv)为最终行块个数。Step 5: Perform row segmentation on the base block image from top to bottom according to the vertical smoothness matrix S v , and R v store the row index of the last row of the basic block in the row block, and length(R v ) is the final row block number. .
5.1:初始i=1,j=1,Rv(j)=1,σv为常数,表示行块分割阈值。5.1: Initial i=1, j=1, R v (j)=1, σ v is a constant, indicating the line block partitioning threshold.
5.2:i=i+1,判断|Lv(i)-Lv(i-1)|<σv,如果成立,表示第i基础块行和第i-1基础块行垂直方向的平滑度在阈值范围内,则将第i基础块行归入包含第i-1基础块行的同一行块中,此时Rv(j)=i;否则,表示两基础块行的垂直方向平滑度不在阈值内,则将第i基础块行划分到下一行块中,此时j=j+1,Rv(j)=i。5.2: i=i+1, judge |L v (i)-L v (i-1)|<σ v , if it is true, indicating the smoothness of the vertical direction of the ith base block row and the i-1 base block row Within the threshold range, the i-th base block row is classified into the same row block containing the i-1th base block row, at which time R v (j)=i; otherwise, the vertical smoothness of the two basic block rows is indicated. If it is not within the threshold, the i-th base block row is divided into the next row of blocks, at this time j=j+1, R v (j)=i.
5.3:判断如果成立,表示行块划分完成,执行步骤6,如果不成立,执行5.2。5.3: Judging If it is established, it indicates that the row block division is completed, and step 6 is performed. If not, execute 5.2.
步骤6:对划分的每一行块,根据水平平滑度矩阵Sh从左至右进行列分割,分割方法与行分割方法类似。Step 6: For each row block that is divided, the column segmentation is performed from left to right according to the horizontal smoothness matrix S h , and the segmentation method is similar to the row segmentation method.
6.1:初始j=0,Rv(0)=0;6.1: initial j=0, R v (0)=0;
6.2:j=j+1,提取Sh的第j个行块sh,sh=Sh(Rv(j-1)+1:Rv(j),:),对sh的每一列的元素分成两类,设置阈值Th,sh(i,j)<Th为非平滑块,sh(i,j)≥Th为平滑块,记Nh(k)表示sh第k列平滑块个数,计算列分割参数:6.2: j = j + 1, S h extracting j-th line block s h, s h = S h (R v (j-1) +1: R v (j), :), each pair of s h The elements of a column are divided into two categories, the threshold T h is set , s h (i, j) < T h is a non-smooth block, and s h (i, j) ≥ T h is a smooth block, and N h (k) represents s h The kth column smoothes the number of blocks and calculates the column segmentation parameters:
其中,Lh(k)表示sh第k列平滑块所占比例,Rv存储分割行块的最后一行基础块的行索引,Where L h (k) represents the proportion of the smooth block of the kth column of s h , and R v stores the row index of the base block of the last row of the split line block,
Rv(j)-Rv(j-1)表示sh每一列中基础块的个数,其值等于sh每一列中元素个数,。 R v (j) -R v ( j-1) s h represents the number of blocks in each column base, which is equal to the number of elements in each column s h,.
6.3:对sh列分割,Rh(j,k)存储分割第j个行块的第k个列块的最后一列索引。length(Rh(j,:))为sh列块个数,由于每一行块的平滑度不一样,所以每一行块的分割列块数量不一样。6.3: For the s h column partition, R h (j, k) stores the last column index of the kth column block dividing the jth row block. Length(R h (j,:)) is the number of s h column blocks. Since the smoothness of each row block is different, the number of divided column blocks of each row block is different.
6.4:初始i=1,k=1,Rh(j,k)=1,σh为常数,分割列块阈值。6.4: Initial i=1, k=1, R h (j, k)=1, σ h is a constant, and the column block threshold is divided.
6.5:i=i+1,判断|Lh(k)-Lh(k-1)|<σh,如果成立,表示第j个行块中的第k基础块列和第k-1基础块列水平方向的平滑度在阈值范围内,则将第k基础块列归入包含第k-1基础块列的同一列块中,此时Rh(j,k)=i;否则,表示两基础块列的水平方向平滑度不在阈值内,则将第k基础块列划分到下一列块中,此时k=k+1,Rh(j,k)=i。6.5: i=i+1, judge |L h (k)-L h (k-1)|<σ h , if it is true, represent the kth basic block column and the k-1th base in the jth row block If the smoothness of the horizontal direction of the block column is within the threshold range, the kth base block column is classified into the same column block containing the k-1th basic block column, and then R h (j, k)=i; otherwise, If the horizontal smoothness of the two basic block columns is not within the threshold, the kth basic block column is divided into the next column block, where k=k+1, R h (j, k)=i.
6.6:判断如果不成立,表示第j行块的列划分未完成,执行6.5;如果成立,判断j=length(Rv),如果不成立,执行步骤6.2,如果成立,全部分块完成,保存Rh(j,k)。6.6: Judgment If not, it indicates that the column division of the jth row block is not completed, and 6.5 is performed; if it is, judge j=length(R v ), if not, execute step 6.2. If it is established, the whole partial block is completed, and R h (j, k).
然后根据压缩图像所需的采样率M和每个块的平滑度分配每个块的测量率Mj,j={1,2,...,d},具体步骤如下:Then, according to the sampling rate M required for the compressed image and the smoothness of each block, the measurement rate M j , j={1, 2, . . . , d} of each block is allocated, and the specific steps are as follows:
步骤1:输入图像整体测量率M,计算图像块xj,j=1,...,q中所有基础块的平滑度和:Step 1: Enter the overall measurement rate M of the image, and calculate the smoothness of all the basic blocks in the image block x j , j=1,...,q:
步骤2:根据子块平滑度分配测量率:Step 2: Assign measurement rate based on sub-block smoothness:
其中,M0>0为块最低测量率。Where M 0 >0 is the lowest measurement rate of the block.
最后将元素数量相同的块分成一类,生成同尺寸的高斯随机正交矩阵,结合每个块的测量率Mj,选择高斯随机正交矩阵的前round(Mj×length(xj))行作为测量矩阵φj;对数据进行测量,得到测量值y=Φx=diag(φ1,φ2,...,φd)[x1;x2;...;xd],;Finally, the blocks with the same number of elements are divided into one class, and a Gaussian random orthogonal matrix of the same size is generated. Combining the measurement rate M j of each block, the front round (M j ×length(x j )) of the Gaussian random orthogonal matrix is selected. The line is used as the measurement matrix φ j ; the data is measured to obtain a measured value y = Φx = diag (φ 1 , φ 2 , ..., φ d ) [x 1 ; x 2 ;...; x d ];
解压端采用非局部低秩正则化压缩感知重构算法,具体步骤为:The decompression end adopts a non-local low rank regularization compressed sensing reconstruction algorithm. The specific steps are as follows:
步骤1:根据测量值、块测量率、行分割位置和测量矩阵,采用DCT软阈值算法得到初始估计图像x(0);Step 1: According to the measured value, block measurement rate, line segmentation position and measurement matrix, the initial estimated image x (0) is obtained by DCT soft threshold algorithm;
步骤2:初始化,k=1,x(k)=x(0),k表示迭代次数。以步长5将x1划分成大小为6×6重叠的图像参考块,并根据每一个参考块在图像x1中搜索44个最相似的相似块。相似度的判断标准,本发明采用向量的余弦夹角函数进行判断:Step 2: Initialization, k=1, x (k) = x (0) , k represents the number of iterations. The x 1 is divided into image reference blocks of size 6 × 6 in steps of 5, and 44 most similar similar blocks are searched in the image x 1 according to each reference block. The criterion for judging the similarity, the present invention uses the cosine angle function of the vector to judge:
其中,表示图像x(k)的第i个参考块的列向量,表示图像x(k)中大小为6×6的图像块的列向量,c表示图像块与参考块的相似度,值越大,相似度越大,最大值为1。将包含参考块在内的45个相似块列向量组成相似块矩阵Xi,其中,Xi=Rix=[Ri0x,Ri1x,...,Riqx],R表示提取块操作,q=45。among them, a column vector representing the i-th reference block of the image x (k) , Represents a column vector of an image block of size 6 × 6 in image x (k) , and c represents an image block Reference block The similarity, the larger the value, the greater the similarity, the maximum value is 1. The 45 similar block column vectors including the reference block are composed into a similar block matrix X i , where X i =R i x=[R i0 x,R i1 x,...,R iq x], and R represents extraction Block operation, q=45.
步骤3:建立模型,相似块矩阵Xi的低秩模型为:Step 3: Create a model. The low rank model of the similar block matrix X i is:
其中,为高斯噪声的方差。among them, Is the variance of Gaussian noise.
将低秩模型作为重构模型的正则项为:The regular term for the low rank model as the reconstruction model is:
其中,η、λ为正则化参数,重构时设置为常数;L(Li,ε)表示秩替代函数,采用核函数作为秩替代函数, Where η and λ are regularization parameters, and are set as constants during reconstruction; L(L i , ε) represents a rank substitution function, and a kernel function is used as a rank substitution function.
采用交替求解法,转化为:Using the alternating solution method, convert to:
步骤4:求解相似块矩阵Xi的低秩矩阵Li,采用奇异值收缩算法可得:Step 4: Solution similar blocks low-rank matrix L i X i of the matrix, Singular Value shrinkage algorithm available:
其中,σj表示的第j个奇异值,UΣVT是的奇异值分解矩阵,(x)+=max{x,0}。among them, σ j indicates The jth singular value, UΣV T is The singular value decomposition matrix, (x) + = max{x, 0}.
步骤5,求解重构图像判断终止条件,如满足输出重构图像,否则,当mod(k,T)=0时,对每一个参考块重新搜索最相似的45个相似块组成相似块矩阵Xi,转步骤3。其中,表示对第i个相似块组中的相似块还原到原图像位置的操作, Step 5, solving the reconstructed image The termination condition is judged if the output reconstructed image is satisfied. Otherwise, when mod(k, T)=0, the most similar 45 similar blocks are re-searched for each reference block to form a similar block matrix X i , and the process proceeds to step 3. among them, Representing an operation of restoring a similar block in the i-th similar block group to the original image position,
应当认识到,以上描述只是本发明的一个特定实施例,本发明并不仅仅局限于以上图示或描述的特定的结构,权利要求将覆盖本发明的实质精神及范围内的所有变化方案。It is to be understood that the foregoing description is only a particular embodiment of the present invention, and the invention is not limited to the specific structures shown and described herein.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811181710.3A CN109448065B (en) | 2018-10-11 | 2018-10-11 | A Compressed Sensing Method Based on Gradient Block Adaptive Measurement |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811181710.3A CN109448065B (en) | 2018-10-11 | 2018-10-11 | A Compressed Sensing Method Based on Gradient Block Adaptive Measurement |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109448065A true CN109448065A (en) | 2019-03-08 |
CN109448065B CN109448065B (en) | 2023-07-25 |
Family
ID=65545399
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811181710.3A Active CN109448065B (en) | 2018-10-11 | 2018-10-11 | A Compressed Sensing Method Based on Gradient Block Adaptive Measurement |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109448065B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110418137A (en) * | 2019-07-31 | 2019-11-05 | 东华大学 | A cross-subset-guided measurement rate control method for residual block sets |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070248164A1 (en) * | 2006-04-07 | 2007-10-25 | Microsoft Corporation | Quantization adjustment based on texture level |
CN103440675A (en) * | 2013-07-30 | 2013-12-11 | 湖北工业大学 | Overall situation reconstitution optimization model construction method for image block compressed sensing |
CN107154061A (en) * | 2017-05-09 | 2017-09-12 | 北京航宇天穹科技有限公司 | The regularization coding/decoding method that a kind of splits' positions are perceived |
-
2018
- 2018-10-11 CN CN201811181710.3A patent/CN109448065B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070248164A1 (en) * | 2006-04-07 | 2007-10-25 | Microsoft Corporation | Quantization adjustment based on texture level |
CN103440675A (en) * | 2013-07-30 | 2013-12-11 | 湖北工业大学 | Overall situation reconstitution optimization model construction method for image block compressed sensing |
CN107154061A (en) * | 2017-05-09 | 2017-09-12 | 北京航宇天穹科技有限公司 | The regularization coding/decoding method that a kind of splits' positions are perceived |
Non-Patent Citations (2)
Title |
---|
SIWANG ZHOU 等: "Block compressed sampling of image signals by saliency based adaptive partitioning", 《MULTIMEDIA TOOLS AND APPLICATIONS》 * |
杜秀丽等: "基于灰度共生矩阵的图像自适应分块压缩感知方法", 《计算机科学》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110418137A (en) * | 2019-07-31 | 2019-11-05 | 东华大学 | A cross-subset-guided measurement rate control method for residual block sets |
Also Published As
Publication number | Publication date |
---|---|
CN109448065B (en) | 2023-07-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102722896B (en) | Adaptive compressed sensing-based non-local reconstruction method for natural image | |
CN104159003B (en) | A kind of cooperateed with based on 3D filters the video denoising method rebuild with low-rank matrix and system | |
Zhang et al. | Improved total variation based image compressive sensing recovery by nonlocal regularization | |
CN105513026B (en) | One kind being based on the non local similar compressed sensing reconstructing method of image | |
CN106952317B (en) | Hyperspectral image reconstruction method based on structure sparsity | |
CN102332153B (en) | Kernel regression-based image compression sensing reconstruction method | |
CN109671029A (en) | Image denoising algorithm based on gamma norm minimum | |
CN112581378B (en) | Image blind deblurring method and device based on significance strength and gradient prior | |
CN108416821A (en) | A CT image super-resolution reconstruction method based on deep neural network | |
CN104869425A (en) | Compression and decompression method based on texture image similarity | |
CN105046651A (en) | Super-resolution reconstruction method and apparatus for image | |
CN103247028A (en) | Multi-hypothesis prediction block compressed sensing image processing method | |
Zhao et al. | Image compressive-sensing recovery using structured laplacian sparsity in DCT domain and multi-hypothesis prediction | |
CN113222812B (en) | Image reconstruction method based on information flow reinforced depth expansion network | |
Sun et al. | Compressive superresolution imaging based on local and nonlocal regularizations | |
CN113362338A (en) | Rail segmentation method, device, computer equipment and rail segmentation processing system | |
CN107154061B (en) | Regularized decoding method for block compressed sensing | |
CN112837220A (en) | A method for improving the resolution of infrared images and use thereof | |
CN102609920A (en) | Colorful digital image repairing method based on compressed sensing | |
CN109448065A (en) | A kind of compression sensing method based on the measurement of gradient block adaptive | |
CN109741258A (en) | Reconstruction-based image super-resolution methods | |
Revathy et al. | Dynamic domain classification for fractal image compression | |
CN111510719B (en) | Distributed compressed sensing coding and decoding method for video | |
CN110175965B (en) | Block Compressed Sensing Method Based on Adaptive Sampling and Smooth Projection | |
CN114841895A (en) | Image shadow removing method based on bidirectional mapping network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |