资源简介
利用稀疏分解算法对图像进行修复,文中有一被破坏的LINA图像,修复效果可观
代码片段和文件信息
function [Restemp] = asmpgaborr2c(ImNtermnNgenAffNNtemplet)
% Res = mpgaborr2(ImNtermnngenAff);
% Matching Pursuit analysis with real 2-D atoms
%
% Im : image to be analyzed
% Nterm: number of terms in decomposition
% n: number of chromosomes
% Ngen: number of genes
% Aff = 0 no display =1 display
% Res matrix of results: line -> term number
% - col 1 -> Projection
% - col 2 -> location x
% - col 3 -> location y
% - col 4 -> scaling x
% - col 5 -> scaling y
% - col 6 -> rotation angle
%
% Jean-Marc Vesin and Pierre Vandergheynst
% Initial Version April 2000
% Modified by Rosa M. Figueras i Ventura
% May 2000
%imageatom=zeros(128);
sig = ones(61);
sig(1)=3;%input(‘standard deviation for mutation location x?‘);
sig(2)=3;%input(‘standard deviation for mutation location y?‘);
sig(3)=3;%input(‘standard deviation for mutation scaling?‘);
sig(4)=3;%input(‘standard deviation for mutation angle?‘);
sig(5)=4-0.001;
sig(6)=4;
base=Im;
Res=[];
[hxhy]=size(Im);
[xaya]=meshgrid(0:hy-10:hx-1);
yinexp=0:0.01:min(hxhy)/4;
yinexp=exp(-yinexp);
sig=sig*(min(hxhy)/128.);
temp= zeros(size(Im));
Res = zeros(Nterm6);
[rxry]=ass_r_relation(NNhxhy);
bst=NN*log2(min(hxhy))-NN;
bi=ones(51);
bs=ones(51);
%Atom Index Structure :
%12: positions 34: scaling 5: angle
%bi: lower bounds
%bs: upper bounds
bi(1)=0;
bi(2)=0;
bi(3)=0;
bi(4)=0;
bi(5)=0;
bs(1)=hx;
bs(2)=hy;
%bs(3)=round(NN*log2(min(hxhy))-NN);
%bs(3)=bsloop;
%bs(4)=bsloop;
bs(5)=min(hxhy);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
coef=sum(sum(Im))/(hx*hy); %%%%%
atom=ones(hxhy); %%%%% First of all we take
Im=Im-coef*atom; %%%%% The continuous from
temp=coef*atom; %%%%% the image
Res(11)=coef; %%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
coef
for loop =2:Nterm
% if loop<100
% bsloop=round(bst*(1-loop/100*0.3));
% else
% bsloop=round(bst*(-0.00075*loop+0.775));
% end
bsloop=round(bst*(1-loop/Nterm*0.5));
bs(3)=bsloop;
bs(4)=bsloop;
% bsloop=round(bst);
fprintf(‘ \n \n the step %d‘loop);
% Im(1:81:8)
% search of the best atom by ga (Genetic Algorithm) gaborr2
[veccoefeq]=asygagaborr2c(ImsignNgenAffNNrxryNtermloopbsloophxhyxayayinexpbibstemplet);
% computation of the atom
%x=cos(pi*vec(4)/(min(hxhy)))*(xa-vec(1))+...
% sin(pi*vec(4)/(min(hxhy)))*(ya-vec(2));
%y=cos(pi*vec(4)/(min(hxhy)))*(ya-vec(2))-...
% sin(pi*vec(4)/(min(hxhy)))*(xa-vec(1));
%xx=x/2^(vec(3)/NN);
%yy=y/2^(vec(3)/NN);
%atom=(sqrt(2)/2^(vec(3)/NN))*(exp(-pi*(xx.*xx+yy.*yy)).*...
% exp(i*pi*min(hxhy)/(hx+hy)*xx));
%a=sum(
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 6763 2008-11-29 16:06 图像信息修复\asmpgaborr2c.m
文件 1375 2008-12-02 16:35 图像信息修复\ass_r_relation.m
文件 5641 2008-11-28 22:53 图像信息修复\asygagaborr2c.m
文件 779 2008-12-27 14:03 图像信息修复\atestprogramsc.m
文件 78545 2009-07-27 11:25 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1.ctf
文件 1190 2009-07-27 11:27 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_1_0.c
文件 98304 2009-07-27 11:25 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_1_0.dll
文件 9468 2009-07-27 11:27 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_1_0.h
文件 1694 2009-07-27 11:25 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_mcr\atestprogram\asmpgaborr2c.m
文件 914 2009-08-07 08:57 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_mcr\atestprogram\ass_r_relation.m
文件 1589 2009-08-07 08:57 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_mcr\atestprogram\asygagaborr2c.m
文件 854 2009-08-07 08:57 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_mcr\atestprogram\atestprogramsc.m
文件 869 2009-08-07 08:57 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_mcr\atestprogram\atestprogramsc_test1.m
文件 8704 2009-08-07 08:57 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_mcr\atestprogram\strapecalculation.mexw32
文件 614 2009-07-27 11:25 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_mcr\atestprogram\strapecalculation_mexw32.auth
文件 3198 2009-08-07 08:57 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_mcr\atestprogram_33AD0F442D2A84034A3FF64539D265B2\compopts.bat
文件 248 2009-08-07 08:57 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_mcr\atestprogram_33AD0F442D2A84034A3FF64539D265B2\matlab.prf
文件 40 2009-08-07 08:57 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_mcr\atestprogram_33AD0F442D2A84034A3FF64539D265B2\MLintDefaultSettings.txt
文件 901 2009-08-07 08:57 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_mcr\atestprogram_33AD0F442D2A84034A3FF64539D265B2\WebRenderer\pluginreg.dat
文件 53 2009-08-07 08:57 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_mcr\toolbox\compiler\Contents.m
文件 824 2009-07-27 11:25 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_mcr\toolbox\compiler\ctfroot.m
文件 3104 2009-08-07 08:57 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_mcr\toolbox\compiler\deploy\deployprint.m
文件 7168 2009-08-07 08:57 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_mcr\toolbox\compiler\deploy\deploywhich.mexw32
文件 629 2009-07-27 11:25 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_mcr\toolbox\compiler\deploy\deploywhich_mexw32.auth
文件 10195 2006-05-27 14:02 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_mcr\toolbox\compiler\deploy\FigureMenuBar.fig
文件 6944 2009-08-07 08:57 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_mcr\toolbox\compiler\deploy\FigureToolBar.fig
文件 749 2009-07-27 11:25 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_mcr\toolbox\compiler\deploy\fopen.m
文件 869 2009-08-07 08:57 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_mcr\toolbox\compiler\deploy\input.m
文件 779 2009-08-07 08:57 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_mcr\toolbox\compiler\deploy\pause.m
文件 959 2009-08-07 08:57 图像信息修复\atestprogramsc_test1\distrib\atestprogramsc_test1_mcr\toolbox\compiler\deploy\printdlg.m
............此处省略176个文件信息
- 上一篇:csdn-微信.zip
- 下一篇:后缀表达式计算
相关资源
- F2833x Project Template
- DFT Compiler Scan User Guide Version E-2010.12
- mpu6050\\mpu9150\\ms5611电路图可直接使用
- 软件加壳保护工具 PECompact_v3.022
- libmp3lame.a(3.100)静态库for iOS支持真
- jce-doubleca-sample.2019.10.15.zip
- MP4v2录制rtsp流存为MP4文件
- Computer Organization and Design 5th ppt
- MPU6050DMP自检和零偏校准
- SPI读取MPU9250 9轴加速度,陀螺仪,磁
- Guanrong Chen《Introduction to Complex Networ
- OpenMP编译原理及实现技术
- mpu6050中文手册
- Elmo公司驱动器软件手册
- 《程序设计实践》 中文版
- elements of information theory 2nd edition com
- Computer Organization and Architecture 第8版答
- RATA Raster (BMP) To Allegro (IPF)
- rtsp摄像头推流上云使用浏览器播放
- ROS Robotics by Example
- The Computational Neurobiology of Reaching and
- Kinematics of manipulators under computer cont
- Computers and intractability
- Twemproxy需要的依赖,加Redis安装包,
- Ultimate Addons for Visual Composer 3.16.10
- 《ComputerNetworksATop-DownApproach》(Foro
- 基于STM32的DMP方式读取欧拉角
- Designing with Data: Improving the User Experi
- Computer Organization and Design RISC-V Editio
- Applied Bayesian Statistics---With R and OpenB
评论
共有 条评论