How do I fix 'imread' related error ?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I installed Matlab R2015a on a 64bit windows 8 laptop and have the image processing toolbox. All folders and subfolders are in the matlab work path.
PROBLEM 1. READING AN IMAGE
>> A= imread('boy14.jpg');
Error using assert
Too many input arguments.
Error in isjpg (line 8)
assert(fid ~= -1, message('MATLAB:imagesci:validate:fileOpen', filename));
Error in imftype (line 50)
tf = feval(fmt_s.isa, filename);
Error in imread (line 359)
[format, fmt_s] = imftype(filename);
2. TO DISPLAY MULTIPLE IMAGES
image_folder = 'B:\Matlabcode2015\codes\Mboy';
filenames = dir(fullfile(image_folder, '*.jpg'));
total_images = numel(filenames);
for n = 1:total_images
full_name= fullfile(image_folder, filenames(n).name);%specifies images names, full path and extension
our_images = imread(filenames); % Read images
figure (n) % used index n so old figs are not over written by new new figs
imshow(our_images)
end
THE ERROR MESSAGE I GET :
>> read_image
Error using imread>parse_inputs (line 457)
The file name or URL argument must be a string.
Error in imread (line 316)
[filename, fmt_s, extraArgs] = parse_inputs(varargin{:});
Error in read_image (line 8)
our_images = imread(filenames); % Read images
0 Commenti
Risposte (1)
Walter Roberson
il 17 Lug 2015
Checking around, it appears most probably that you have your own assert.m that is being used instead of the MATLAB assert.m . Please check with
which -all assert
and probably the first entry is something you have added to your MATLAB path.
0 Commenti
Vedere anche
Categorie
Scopri di più su Image Processing Toolbox in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!