資源簡介
改進了Criminisi算法,采用P-laplace算子作為數據項進行優先級計算,并有計算PSNR的功能
代碼片段和文件信息
/**
?*?A?best?exemplar?finder.??Scans?over?the?entire?image?(using?a
?*?sliding?window)?and?finds?the?exemplar?which?minimizes?the?sum
?*?squared?error?(SSE)?over?the?to-be-filled?pixels?in?the?target
?*?patch.?
?*
?*?@author?Sooraj?Bhat
?*/
#include?“mex.h“
#include?
void?bestexemplarhelper(const?int?mm?const?int?nn?const?int?m?const?int?n?
const?double?*img?const?double?*Ip?
const?mxLogical?*toFill?const?mxLogical?*sourceRegion
double?*best)?
{
??register?int?ijiijjii2jj2MNIJndxndx2mn=m*nmmnn=mm*nn;
??double?patchErr=0.0err=0.0bestErr=1000000000.0;
??/*?foreach?patch?*/
??N=nn-n+1;??M=mm-m+1;
??for?(j=1;?j<=N;?++j)?{
????J=j+n-1;
????for?(i=1;?i<=M;?++i)?{
??????I=i+m-1;
??????/***?Calculate?patch?error?***/
??????/*?foreach?pixel?in?the?curren
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2177??2004-11-29?22:56??p-laplace\bestexemplarhelper.c
?????文件???????6656??2008-11-06?10:35??p-laplace\bestexemplarhelper.dll
?????文件???????1124??2010-04-06?15:54??p-laplace\Demo_inpaint.m
?????文件???????7802??2010-04-06?14:50??p-laplace\inpaint.m
?????文件????????369??2010-04-01?19:49??p-laplace\PSNR.m
?????目錄??????????0??2010-04-07?10:39??p-laplace
-----------?---------??----------?-----??----
????????????????18128????????????????????6
評論
共有 條評論