广义正交匹配追踪(Generalized OMP, gOMP)算法可以看作为OMP算法的一种推广,由文献[1]提出,第1作者本硕为哈工大毕业,发表此论文时在Korea University攻读博士学位。OMP每次只选择与残差相关最大的一个,而gOMP则是简单地选择最大的S个。之所以这里表述为“简单地选择”是相比于ROMP之类算法的,不进行任何其它处理,只是选择最大的S个而已。
下图为论文中提出的算法伪代码流程:

1 gOMP重构算法流程

参考文献的代码如下所示:

(1)构造K稀疏信号

% Generate K-sparse vector
%
% N : original signal size.
% K : sparsity level
%
% Output parameters
% x_omp : estimated signal
% iter_count: iteration count during estimating
%
% Written by Suhyuk (Seokbeop) Kwon
% Information System Lab., Korea Univ.
% http://isl.korea.ac.kr
function [x x_pos] = islsp_GenSparseVec(N, K)
KPos = K;
if N/2 < K
KPos = N-K;
end
randPos = ceil(N*rand( KPos, 1 ));
randPos = union(randPos,randPos);
leftPOsLen = KPos-length(randPos);
while leftPOsLen > 0
tmpPos = ceil(N*rand( leftPOsLen, 1 ));
randPos = union(tmpPos,randPos);
leftPOsLen = KPos-length(randPos);
end
if KPos < K
randPos = setxor((1:N), randPos);
end
x = zeros( N, 1 );
x(randPos) = randn( K, 1 );
x_pos = randPos;
end

(2)gOMP函数

