解决:the ‘imresize‘ function belongs to the image package from Octave Forge which you have installed b

比如这段代码现在出现warning: the ‘imresize’ function belongs to the image package from Octave Forge which you have installed but not loaded. To load the package, run ‘pkg load image’ from the Octave prompt. Please read https://www.octave.org/missing.html to learn how you can contribute missing functionality. error: ‘imresize’ undefined near line 1 column 8

>> ImgName = getfield(a, {j}, 'name');
>> Imgdat = imread(ImgName);
>> Imgdat = imresize(Imgdat,[80,60]);
warning: the 'imresize' function belongs to the image package from Octave Forge
which you have installed but not loaded.  To load the package, run 'pkg
load image' from the Octave prompt.

Please read <https://www.octave.org/missing.html> to learn how you can
contribute missing functionality.
error: 'imresize' undefined near line 1 column 8

解决方法:

第1步

在网站Packages中找到要安装的包(要安装的包名称一般会在出错提示中告诉你)
解决:the ‘imresize‘ function belongs to the image package from Octave Forge which you have installed b_第1张图片
解决:the ‘imresize‘ function belongs to the image package from Octave Forge which you have installed b_第2张图片

第2步

把octave调到下载的package所在目录

>>> cd(D:\software\Octave\Octave-5.2.0.0)
         ^

>> pwd
ans = D:\software\Octave\Octave-5.2.0.0

解决:the ‘imresize‘ function belongs to the image package from Octave Forge which you have installed b_第3张图片

第3步

在命令窗口里输入pkg install image-2.12.0.tar.gz

>> pkg install image-2.12.0.tar.gz
For information about changes from previous versions of the image package, run 'news image'.
第4步

载入一下这个包,输入命令pkg load image

>> pkg load image
第5步

测试成功,不再出错

>> cd(pathArr(i,:));
>> Imgdat = imresize(Imgdat,[80,60]);
>>

解决:the ‘imresize‘ function belongs to the image package from Octave Forge which you have installed b_第4张图片

你可能感兴趣的:(错误记录,图像处理,octave,matlab)