Orthogonal matching tracing (OMP) for the compression-aware reconstruction algorithm

Source: Internet
Author: User

Title: Orthogonal matching Tracing (OMP) for the compression-aware reconstruction algorithm

In front of a number of basic bedding, this article gives the orthogonal matching tracking (OMP) algorithm matlab function code, and gives a single test routine code, the number m and the reconstruction success probability relationship curve drawing routine code, the signal sparsity K and the reconstruction success probability relationship curve drawing routine code.

0, the symbol is described as follows:

Compression observation y=φx, where y is the observed vector Mx1,x is the original signal Nx1 (m<<n). x is generally not sparse, but in a transform domain Ψ is sparse, that is, x=ψθ, where θ is k sparse, that is, θ is only k non-0 items. At this point y=φψθ, make A=φψ, then y=aθ.

(1) y is the observed vector, and the size is Mx1

(2) x is the original signal and the size is Nx1

(3) θ is k sparse, which is a sparse representation of the signal in x in a transform domain

(4) Φ is called an observation matrix, a measurement matrix , a measuring base, and a size of MXN

(5) Ψ is called the transformation matrix, the transformation base, the sparse matrix , the sparse base, the orthogonal base dictionary matrix, the size is NXN

(6) A is called the measure matrix, the sensor matrix , the CS information operator, the size is MXN

In the formula, generally there are k<<m<<n, the following three matrix of the different names of the various documents, I will be Φ called the measurement matrix , the Ψ is called the sparse matrix , a called the Sensing matrix .

1. OMP Reconstruction Algorithm Flow:



2. Orthogonal matching tracking (OMP) MATLAB code (CS_OMP.M) [Plain]  View Plain  copy   Function [ theta ] = cs_omp ( y,A,t )    %cs_omp summary of this function goes here  %Version: 1.0  written by jbb0523 @2015-04-18  %   detailed explanation  goes here  %   y = phi * x  %    x = Psi * theta  %   y = phi*psi *  theta  %    order  A = Phi*Psi,  y=a*theta  %     Now known Y and a, ask theta       [y_rows,y_columns] = size (y);       if y_rows<y_columns            y = y ';%y should be a column vector        end   &Nbsp;   [m,n] = size (a);% sensor matrix A is m*n matrix        theta =  zeros (n,1);% used to store recovered theta (column vectors)        at = zeros (m,t); Used during iteration to store a selected column        pos_theta = zeros (1,t), and% to store a selected column ordinal during iteration         r_n = y;% initialization residuals (residual) is y       for  ii=1:t% Iteration T, T is input parameter            product = a ' *r_n % sensor matrix A each column and residuals of the inner product            [val,pos] = max (ABS ( Product),% finds the maximum inner product absolute value, which is the column with the most relevant residuals            at (:, II)  =  a (:, POS);% store this column            pos_theta (ii)  = pos ;% stores the sequence number of this column            a (:, POS)  = zeros (m,1);% clear 0 A of this column And actually this trip can not be because it is orthogonal with residuals            %y=at (:, 1:ii) *theta, the least squares solution for Theta (Least square)             theta_ls =  (at (:, 1:ii) ' *at (:, 1:ii)) ^ ( -1) *at (:, 1:II) ' *y;% least squares solution            %at (:, 1:ii) *theta_ls is y at (:, 1:ii) Orthographic projection on column space            r_n = y - at (:, 1:ii) * theta_ls;% Update residuals                end        theta (Pos_theta) =theta_ls;% recovery theta   end  


3. Omp Single-time Refactoring test Code (CS_RECONSTUCTION_TEST.M)

Code, directly constructs a k sparse signal, so the sparse matrix is the unit array.[Plain]  View Plain  copy  % compression-aware refactoring algorithm test    clear all;close all;clc;   m =  64;% Number of observations    n = 256;% signal x length    k = 10;% signal x sparsity    Index_k  = randperm (N);   X = zeros (n,1);   x (Index_k (1:K))  = 5*randn ( k,1);%x is k sparse, and the position is random    psi = eye (N);%x itself is sparse, and the sparse matrix is defined as the unit array x=psi*theta   phi = &NBSP;RANDN (m,n);% measurement matrix is Gaussian matrix    a = phi * psi;% Sensing matrix    Y = phi  * x;% get the observation vector y  %%  Restoration reconstruction Signal x   tic   Theta = cs_omp (Y,A,K);    x_r = psi * theta;% x=psi * theta   toc     Plotting    figure;   plot (x_r, ' k.-');% plot x recovery signal    hold on;   Plot (x, ' R ');% draw the original signal x  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.