资源简介
利用POCS实现图像超分辨率重建的matlab代码
代码片段和文件信息
% 位移、角度估计后利用pocs法求超精度图像
%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%
s{1}=double(imread(‘tu1.jpg‘));
[rowcolum]=size(s{1});
r2=1:2*row;c2=1:2*colum;
r2=r2/2;c2=c2/2;c2=c2‘;
s{1}=interp2(s{1}r2c2‘cubic‘)
img1=uint8(s{1});
for k=2:4
s{2}=double(imread(strcat(‘tu‘num2str(k)‘.jpg‘)));
[rowcolum]=size(s{2});
r2=1:2*row;c2=1:2*colum;
r2=r2/2;c2=c2/2;c2=c2‘;
s{2}=interp2(s{2}r2c2‘cubic‘);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%估计角度
img2=uint8(s{2});
[im1 des1 loc1] = sift(img1);
[im2 des2 loc2] = sift(img2);
distRatio = 0.75;
des2t = des2‘;
for i = 1:size(des11)
dotprods = des1(i:) * des2t;
[valsindx] = sort(acos(dotprods));
if (vals(1) < 0.15) && (vals(1) < distRatio * vals(2))
match1(i) = indx(1);
else
match1(i) = 0;
end
end
cols1 = size(im12);
j = 1;
for i = 1: size(des11)
if (match1(i) > 0)
%line([loc1(i2) loc2(match1(i)2)+cols1] ...
%[loc1(i1) loc2(match1(i)1)] ‘Color‘ ‘r‘);
point1(j:) = loc1(i:);
point2(j:) = loc2(match1(i):);
j = j + 1;
end
end
num = sum(match1 > 0);
if num <= 1
%fprintf(‘too few matches found.\n‘ num);
return;
end
distpoint = point1 - point2;
for i = 1 : size(point11)
if distpoint(i4) >= 3.14159
distpoint(i4) = distpoint(i4) - 3.14159 * 2;
else
if distpoint(i4) <= -3.14159
distpoint(i4) = distpoint(i4) + 3.14159 * 2;
end
end
end
rotation = 0;
count = 0;
for i = 2 : size(point11)
distdistpoint = distpoint(i4) - distpoint(i-14);
if abs(distdistpoint) > 0.5*abs(sum(abs(distpoint(:4)))/size(distpoint1))
continue;
end
if abs(distpoint(i4)) > 1.5*abs(sum(abs(distpoint(:4)))/size(distpoint1))
continue;
end
rotation = rotation + distpoint(i4);
count = count + 1;
end
if rotation == 0
rotation = sum(distpoint(:4))/size(distpoint1) * 180 / 3.14159;
else
rotation = rotation / count * 180 / 3.14159;
end
phi_rad(1)=0;phi_rad(2)=rotation;
%角度补偿
img2 = imrotate(img2-rotation‘bicubic‘‘crop‘);
s{2}=double(img2);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 位移估计
delta_est = estimate_shift(s8);
s{2}=double(imread(strcat(‘tu‘num2str(k)‘.jpg‘)));
[rowcolum]=size(s{2});
r2=1:2*row;c2=1:2*colum;
r2=r2/2;c2=c2/2;c2=c2‘;
s{2}=interp2(s{2}r2c2‘cubic‘);
%求img2补偿后的坐标
factor=1;
ss = size(s{1});
center = (ss+1)/2;
for i=1:2
r{i} = [1:factor:factor*ss(1)]‘*ones(1ss(2)); % create matrix with row indices
c{i} = ones(ss(1)1)*[1:factor:factor*ss(2)]; % create matrix with column indices
r{i} = r{i}-factor*center(1); % shift rows to center around 0
c{i} = c{i}-factor*center(2); % shift columns to center around 0
coord{i} = [c{i}(:) r{i}(:)]*[cos(phi_rad(i)) sin(phi_rad(i)); -sin(phi_rad(i)) c
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4647 2006-12-09 16:31 POCS-SuperResolution\pocs2.m
文件 2533 2006-12-07 17:07 POCS-SuperResolution\pocs4.m
文件 3879 2006-12-12 14:09 POCS-SuperResolution\result.m
文件 1730 2006-12-09 16:39 POCS-SuperResolution\rotation.m
文件 4427 2006-12-05 20:39 POCS-SuperResolution\rotation_estimate.m
目录 0 2010-11-17 15:01 POCS-SuperResolution
----------- --------- ---------- ----- ----
17216 6
相关资源
- 邻域嵌入的超分辨率matlab代码
- 超分辨率重建的matlab代码
- 基于Matlab的多图像超分辨率重建算法
- CS KSVDSR
- 图像超分辨率重建
- super-resolutioncode 基于学习的超分辨率
- SRCNN 深度学习的图像超分辨率算法
- multiimagepocs 对多帧图像进行超分辨率
- imagereconstruction 基于小波和插值的超分
- map MAP超分辨率重建算法
- An-adaptive 自适应正则化的超分辨率重
- SR 利用稀疏矩阵思想进行图像的超分
- POCS-SuperResulution 本程序主要实现低分
- SRmatlab W.T.Freeman 经典 基于例子的超分
- POCS 基于凸集投影算法的超分辨率图像
- MAP 实现图像的超分辨率算法
- L1 基于L1范数的多帧图像超分辨率图像
- super-resolution-by-map 基于MAP的超分辨率
- 图像超分辨率重建-pocs算法
- matlab开发-图像超分辨率迭代反投影算
- superresolution_v_2.0.zip图像超分辨率MAT
- 旁瓣抑制算法SVA和超分辨率SUPER-SVA.算
- POCS算法matlab实现
评论
共有 条评论