资 源 简 介
function gmodify(pic,uv,gm,og) %pic表示要处理的图像的路径文件名
%uv是一个二维矩阵,uv(:,1)代表上面提到的,uv(:,2)表示
%gm是一个二维矩阵,gm(j,:)代表在校正图空间上与uv(j,:)一一应的点
%og 代表对称中心,它是一个二维向量
a=imread(pic);
b=double(a);
n=size(gm(:,1));
for k=1:n%转换到以对称点为原点的空间关系并构造矩阵A
A(k,:)=[1,gm(k,1)-og(1),gm(k,2)-og(2),(gm(k,1)-og(1)^2), (gm(k,1)-og(1))*(gm(k,2)-og(2)),(gm(k,2)-og(2) ^2)];
end
[h,w]=size(b(:,:,1));
sp=zeros(h,w,3)+255;
a0=pinv(A)* uv(:,2); %计算上面提到的地址映射的系数估计a
b0=pinv(A)* uv(:,1); %计算上面中提到的地址映射的系数估计b
for i=1:h %从理想图像矩阵出发处理
for j=1:w
x=[1,j-og(1),i-og(2),(j-og(1))^2,(i-og(2))*(j-og(1)),(i-og(2))^2];
u=x*a0+og(2); % 逆向映射(j,i)到畸变图像矩阵(v,u)
v=x*b0+og(1);
if (u>1)&&(u1)&&(v
文 件 列 表
dipum_1.1.3
adpmedian.p
average.p
bayesgauss.p
bound2eight.p
bound2four.p
bound2im.p
boundaries.p
bsubsamp.p
changeclass.p
colorgrad.p
colorseg.p
compare.p
connectpoly.p
Contents.m
conwaylaws.p
covmatrix.p
dftcorr.p
dftfilt.p
dftuv.p
diameter.p
endpoints.p
entropy.p
fchcode.p
frdescp.p
fwtcompare.p
gmean.p
gscale.p
histroi.p
hough.p
houghlines.p
houghpeaks.p
houghpixels.p
hpfilter.p
hsi2rgb.p
huff2mat.p
huffman.p
ice.fig
ice.p
ice_stand_alone.p
ifrdescp.p
ifwtcompare.p
im2jpeg.p
im2jpeg2k.p
imnoise2.p
imnoise3.p
improd.p
imratio.p
imstack2vectors.p
intline.p
intrans.p
invmoments.p
jpeg2im.p
jpeg2k2im.p
lpc2mat.p
lpfilter.p
mahalanobis.p
manualhist.p
mat2huff.p
mat2lpc.p
minperpoly.p
paddedsize.p
pixeldup.p
polyangles.p
princomp.p
quantize.p
randvertex.p
Readme.m
regiongrow.p
rgb2hsi.p
rgbcube.p
signature.p
specxture.p
spfilt.p
splitmerge.p
statmoments.p
statxture.p
strsimilarity.p
subim.p
twodsin.p
twomodegauss.p
unravel.dll
unravel.mexaxp
unravel.mexglx
unravel.mexhpux
unravel.mexmac
unravel.mexrs6
unravel.mexsg
unravel.mexsol
unravel.p
vistformfwd.p
wave2gray.p
waveback.p
wavecopy.p
wavecut.p
wavefast.p
wavefilter.p
wavepaste.p
wavework.p
wavezero.p
x2majoraxis.p
0_Read_Me_First.txt
dipum_1.1.3