% Estimate the sparse signal x using generalized OMP
%
% y : observation
% Phi : sensing matrix
% K : sparsity
% S : selection length
%
% Output parameters
% x_omp : estimated signal
% iter_count: iteration count during estimating
%
% Written by Suhyuk (Seokbeop) Kwon
% Information System Lab., Korea Univ.
% http://isl.korea.ac.kr
function [x_ommp iter_count] = islsp_EstgOMP(y, Phi, K, S, zero_threshold)
% Check the parameters
if nargin < 3
error('islsp_EstgOMP : Input arguments y ,Phi and K must be specified.');
end if nargin < 4
S = max(K/4, 1);
end if nargin < 5
zero_threshold = 1e-6;
end
% Initialize the variables
[nRows nCols] = size(Phi);
x_ommp = zeros(size(Phi,2), 1);
residual_prev = y;
supp = [];
iter_count = 0;
while (norm(residual_prev) > zero_threshold && iter_count < K)
iter_count = iter_count+1;
[supp_mag supp_idx] = sort(abs(Phi'*residual_prev), 'descend');
supp_n = union(supp, supp_idx(1:S));
if (length(supp_n) ~= length(supp)) && (length(supp_n) < nRows )
x_hat = Phi(:,supp_n)\y;
residual_prev = y - Phi(:,supp_n)*x_hat;
supp = supp_n;
else
break;
end
end
x_ommp(supp) = Phi(:,supp)\y; if nargout < 2
clear('iter_count');
end
end

(3)测试主函数

% Measurements size
m = 50;
% Signal size
N = 100;
% Sparsity level
K = 20;
% Generate sensing matrix
Phi = randn(m,N)/sqrt(m);
% Generate sparse vector
[x x_pos] = islsp_GenSparseVec(N, K);
y = Phi*x;
% Using default parameters
[x1 itr1] = islsp_EstgOMP(y, Phi, K);
% Find the sparse vector via selecting 4 indices
[x2 itr2] = islsp_EstgOMP(y, Phi, K, 4);
% Find the sparse vector via selecting 4 indices until the residual becomes 1e-12
[x3 itr3] = islsp_EstgOMP(y, Phi, K, 4, 1e-12);
disp('Mean square error');
[mse(x-x1) mse(x-x2) mse(x-x3)]
disp('Iteration number');
[itr1 itr2 itr3]
参考文献:
[1] Jian Wang, Seokbeop Kwon,Byonghyo Shim.  Generalized orthogonal matching pursuit, IEEE Transactions on Signal Processing, vol. 60, no. 12, pp.6202-6216, Dec. 2012.
Available at: http://islab.snu.ac.kr/paper/tsp_gOMP.pdf
[2] http://islab.snu.ac.kr/paper/gOMP.zip

[转]广义正交匹配追踪(gOMP)的更多相关文章

  1. 浅谈压缩感知(二十八):压缩感知重构算法之广义正交匹配追踪(gOMP)

    主要内容: gOMP的算法流程 gOMP的MATLAB实现 一维信号的实验与结果 稀疏度K与重构成功概率关系的实验与结果 一.gOMP的算法流程 广义正交匹配追踪(Generalized OMP, g ...

  2. 浅谈压缩感知(二十六):压缩感知重构算法之分段弱正交匹配追踪(SWOMP)

    主要内容: SWOMP的算法流程 SWOMP的MATLAB实现 一维信号的实验与结果 门限参数a.测量数M与重构成功概率关系的实验与结果 SWOMP与StOMP性能比较 一.SWOMP的算法流程 分段 ...

  3. 浅谈压缩感知(二十五):压缩感知重构算法之分段正交匹配追踪(StOMP)

    主要内容: StOMP的算法流程 StOMP的MATLAB实现 一维信号的实验与结果 门限参数Ts.测量数M与重构成功概率关系的实验与结果 一.StOMP的算法流程 分段正交匹配追踪(Stagewis ...

  4. [转]压缩感知重构算法之分段正交匹配追踪(StOMP)

    分段正交匹配追踪(StagewiseOMP)或者翻译为逐步正交匹配追踪,它是OMP另一种改进算法,每次迭代可以选择多个原子.此算法的输入参数中没有信号稀疏度K,因此相比于ROMP及CoSaMP有独到的 ...

  5. 浅谈压缩感知(二十二):压缩感知重构算法之正则化正交匹配追踪(ROMP)

    主要内容: ROMP的算法流程 ROMP的MATLAB实现 一维信号的实验与结果 测量数M与重构成功概率关系的实验与结果 一.ROMP的算法流程 正则化正交匹配追踪ROMP算法流程与OMP的最大不同之 ...

  6. 浅谈压缩感知(二十一):压缩感知重构算法之正交匹配追踪(OMP)

    主要内容: OMP的算法流程 OMP的MATLAB实现 一维信号的实验与结果 测量数M与重构成功概率关系的实验与结果 稀疏度K与重构成功概率关系的实验与结果 一.OMP的算法流程 二.OMP的MATL ...

  7. 浅谈压缩感知(九):正交匹配追踪算法OMP

    主要内容: OMP算法介绍 OMP的MATLAB实现 OMP中的数学知识 一.OMP算法介绍 来源:http://blog.csdn.net/scucj/article/details/7467955 ...

  8. opencv实现正交匹配追踪算法OMP

    //dic: 字典矩阵: //signal :待重构信号(一次只能重构一个信号,即一个向量) //min_residual: 最小残差 //sparsity:稀疏度 //coe:重构系数 //atom ...

  9. 压缩感知重构算法之压缩采样匹配追踪(CoSaMP)

    压缩采样匹配追踪(CompressiveSampling MP)是D. Needell继ROMP之后提出的又一个具有较大影响力的重构算法.CoSaMP也是对OMP的一种改进,每次迭代选择多个原子,除了 ...

随机推荐

  1. http://www.doframe.com/jetoolweb/index.html

    http://www.doframe.com/jetoolweb/index.html http://www.doframe.com/jetoolweb/html/tasks/orders.html# ...

  2. Design Pattern Visitor 訪问者设计模式

    訪问者设计模式是已经有了一组Person对象了,然后不同的訪问者訪问这组对象.会有不同效果. 这些訪问者实际上就是一个能够让Person对象组运行的动作行为等. 至于这些Person对象是怎样运行这些 ...

  3. 聚类算法K-Means, K-Medoids, GMM, Spectral clustering,Ncut

    聚类算法是ML中一个重要分支,一般采用unsupervised learning进行学习,本文根据常见聚类算法分类讲解K-Means, K-Medoids, GMM, Spectral cluster ...

  4. 弄技术要弄通-公司reis的pub/sub怎么使用的呢?

    Pub/Sub in Redis using PHP Posted on November 14, 2011by xmeng I would like to put an example togeth ...

  5. Mybatis加入Ehcache支持

    1.Mybatis默认的缓存配置 MyBatis 包括一个很强大的查询缓存特性,它能够很方便地配置和定制. Mybatis缓存包括全局的缓存和局部的缓存.全局的缓存能够讲主配置文件的setting属性 ...

  6. 解决SVN Cleanup时遇到错误信息:Cleanup failed to process the following paths:xxxxxxx Previous operation has not finished: run 'cleanup' if it was interrupted Please execute the 'Cleanup' command.

    解决SVN Cleanup时遇到错误信息:Cleanup failed to process the following paths:xxxxxxx Previous operation has no ...

  7. C语言 字符串操作 笔记

    /* C语言字符串的操作笔记 使用代码和注释结合方式记录 */ # include <stdio.h> # include <string.h> int main(void) ...

  8. 百度接口通过ip获取用户所在地

    /** * 百度接口      * 通过用户ip获取用户所在地      * @param userIp      * @return      */ public static String get ...

  9. XML转换为HTML

    from:http://www.w3school.com.cn/xml/xml_to_html.asp 在上一节中,我们讲解了如何通过 JavaScript 来解析 XML 并访问 DOM. 本例遍历 ...

  10. Fluently NHibernate映射多个实体程序集

    Fluently NHibernate有个好处就是可以在代码里定义实体类,而不必写冗长的XML. 但通常,一个项目对应的所有的实体类,都编译成一个DLL.如果有个项目,是在某个父项目的基础上再扩展,那 ...