Reputation: 8078
I am loading an image in MATLAB and trying to resize it to certain size. This is my code:
img = imread(strcat(train_path,'/','aa.jpg' ));
[w h d] = size(img);
fprintf('%s %d %d %d \n', strcat(train_path,'/','aa.jpg' ), w, h ,d );
%image(img)
resize_img = imresize(img, [96,96]);
All works well except the imresize
function. The error is imresize
undefined.
Upvotes: 1
Views: 4170
Reputation: 219
In octave you need to load image processing package at the beginning of your code
pkg load image
img = imread(strcat(train_path,'/','aa.jpg' ));
...
it adds the image package to the path.
Upvotes: 2
Reputation: 968
You need to have the image processing toolbox for imresize, but not for imread, which is included in Matlab by default.
http://www.mathworks.com/products/image/
Upvotes: 3