How to display image in Matlab

Matlab can display any image format like jpg, gif, tif etc using imshow command.


imshow('path\image_name.jpg')

imshow is command to display image in Matlab.

path is dir where image is present.

image_name is name of image is to be display.

Example :-
If image test.jpg is present in naikgroup folder in G drive than

imshow('G:\naikgroup\test.jpg')

if image test present in tif format than

imshow('G:\naikgroup\test.tif')

if more than 1 image have to display than use figure before imshow.

figure
imshow('path\image_name.jpg')

Example :-
if you want to display 2 image called test1.jpg and test2.jpg from naik folder in G drive than code will be

figure
imshow('G:\naik\test1.jpg')
figure
imshow('G:\naik\test2.jpg')

Note:- change path according to your image present in drive.

One Comment

Add your comments here

Back to Top