解决: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中找到要安装的包(要安装的包名称一般会在出错提示中告诉你)
图1
图2

第2步

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

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

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

图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]);
>>

图4

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值