MATLAB运行报错Error in Untitled2 (line 9) sc = scale*cos(angle);源代码是这个I=imread('z.jpg');imid = round(size(I,2)/2); I_left=I(:,1:imid); stretch = 1.5;size_right = [size(I,1) round(stretch*imid)]; I_right = I(:,imid+1:end); I_right_stre
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/26 13:12:14
MATLAB运行报错Error in Untitled2 (line 9) sc = scale*cos(angle);源代码是这个I=imread('z.jpg');imid = round(size(I,2)/2); I_left=I(:,1:imid); stretch = 1.5;size_right = [size(I,1) round(stretch*imid)]; I_right = I(:,imid+1:end); I_right_stre
MATLAB运行报错Error in Untitled2 (line 9) sc = scale*cos(angle);
源代码是这个
I=imread('z.jpg');
imid = round(size(I,2)/2);
I_left=I(:,1:imid);
stretch = 1.5;
size_right = [size(I,1) round(stretch*imid)];
I_right = I(:,imid+1:end);
I_right_stretched = imresize(I_right,size_right);
I_piecewiselinear = [I_left I_right_stretched];
sc = scale*cos(angle);
subplot(3,2,6),imshow(I_piecewiselinear)
title('piecewise linear image')
运行时报错如下
>> Untitled2
Undefined function or variable 'scale'.
Error in Untitled2 (line 9)
sc = scale*cos(angle);
上面这段代码是从课件上抄的图像分段线性变换程序,本人技术渣,求大师指导错误所在
MATLAB运行报错Error in Untitled2 (line 9) sc = scale*cos(angle);源代码是这个I=imread('z.jpg');imid = round(size(I,2)/2); I_left=I(:,1:imid); stretch = 1.5;size_right = [size(I,1) round(stretch*imid)]; I_right = I(:,imid+1:end); I_right_stre
scale没定义,给scale赋个值就行了.