急求!Matlab 小白。下载的m文件为什么F5不出图

% A deblocking example byiterative steering kernel regression
%
% written by hiro, June17 2007

% load image
img = double(imread('pepper.bmp'));
[N,M] = size(img);

% save the image in JPEGformat
imwrite(uint8(img), '../TestImages/pepper.jpg', 'Quality', 10);

% load the degraded image
y = double(imread('pepper.jpg'));

% pilot estimation bysecond order classic kernel regression
h = 0.5; % theglobal smoothing parameter
r = 1; % the upscaling factor
ksize = 5; % thekernel size
[zc, zx1c, zx2c] =ckr2_regular(y, h, r, ksize);

% iteartive steeringkernel regression (second order)
IT = 5; % thetotal number of iterations
wsize = 9; % thesize of the local orientation analysis window
lambda = 1; % theregularization for the elongation parameter
alpha = 0.5; % the structure sensitive parameter
h = 2.4; % theglobal smoothing parameter
ksize = 11; % thekernel size
z = zeros(N, M, IT+1);
zx1 = zeros(N, M, IT+1);
zx2 = zeros(N, M, IT+1);
rmse = zeros(IT+1, 1);
z(:,:,1) = y;
zx1(:,:,1) = zx1c;
zx2(:,:,1) = zx2c;
error = img - y;
rmse(1) =sqrt(mymse(error(:)));

for i = 2 : IT+1
%compute steering matrix
C = steering(zx1(:,:,i-1), zx2(:,:,i-1),ones(size(img)), wsize, lambda, alpha);
%steering kernel regression
[zs, zx1s, zx2s] = skr2_regular(z(:,:,i-1),h, C, r, ksize);
z(:,:,i) = zs;
zx1(:,:,i) = zx1s;
zx2(:,:,i) = zx2s;
% rootmean square error
error = img - zs;
rmse(i) = sqrt(mymse(error(:)));
rmse(i)
%figure(99);imagesc(zs); colormap(gray); axis image; pause(1);
end

% display images
figure; imagesc(y);colormap(gray); axis image;
title(['The JPEG image, STD=25, RMSE=',num2str(rmse(1))]);
figure; imagesc(z(:,:,4));colormap(gray); axis image;
title(['ISKR, 3 iterations, RMSE=',num2str(rmse(4))]);

第1个回答  2015-05-12
ckr2_regular,skr2_regular,steering这三个函数有吗?若没有,不能运行,就出不了图追问

这几个函数我放在同一路径了,是有的,但出不来图。

追答

把这三个文件发过来,我调试用

追问

大神,求联系方式。 追问贴不了那麽多字

追答

我qq:2674716548