A kind of primary signal reconstructing method based on Second Generation WaveletsTechnical field
The invention belongs to field of data compression, more particularly to a kind of primary signal reconstructing method based on Second Generation Wavelets,The reconstruct to destructuring mass network data is perceived suitable for conventional compression.
Background technology
Compressed sensing as an emerging sampling theory, by using the sparse characteristic of data, can far below howUnder conditions of Qwest's sample rate, data sample of the data volume much smaller than primary signal is obtained, then by nonlinear algorithm weightStructure primary signal.
Traditional compressed sensing technology is developed for being applied to compression of images field, due to view data available pointThe form of battle array is indicated, and rarefaction representation can be carried out to it well as sparse base with first generation small echo.And for non-knotStructure mass network data, due to its obvious unstructured nature, it is right well to be difficult to as sparse base using first generation small echoIt carries out rarefaction representation, and this will cause compressed sensing to be remarkably decreased the quality of destructuring mass network data.
Second Generation Wavelets method, relative to Traditional Wavelet algorithm, is a kind of more fast and effectively wavelet transformation realization sideMethod, is independent of Fourier conversion, completes the construction to biorthog-onal wavelet filter in time domain completely.This building method existsStructured Design and self-adaptive construction aspect outstanding advantages compensate for the deficiency of traditional frequency domain building method.In compressed sensing technologyIn, be used as sparse base by Second Generation Wavelets carries out rarefaction representation to primary signal so that destructuring mass data energyEnough by good rarefaction representation.
The content of the invention
It is an object of the invention to propose a kind of primary signal reconstructing method based on Second Generation Wavelets, to solve traditional pressureContracting perceives the unworthiness problem for destructuring mass network data, to realize as big as possible compression ratio and as small as possibleDistortion.
To achieve the above object, technical scheme includes as follows:
A kind of primary signal reconstructing method based on Second Generation Wavelets, comprises the following steps:
Step 1:Rarefaction representation is carried out to primary signal, sparse coefficient is obtained by sparse base and primary signal;
Step 2:Primary signal is sampled, measured value is obtained by calculation matrix and primary signal;
Step 3:Sparse base, measured value and random number seed are stored;
Step 4:Sparse coefficient is obtained by iteration, primary signal is reconstructed using sparse base.
Further according to the primary signal reconstructing method based on Second Generation Wavelets, to primary signal described in step 1Rarefaction representation is carried out, sparse coefficient is obtained by sparse base and primary signal:
For the point set S={ x for giving1,x2,…,xn, there is x1<x2<…<xn, n=k × 2l, wherein n, k, l is just wholeNumber;
Matrix V for any one 2k × 2k, then VLTable takes following k × 2k half parts of matrix V, VUExpression takes squareK × 2k half parts of the top of battle array V, have
Be used as sparse base by Second Generation Wavelets carries out rarefaction representation to primary signal x so that destructuring mass dataRarefaction representation can be carried out to primary signal x by good rarefaction representation, carried out as follows:
(1-1) constructs the matrix M of 2k × 2k1,i,Wherein i=1 ..., n/2k, si=(i-1) 2k;
Matrix M1,iOrthogonal basis U1,i, U1,i=[Orth (M1,i)]T, Orth represents and seeks orthogonal Base computing;By U1,iObtain U1:
By U1Obtain first basic matrix Ψ1, first basic matrix Ψ1It is fortune in the middle of necessary when constructing sparse base ΨCalculate result, Ψ1=U1;
(1-2) constructs a matrix M of 2k × 2k2,i,Wherein i=1 ..., n/2k, byM2,iObtain U2,i, U2,i=[Orth (M2,i)]T;Pass through U again2,iObtain U2′:
Wherein n2=n/4k, by U2' obtain U2,Wherein In/2It is the unit square of (n/2) × (n/2)Battle array;
By U2And U1, obtain second basic matrix ψ2, ψ2=U1U2;
According to structural matrix M1,iMethod construct M1,2iAnd M1,2i-1;
(1-3) obtains j-th basic matrix ψj, wherein j=2 ..., log2(n/k) the matrix M of 2k × 2k, is constructedj,i,Wherein i=1 ..., n/2k, by Mj,iU can be obtainedj,i, Uj,i=[Orth (Mj,i)]T, byUj,iU can be obtainedj′:
By Uj' U can be obtainedj,
For j=2 ..., log2(n/k) U obtained byjAnd U1, j-th basic matrix ψ can be obtainedj, ψj=U1U2…Uj;
(1-4) obtains maximum log as j2(n/k) when, j-th basic matrix ψ of gainedjAs sparse base ψ, i.e.,
(1-5) obtains sparse coefficient s, specific s=ψ by sparse base ψ and primary signal x-1X, wherein ψ-1Expression asks diluteDredge the inverse matrix of base ψ;
The sparse coefficient s is exactly the result of primary signal x rarefaction representations on sparse base ψ.
Further according to the primary signal reconstructing method based on Second Generation Wavelets, to primary signal described in step 2Sampled, measured value is obtained by calculation matrix and primary signal;
One size of construction is the Bernoulli random matrixes of M × N as calculation matrix Φ, and each of which element is onlyIt is vertical to obey Bernoulli distributions, the i-th row, jth row element Φi,jRepresent:
Measured value y, y=Φ x=Φ ψ s=As are obtained by calculation matrix Φ and primary signal x.
Further according to the primary signal reconstructing method based on Second Generation Wavelets, to sparse base, survey described in step 3Value and random number seed are stored:
The random number seed of sparse base ψ, measured value y and Bernoulli random matrixes as calculation matrix Φ is carried outStorage, is called when needing and primary signal is reconstructed;
The random number seed refers to the true random number that computer is used to generate random matrix, each element in matrixAll it is to be calculated through algorithm by a true random number from computer system time, the true random number is random numberSeed;Certain in seed, in the case that algorithm is certain, the random matrix of acquisition is identical;In storage, it is not necessary to which storage is passedDefeated whole calculation matrix Φ, only stores random number seed;
Further according to the primary signal reconstructing method based on Second Generation Wavelets, obtained by iteration described in step 4To sparse coefficient, primary signal is reconstructed using sparse base, carried out as follows:
(4-1) obtains measured value y, random number seed and sparse base ψ, generates calculation matrix Φ, and by calculation matrix ΦSensing matrix A, A=Φ ψ are obtained with sparse base ψ;
(4-2) does not start residual error r during iteration0=y, does not start index set during iterationIteration timeThe initial value 1 of number t, wherein t is iterations, and maximum iteration is tmax;
The residual error r that (4-3) is obtained by last iterationt-1With the line number M of sensing matrix A, thresholding T is obtainedh,||·||22 norms of matrix are sought in expression, and wherein ts is threshold parameter ts, when rt represents the t times iterationResidual error;
By sensing matrix A and residual error rt-1A vectorial u of a length of N is obtained, there are u=abs (ATrt-1), abs () is representedModulus value;
For 1≤j≤N, calculate successively<rt-1,aj>,<·,·>Inner product of vectors is sought in expression, the N number of numerical value structure that will be obtainedInto vectorial u, thresholding T is more than in selection uhValue, the row sequence number j of correspondence sensing matrix A is constituted into set J0, the collection is combined into rowSequence number set, J0Represent the index that each iteration finds;
(4-4) index set Λt=Λt-1∪J0, row set At=At-1∪aj, seek y=AtstLeast square solution, obtain st'sEstimateUpdate residual errort=t+1;
Wherein ajThe jth row of representing matrix sensing matrix A, AtRepresent by index ΛtThe row set of the sensing matrix A for selecting;
If Λt=Λt-1, or t>tmax, or rt=0, then stop iteration;
Reconstruct gainedIn ΛtThere is nonzero term at place, and its value is last time iteration gained sparse coefficient st,It is iteration knotTo the final estimate of sparse coefficient s, s during beamtTo the estimate of sparse coefficient s during for the t times iteration;
At the end of (4-5) iteration, sparse coefficient is obtainedUsing sparse base ψ restructural primary signals, that is, obtain original letterThe estimate of number x
The estimateThe primary signal for as reconstructing.
The present invention compared with prior art, has the following advantages that:
1. the present invention to primary signal x using Second Generation Wavelets as sparse base due to carrying out rarefaction representation so that non-knotStructure mass data can solve traditional compressed sensing technology based on first generation small echo to non-by good rarefaction representationThe unworthiness problem of structuring mass data, obtains larger compression ratio, and Second Generation Wavelets are multinomials, so having meterCalculate fireballing advantage.
2. the present invention is due to carrying out the reconstruct of data using segmentation orthogonal matching pursuit, enabling by measured value y,That is the result after primary signal x compressions, primary signal x is recovered in the distortion range for allowing, and is provided to improving compression ratioSound assurance.
Brief description of the drawings
Fig. 1 is that a kind of primary signal reconstructing method based on Second Generation Wavelets of the present invention realizes flow chart.
Specific embodiment
To make the objects, technical solutions and advantages of the present invention become more apparent, below in conjunction with accompanying drawing, to of the present inventionScheme and effect are described in further detail.
As shown in figure 1, the present invention is to a kind of primary signal reconstructing method based on Second Generation Wavelets, specific steps are such asIt is lower described.
Step 1:Rarefaction representation is carried out to primary signal, sparse coefficient is obtained by sparse base and primary signal.
For the point set S={ x for giving1,x2,…,xn, wherein x1<x2<…<xn, n=k × 2l, n, k, l is just wholeNumber.
Matrix V for any one 2k × 2k, then VLTable takes following k × 2k half parts of matrix V, VUExpression takes squareK × 2k half parts of the top of battle array V, have
Be used as sparse base by Second Generation Wavelets carries out rarefaction representation to primary signal x so that destructuring mass dataRarefaction representation can be carried out to primary signal x by good rarefaction representation, carried out as follows:
(1-1) constructs the matrix M of 2k × 2k1,iIt is as follows:
Wherein i=1 ..., n/2k, si=(i-1) 2k.
Matrix M1,iOrthogonal basis U1,i, U1,i=[Orth (M1,i)]T, Orth is represented and is sought orthogonal Base computing, by U1,iObtain U1:
By U1Obtain first basic matrix Ψ1, first basic matrix Ψ1It is fortune in the middle of necessary when constructing sparse base ΨCalculate result, Ψ1=U1。
(1-2) constructs a matrix M of 2k × 2k2,i,Wherein i=1 ..., n/2k, byM2,iObtain U2, i, U2, i=[Orth (M2, i)]T, then by U2, iObtain U2′:
Wherein n2=n/4k, by U2' obtain U2,Wherein In/2It is the unit square of (n/2) × (n/2)Battle array.
By U2And U1, obtain second basic matrix ψ2, ψ2=U1U2。
According to structural matrix M1, iMethod construct M1,2iAnd M1,2i-1。
(1-3) obtains j-th basic matrix ψj, wherein j=2 ..., log2(n/k) the matrix M of 2k × 2k, is constructedJ, i,Wherein i=1 ..., n/2k, by MJ, iU can be obtainedJ, i, UJ, i=[Orth (MJ, i)]T, byUJ, iU can be obtainedj′:
By Uj' U can be obtainedj,
For j=2 ..., log2(n/k) U obtained byjAnd U1, j-th basic matrix Ψ can be obtainedj, ψj=U1U2…Uj。
(1-4) obtains maximum log as j2(n/k) when, j-th basic matrix ψ of gainedjAs sparse base ψ, i.e.,
(1-5) obtains sparse coefficient s, specific s=ψ by sparse base ψ and primary signal x-1x.Wherein ψ-1Expression asks diluteDredge the inverse matrix of base ψ.
The sparse coefficient s is exactly the result of primary signal x rarefaction representations on sparse base ψ.
Step 2:Primary signal is sampled, measured value is obtained by calculation matrix and primary signal.
One size of construction is the Bernoulli random matrixes of M × N as calculation matrix Φ, and each of which element is onlyIt is vertical to obey Bernoulli distributions, the i-th row, jth row element Φi,jRepresent:
Measured value y, y=Φ x=Φ ψ s=As are obtained by calculation matrix Φ and primary signal x.
Step 3:Sparse base, measured value and random number seed are stored.
The random number seed of sparse base ψ, measured value y and Bernoulli random matrixes as calculation matrix Φ is carried outStorage, is called when needing and primary signal is reconstructed.
The random number seed refers to the true random number that computer is used to generate random matrix, each element in matrixAll it is to be calculated through algorithm by a true random number from computer system time, the true random number is random numberSeed.Certain in seed, in the case that algorithm is certain, the random matrix of acquisition is identical.In storage, it is not necessary to which storage is passedDefeated whole calculation matrix Φ, only stores random number seed.
Step 4:Sparse coefficient is obtained by iteration, primary signal is reconstructed using sparse base.
Carry out as follows:
(4-1) obtains measured value y, random number seed and sparse base ψ, generates calculation matrix Φ, and by calculation matrix ΦSensing matrix A, A=Φ ψ are obtained with sparse base ψ;
(4-2) does not start residual error r during iteration0=y, does not start index set during iterationIteration timeThe initial value 1 of number t, wherein t is iterations, and maximum iteration is tmax;
The residual error r that (4-3) is obtained by last iterationt-1With the line number M of sensing matrix A, thresholding T is obtainedh,||·||22 norms of matrix, wherein t are asked in expressionsIt is threshold parameter ts, rtWhen representing the t times iterationResidual error;
By sensing matrix A and residual error rt-1Obtain a vectorial u of a length of N, u=abs (ATrt-1), abs () is represented and askedModulus value;
For 1≤j≤N, calculate successively<rt-1,aj>,<,·>Inner product of vectors is sought in expression, and the N number of numerical value that will be obtained is constitutedVectorial u, thresholding T is more than in selection uhValue, the row sequence number j of correspondence sensing matrix A is constituted into set J0, the collection is combined into row sequenceNumber set, J0Represent the index that each iteration finds;
(4-4) index set Λt=Λt-1∪J0, row set At=At-1∪aj, seek y=AtstLeast square solution, obtain st'sEstimateUpdate residual errort=t+1;
Wherein ajThe jth row of representing matrix sensing matrix A, AtRepresent by index ΛtThe row set of the sensing matrix A for selecting;
If ΛΛ=Λt-1, or t>tmax, or rt=0, then stop iteration;
Reconstruct gainedIn ΛtThere is nonzero term at place, and its value is last time iteration gained sparse coefficient st,For iteration terminatesWhen to the final estimate of sparse coefficient s, stTo the estimate of sparse coefficient s during for the t times iteration;
At the end of (4-5) iteration, sparse coefficient is obtainedUsing sparse base ψ restructural primary signals, that is, obtain original letterThe estimate of number x
The estimateThe primary signal for as reconstructing.
The above is only and the preferred embodiment of the present invention is described, technical scheme is not limited toThis, any known deformation that those skilled in the art are made on the basis of major technique of the invention design belongs to the present inventionClaimed technology category, the specific protection domain of the present invention is defined by the record of claims.