While End Global: 'Number of Rows in Image Using Imgetfile %D/N' 'Number of Columns in Image Using Imgetfile %D/N'
While End Global: 'Number of Rows in Image Using Imgetfile %D/N' 'Number of Columns in Image Using Imgetfile %D/N'
% matlab program to import image from hard disk using imgetfile and display
it in matlab
[f,uc]=imgetfile;
while(isempty(f))
[f,uc]=imgetfile;
end
global i1
i1=imread(f);
[row1,col1,dim1]=size(i1);
row1
col1
dim1
size(i1)
fprintf('Number of rows in image using imgetfile = %d\n',row1);
fprintf('Number of columns in image using imgetfile = %d\n',col1);
figure
imshow(i1)
% matlab program to import image from hard disk using uigetfile and display
it in matlab
[file,path]=uigetfile('');
filename=fullfile(path,file);
global i2
i2=imread(filename);
[row2,col2,dim2]=size(i2);
row2
col2
dim2
size(i2)
fprintf('Number of rows in image using uigetfile = %d\n',row2);
fprintf('Number of columns in image using uigetfile = %d\n',col2);
figure
imshow(i2)