How do I fix 'imread' related error ?
조회 수: 5 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Walter Roberson
2015년 7월 17일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!