精华内容
下载资源
问答
  • stanford大学的matlab压缩感知工具箱sparseLab。安装方法看附带文档 关于压缩感知信号重构的matlab程序工具箱 (Toolbox on compressed perception of the signal reconstruction matlab program)
  • stanford大学的matlab压缩感知工具箱sparseLab说明文档
  • matlab压缩感知工具箱PART1

    热门讨论 2010-06-19 19:46:49
    stanford大学的matlab压缩感知工具箱sparseLab。安装方法看附带文档。
  • matlab压缩感知工具箱PART2

    热门讨论 2010-06-19 19:49:22
    stanford的matlab压缩感知工具箱,安装方法见sparselab210内的文档
  • 基于MATLAB的图像压缩感知算法的实现(含源文件).doc毕业设计(论文)课题名称基于MATLAB的图像压缩感知算法的实现目录目录I第1章 绪论31.1 研究背景和意义31.2 数据压缩技术41.2.1 传统数据压缩技术41.2.2 压缩感知...

    基于MATLAB的图像压缩感知算法的实现(含源文件).doc

    毕业设计(论文)

    课题

    名称基于MATLAB的图像压缩感知

    算法的实现

    目录

    目录I

    第1章 绪论3

    1.1 研究背景和意义3

    1.2 数据压缩技术4

    1.2.1 传统数据压缩技术4

    1.2.2 压缩感知理论(Compressed/Compressive Sensing/Sampling, CS)5

    1.3 无线传感器网络7

    1.3.1 无线传感器网络概述7

    1.3.2 无线传感器网络数据压缩的必要性9

    1.4 本文主要工作和内容安排10

    第2章 压缩感知理论11

    2.1压缩感知的前提条件—稀疏性和不相干性11

    2.2 三个关键技术14

    2.3信号的稀疏表示15

    2.4 观测矩阵设计17

    2.5 稀疏信号的重构19

    2.6 重构算法20

    2.7 压缩感知优势及不足21

    2.8 压缩感知在传感网中的观测方式22

    第3章 压缩感知理论应用概述24

    3.1 压缩成像24

    3.2 模拟信息转换24

    3.3 生物传感25

    3.4 本章小结25

    第4章 CS在无线传感网中的应用26

    4.1 研究背景26

    4.1.1 基于感知数据相关性的压缩26

    4.1.2传统压缩重构方法27

    4.1.3 图像压缩重构质量的评价27

    4.2 压缩感知理论算法对一维信号的实现29

    4.2.1 CS用于WSN的优势29

    4.2.2 观测重构模型30

    4.2.2 正交匹配追踪算法(OMP)30

    4.2.3 算法的实现及结果分析31

    4.3 压缩感知理论算法对二维图像重构的实现35

    4.3.1 基于小波变换的分块压缩感知理论35

    4.3.2 实现步骤36

    4.3.3 重构结果及分析39

    4.4 本章小结42

    第5章 总结与展望43

    5.1 工作总结43

    5.2 后续展望43

    参考文献44

    致谢46

    附录47

    摘要

    数据压缩技术是提高无线数据传输速度的有效措施之一。传统的数据压缩技术是基于奈奎斯特采样定律进行采样,并根据数据本身的特性降低其冗余度,从而达到压缩的目的。近年来出现的压缩感知理论(Compressed Sensing,CS)则不受制于奈奎斯特采样定律,它是采用非自适应线性投影来保持信号的原始结构,以直接采集压缩后的数据的方式,从尽量少的数据中提取尽量多的信息。

    本文阐述了压缩感知方法的基本原理,分析了CS理论框架及关键技术问题,介绍了压缩感知技术应用于无线传感的优势,并着重介绍了信号稀疏变换、观测矩阵设计和重构算法三个方面的最新进展,对研究中现存的难点问题进行了探讨。并运用matlab软件,在离散傅里叶变换(DFT)和离散余弦变换(DCT)分块CS的基础上,采用正交匹配追踪算法(OMP)实现了对一维信号和二维图像的高概率重构。将重构结果与原始信号对比,结果表明,只要采样数M(远小于奈奎斯特定理所需要的采样率)能够包含图像所需要的有用信息时,CS算法就能精确的完成对图像的重构,并且重构效果也比较好。

    关键词:压缩感知 无线传感 正交匹配 稀疏表示 观测矩阵

    Abstract

    The data compression technology is one of the efficient measures for increasing the speed of wireless data communication. Traditional data compression technology is based on Nyquist sampling theorem, reaching the goal of compression by decreasing redundancy of information. In recent years, Compressed Sensing(CS) comes out as a new sampling theory, it does not have to obey Nyquist sampling theorem, and it can keep the original structure of signals by attaining the non-adaptive linear projections. So, CS can gather the compressed data directly and get more information from less data.

    This paper reviews the theoretical framework and the key technical problems of compressed sensin

    展开全文
  • 基于MATLAB压缩感知

    2015-05-19 23:13:21
    本文档主要介绍了基于MATLAB压缩感知理论。
  • CS(matlab)压缩感知程序(用MATLAB编写)
  • matlab图像压缩感知

    热门讨论 2011-04-21 16:11:55
    图像压缩感知资料及代码,里面包含BP ,MP ,OMP,BCS等经典算法。
  • MATLAB压缩感知(内含完整代码)
  • 压缩感知MATLAB程序

    2017-12-28 17:20:58
    压缩感知,又称压缩采样,压缩传感。它作为一个新的采样理论,它通过开发信号的稀疏特性,在远小于Nyquist 采样率的条件下,用随机采样获取信号的离散样本,然后通过非线性重建算法完美的重建信号。压缩感知理论一经...
  • 很好的毕业设计,内附有程序说明,压缩感知的初学者最好都参考下。
  • 压缩感知,图像处理,运行的MATALB代码,有参考意义! 压缩感知,图像处理,运行的MATALB代码,有参考意义!
  • 医学图像压缩感知matlab
  • 来自Duke大学官网的贝叶斯压缩感知matlab函数包,亲测可用。 居家旅行必备!研究压缩感知必备!
  • MATLAB压缩感知恢复一维信号

    热门讨论 2010-04-16 22:08:07
    MATLAB压缩感知恢复一维信号例子,用高斯测量矩阵获得测量值,用OMP算法恢复原始一维信号。
  • Matlab编写的压缩感知的库函数,包括稀疏分解和重构
  • 压缩感知(Compressed sensing),也被称为压缩采样(Compressive sampling)或稀疏采样(Sparse sampling),是一种寻找欠定线性系统的稀疏解的技术。如果一个线性方程组未知数的数目超过方程的数目,这个方程组被称为...

    压缩感知(Compressed sensing),也被称为压缩采样(Compressive sampling)或稀疏采样(Sparse sampling),是一种寻找欠定线性系统的稀疏解的技术。如果一个线性方程组未知数的数目超过方程的数目,这个方程组被称为欠定,并且一般而言有无数个解。 但是,如果这个欠定系统只有唯一一个稀疏解,那么我们可以利用压缩感知理论和方法来寻找这个解。值得注意的是,不是所有欠定线性方程组都有稀疏解。

    压缩感知利用了很多信号中所存在的冗余(换言之,这些信号并非完全是噪声)。具体而言,很多信号都是稀疏的;在适当的表示域中,它们的很多系数都是等于或约等于零。

    在信号获取阶段,压缩感知在信号并不稀疏的域对信号进行线性测量。

    为了从线性测量中重构出原来的信号,压缩感知求解一个称为L1-范数正则化的最小二乘问题。从理论上可以证明,在某些条件下,这个正则化最小二乘问题的解正是原欠定线性系统的稀疏解

    % sparse_in_frequency.m
    
    %
    %This code demonstrate compressive sensing example. In this
    %example the signal is sparse in frequency domain and random samples
    %are taken in time domain.
    
    close all;
    clear all;
    
    %setup path for the subdirectories of l1magic
    % path(path, 'C:\MATLAB7\l1magic-1.1\Optimization');
    % path(path, 'C:\MATLAB7\l1magic-1.1\Data');
    
    
    %length of the signal
    N=1024;
    
    %Number of random observations to take
    K=256;
    
    %Discrete frequency of two sinusoids in the input signal
    k1=29;
    k2=100;
    
    n=0:N-1;
    
    %Sparse signal in frequency domain.
    x=sin(2*pi*(k1/N)*n)+sin(2*pi*(k2/N)*n);
    
    % This code demonstrates the compressive sensing using a sparse signal in frequency domain. The signal consists of summation of % two sinusoids of different frequencies in time domain. The signal is sparse in Frequency domain and therefore K random
    
    % measurements are taken in time domain.
    
    
    figure;
    subplot(2,1,1);
    plot(x)
    grid on;
    xlabel('Samples');
    ylabel('Amplitude');
    title('Original Signal,1024 samples with two different frequency sinsuoids');
    
    xf=fft(x);
    
    subplot(2,1,2);
    plot(abs(xf))
    grid on;
    xlabel('Samples');
    ylabel('Amplitude');
    title('Frequency domain, 1024 coefficients with 4-non zero coefficients');
    
    %creating dft matrix
    B=dftmtx(N);
    Binv=inv(B);  % The inverse discrete Fourier transform matrix, Binv, equals CONJ(dftmtx(N))/N.
    
    %Taking DFT of the signal
    xf = B*x.';
    
    %Selecting random rows of the DFT matrix
    q=randperm(N);
    
    %creating measurement matrix
    A=Binv(q(1:K),:);    % 在IDFT矩阵中任选K=256行
    
    %taking random time measurements
    y=(A*xf);   % 对x的fft后的xf(1024-by-1)的数据做IDFT得到256个时域稀疏采样值,通过plot(real(y))和原来的x对比,注意如何在时域中取K=256个采样值
    
    %Calculating Initial guess
    x0=A.'*y;  % 注意:待恢复时域信号xprec的DFT值xp的估计初值x0如何给? y 是时域稀疏采样值
    
    %Running the recovery Algorithm
    tic
    xp=l1eq_pd(x0,A,[],y,1e-5); %恢复的xp是频域信号
    toc
    
    %recovered signal in time domain
    xprec=real(Binv*xp);  % 做IDFT转换到时域
    
    figure;
    subplot(2,1,1)
    plot(abs(xf))   % 原信号的频谱
    grid on;
    xlabel('Samples');
    ylabel('Amplitude');
    title('Original Signal, Discrete Fourier Transform');
    
    subplot(2,1,2)
    plot(abs(xp),'r') %压缩采样恢复后的信号的频谱
    grid on;
    xlabel('Samples');
    ylabel('Amplitude');
    title(sprintf('Recovered Signal, Discrete Fourier Transform sampled with %d samples',K));
    
    figure;
    subplot(2,1,1);
    plot(x)
    grid on;
    xlabel('Samples');
    ylabel('Amplitude');
    title('Original Signal,1024 samples with two different frequency sinsuoids');
    
    subplot(2,1,2)
    plot(xprec,'r')
    grid on;
    xlabel('Samples');
    ylabel('Amplitude');
    title(sprintf('Recovered Signal in Time Domain'));
    
    %%%%%%%%%%%%%%%%%%漫长的分割线%%%%%%%%%%%%%%%%%%%%%%%%%%
    
    
    % sparse_in_time.m
    %
    %This code demonstrate compressive sensing example. In this
    %example the signal is sparse in time domain and random samples
    %are taken in frequency domain.
    
    close all;
    clear all;
    
    %setup path for the subdirectories of l1magic
    % path(path, 'C:\MATLAB7\l1magic-1.1\Optimization');
    % path(path, 'C:\MATLAB7\l1magic-1.1\Data');
    
    %number of samples per period
    s=4;
    
    %RF frequency
    f=4e9;
    
    %pulse repetition frequency
    prf=1/30e-9;
    
    %sampling frequency
    fs=s*f;
    
    %Total Simulation time
    T=30e-9;
    
    t=0:1/fs:T;
    
    %generating pulse train
    x=pulstran(t,15e-9,'gauspuls',f,0.5);
    
    %length of the signal
    N=length(x);
    
    %Number of random observations to take
    K=90;
    
    figure;
    subplot(2,1,1);
    plot(t,x)
    grid on;
    xlabel('Time');
    ylabel('Amplitude');
    title(sprintf('Original Signal, UWB Pulse RF freq=%g GHz',f/1e9));
    
    %taking Discrete time Fourier Transform of the signal
    xf=fft(x);
    
    subplot(2,1,2);
    plot(abs(xf))
    grid on;
    xlabel('Samples');
    ylabel('Amplitude');
    title('Discrete Fourier Transform of UWB pulse');
    
    
    %creating dft matrix
    B=dftmtx(N);
    Binv=inv(B);
    
    %Selecting random rows of the DFT matrix
    q=randperm(N);
    
    %creating measurement matrix
    A=B(q(1:K),:); % 在DFT矩阵中取前K=90行,B矩阵是481-by-481的
    
    %taking random frequency measurements
    y=(A*x.');  % y 是90-by-1的频域采样值
    
    % Calculating Initial guess
    x0=A.'*y;  % y 是90-by-1的频域采样值,注意恢复时域信号时初值如何给?
    
    %Running the recovery Algorithm
    tic
    xp=l1eq_pd(x0,A,[],y,1e-5);
    toc
    
    figure;
    subplot(2,1,1)
    plot(t,x)
    grid on;
    xlabel('Time');
    ylabel('Amplitude');
    title(sprintf('Original Signal, UWB Pulse RF freq=%g GHz',f/1e9));
    
    
    subplot(2,1,2)
    plot(t,real(xp),'r')
    grid on;
    xlabel('Time');
    ylabel('Amplitude');
    title(sprintf('Recovered UWB Pulse Signal with %d random samples',K));
    
    %%%%%%%%%%%%%%%%%%飘逸的分割线%%%%%%%%%%%%%%%%%%%%%%%%%%
    
    % 用到的函数
    % l1eq_pd.m
    %
    % Solve
    % min_x ||x||_1  s.t.  Ax = b
    %
    % Recast as linear program
    % min_{x,u} sum(u)  s.t.  -u <= x <= u,  Ax=b
    % and use primal-dual interior point method
    %
    % Usage: xp = l1eq_pd(x0, A, At, b, pdtol, pdmaxiter, cgtol, cgmaxiter)
    %
    % x0 - Nx1 vector, initial point.
    %
    % A - Either a handle to a function that takes a N vector and returns a K 
    %     vector , or a KxN matrix.  If A is a function handle, the algorithm
    %     operates in "largescale" mode, solving the Newton systems via the
    %     Conjugate Gradients algorithm.
    %
    % At - Handle to a function that takes a K vector and returns an N vector.
    %      If A is a KxN matrix, At is ignored.
    %
    % b - Kx1 vector of observations.
    %
    % pdtol - Tolerance for primal-dual algorithm (algorithm terminates if
    %     the duality gap is less than pdtol).  
    %     Default = 1e-3.
    %
    % pdmaxiter - Maximum number of primal-dual iterations.  
    %     Default = 50.
    %
    % cgtol - Tolerance for Conjugate Gradients; ignored if A is a matrix.
    %     Default = 1e-8.
    %
    % cgmaxiter - Maximum number of iterations for Conjugate Gradients; ignored
    %     if A is a matrix.
    %     Default = 200.
    %
    % Written by: Justin Romberg, Caltech
    % Email: jrom@acm.caltech.edu
    % Created: October 2005
    %
    
    function xp = l1eq_pd(x0, A, At, b, pdtol, pdmaxiter, cgtol, cgmaxiter)
    
    largescale = isa(A,'function_handle');
    
    if (nargin < 5), pdtol = 1e-3;  end
    if (nargin < 6), pdmaxiter = 50;  end
    if (nargin < 7), cgtol = 1e-8;  end
    if (nargin < 8), cgmaxiter = 200;  end
    
    N = length(x0);
    
    alpha = 0.01;
    beta = 0.5;
    mu = 10;
    
    gradf0 = [zeros(N,1); ones(N,1)];
    
    % starting point --- make sure that it is feasible
    if (largescale)
      if (norm(A(x0)-b)/norm(b) > cgtol)
        disp('Starting point infeasible; using x0 = At*inv(AAt)*y.');
        AAt = @(z) A(At(z));
        [w, cgres, cgiter] = cgsolve(AAt, b, cgtol, cgmaxiter, 0);
        if (cgres > 1/2)
          disp('A*At is ill-conditioned: cannot find starting point');
          xp = x0;
          return;
        end
        x0 = At(w);
      end
    else
      if (norm(A*x0-b)/norm(b) > cgtol)
        disp('Starting point infeasible; using x0 = At*inv(AAt)*y.');
        opts.POSDEF = true; opts.SYM = true;
        [w, hcond] = linsolve(A*A', b, opts);
        if (hcond < 1e-14)
          disp('A*At is ill-conditioned: cannot find starting point');
          xp = x0;
          return;
        end
        x0 = A'*w;
      end  
    end
    x = x0;
    u = (0.95)*abs(x0) + (0.10)*max(abs(x0));
    
    % set up for the first iteration
    fu1 = x - u;
    fu2 = -x - u;
    lamu1 = -1./fu1;
    lamu2 = -1./fu2;
    if (largescale)
      v = -A(lamu1-lamu2);
      Atv = At(v);
      rpri = A(x) - b;
    else
      v = -A*(lamu1-lamu2);
      Atv = A'*v;
      rpri = A*x - b;
    end
    
    sdg = -(fu1'*lamu1 + fu2'*lamu2);
    tau = mu*2*N/sdg;
    
    rcent = [-lamu1.*fu1; -lamu2.*fu2] - (1/tau);
    rdual = gradf0 + [lamu1-lamu2; -lamu1-lamu2] + [Atv; zeros(N,1)];
    resnorm = norm([rdual; rcent; rpri]);
    
    pditer = 0;
    done = (sdg < pdtol) | (pditer >= pdmaxiter);
    while (~done)
      
      pditer = pditer + 1;
      
      w1 = -1/tau*(-1./fu1 + 1./fu2) - Atv;
      w2 = -1 - 1/tau*(1./fu1 + 1./fu2);
      w3 = -rpri;
      
      sig1 = -lamu1./fu1 - lamu2./fu2;
      sig2 = lamu1./fu1 - lamu2./fu2;
      sigx = sig1 - sig2.^2./sig1;
      
      if (largescale)
        w1p = w3 - A(w1./sigx - w2.*sig2./(sigx.*sig1));
        h11pfun = @(z) -A(1./sigx.*At(z));
        [dv, cgres, cgiter] = cgsolve(h11pfun, w1p, cgtol, cgmaxiter, 0);
        if (cgres > 1/2)
          disp('Cannot solve system.  Returning previous iterate.  (See Section 4 of notes for more information.)');
          xp = x;
          return
        end
        dx = (w1 - w2.*sig2./sig1 - At(dv))./sigx;
        Adx = A(dx);
        Atdv = At(dv);
      else
        w1p = -(w3 - A*(w1./sigx - w2.*sig2./(sigx.*sig1)));
        H11p = A*(sparse(diag(1./sigx))*A');
        opts.POSDEF = true; opts.SYM = true;
        [dv,hcond] = linsolve(H11p, w1p);
        if (hcond < 1e-14)
          disp('Matrix ill-conditioned.  Returning previous iterate.  (See Section 4 of notes for more information.)');
          xp = x;
          return
        end
        dx = (w1 - w2.*sig2./sig1 - A'*dv)./sigx;
        Adx = A*dx;
        Atdv = A'*dv;
      end
      
      du = (w2 - sig2.*dx)./sig1;
      
      dlamu1 = (lamu1./fu1).*(-dx+du) - lamu1 - (1/tau)*1./fu1;
      dlamu2 = (lamu2./fu2).*(dx+du) - lamu2 - 1/tau*1./fu2;
      
      % make sure that the step is feasible: keeps lamu1,lamu2 > 0, fu1,fu2 < 0
      indp = find(dlamu1 < 0);  indn = find(dlamu2 < 0);
      s = min([1; -lamu1(indp)./dlamu1(indp); -lamu2(indn)./dlamu2(indn)]);
      indp = find((dx-du) > 0);  indn = find((-dx-du) > 0);
      s = (0.99)*min([s; -fu1(indp)./(dx(indp)-du(indp)); -fu2(indn)./(-dx(indn)-du(indn))]);
      
      % backtracking line search
      suffdec = 0;
      backiter = 0;
      while (~suffdec)
        xp = x + s*dx;  up = u + s*du; 
        vp = v + s*dv;  Atvp = Atv + s*Atdv; 
        lamu1p = lamu1 + s*dlamu1;  lamu2p = lamu2 + s*dlamu2;
        fu1p = xp - up;  fu2p = -xp - up;  
        rdp = gradf0 + [lamu1p-lamu2p; -lamu1p-lamu2p] + [Atvp; zeros(N,1)];
        rcp = [-lamu1p.*fu1p; -lamu2p.*fu2p] - (1/tau);
        rpp = rpri + s*Adx;
        suffdec = (norm([rdp; rcp; rpp]) <= (1-alpha*s)*resnorm);
        s = beta*s;
        backiter = backiter + 1;
        if (backiter > 32)
          disp('Stuck backtracking, returning last iterate.  (See Section 4 of notes for more information.)')
          xp = x;
          return
        end
      end
      
      
      % next iteration
      x = xp;  u = up;
      v = vp;  Atv = Atvp; 
      lamu1 = lamu1p;  lamu2 = lamu2p;
      fu1 = fu1p;  fu2 = fu2p;
      
      % surrogate duality gap
      sdg = -(fu1'*lamu1 + fu2'*lamu2);
      tau = mu*2*N/sdg;
      rpri = rpp;
      rcent = [-lamu1.*fu1; -lamu2.*fu2] - (1/tau);
      rdual = gradf0 + [lamu1-lamu2; -lamu1-lamu2] + [Atv; zeros(N,1)];
      resnorm = norm([rdual; rcent; rpri]);
      
      done = (sdg < pdtol) | (pditer >= pdmaxiter);
      
      disp(sprintf('Iteration = %d, tau = %8.3e, Primal = %8.3e, PDGap = %8.3e, Dual res = %8.3e, Primal res = %8.3e',...
        pditer, tau, sum(u), sdg, norm(rdual), norm(rpri)));
      if (largescale)
        disp(sprintf('                  CG Res = %8.3e, CG Iter = %d', cgres, cgiter));
      else
        disp(sprintf('                  H11p condition number = %8.3e', hcond));
      end
      
    end


    
    

    
    

    展开全文
  • 压缩感知l1重建算法matlab代码[用于压缩感知恢复的贝叶斯卷积神经网络]。 介绍 贝叶斯卷积神经网络(BCNN)是一种新的压缩感知(CS)恢复算法,它结合了卷积神经网络(CNN)和贝叶斯推理方法。 在本文中,我们显示出...
  • lws压缩感知matlab 代码

    2013-05-10 13:09:46
    陆吾生教授2010年压缩感知课程配套的matlab代码
  • 时域信号压缩传感,正交匹配追踪法(OMP)重构信号,注释比较详细
  • 压缩感知的正交匹配追踪算法——matlab程序 压缩感知的正交匹配追踪算法——matlab程序
  • 贝叶斯压缩感知matlab源代码

    热门讨论 2014-03-07 16:35:14
    从杜克大学网站上下载的贝叶斯压缩感知代码,该代码完全可以运行,是学习贝叶斯压缩感知的基础性代码。
  • 压缩传感,压缩感知,压缩采样,稀疏表达,稀疏表示,的入门例子
  • 该软件包具有用于约束和无约束 L1 最小化的求解器,这对于压缩感知很有用。 u = COORDL1BREG(A,f,lambda) 解决了最小化问题min_u ||u||_1 服从 A*u = f 其中 A 是 MxN 矩阵,f 是长度为 M 的向量。输入 lambda 是...
  • MATLAB 实现的压缩感知示例,如 R.Baraniuk,压缩感知,IEEE 信号处理杂志,[118],2007 年 7 月所述。该代码获取 2500 像素图像的 250 个平均随机测量值。 我们假设图像在 DCT 域中具有稀疏表示(实际上不是很稀疏...
  • 压缩感知代码,matlab,romp

    热门讨论 2011-04-20 19:49:10
    压缩感知matlab代码,matlab代码,matlab代码,matlab代码,
  • MATLAB源码集锦-基于压缩感知算法的数据压缩与复原代码
  • 压缩感知,又称压缩采样,压缩传感。它作为一个新的采样理论,它通过开发信号的稀疏特性,在远小于Nyquist 采样率的条件下,用随机采样获取信号的离散样本,然后通过非线性重建算法完美的重建信号。
  • 分布式压缩感知 matlab代码

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 597
精华内容 238
关键字:

matlab压缩感知

matlab 订阅