0

I want to load an image in MATLAB :

f=imread('fulldirectory');
m=size(f);
printf('m');

MATLAB shows me this error when I attempt to run it:

"Error using imread (line 349)"

Can anyone help me?

Dev-iL
  • 23,742
  • 7
  • 57
  • 99
Pouyan
  • 363
  • 5
  • 22

1 Answers1

0

Imread function needs a file format, e.g., jpg.

You can use one of the following MATLAB codes.

f = imread('ngc6543a.jpg'); 
f = imread('ngc6543a', 'jpg'); 

Also, just omit the semicolon (;) from your second line of your codes, if you want to know the dimension of the image. MATLAB will display the size of the image.

m=size(f)

MATLAB has some test images such as ngc6543a.jpg and you can try my code in your MATLAB.

Solanee
  • 1
  • 1