How to add ,read,insert IMAGE in MATLAB

1)Statement of Problem:-

Here we are going to see how to add image in MATLAB.

2)Program:-

%% Read Image
Inputimage=imread('C:\Users\akshay\Downloads\pi.jpg');
%% Show image
figure(1)
imshow(Inputimage);
title('INPUT IMAGE')



3)Explanation:-

Inputimage=imread('C:\Users\akshay\Downloads\pi.jpg');

In this instruction MATLAB reads the image from the location which is given by user
here i have given the location which is Inputimage=imread('C:\Users\akshay\Downloads\pi.jpg');
while giving the location you have to remember some point
1) The must be in single quotations marks. ex. 'your location'
2) After giving location you must have to give the name of file with its extension which is in this example is pi.jpg.

figure(1)

This instruction creates the figure window for you.


imshow(Inputimage);

This instruction is use to display or show the image which is given by user. As here the input image which is given by user is assign to the inputimage thats why we write here in bracket inputimage  imshow(Inputimage);.


title('INPUT IMAGE')

title is used to give the title to the images and in bracket you can write anything which is nothing but the name which you have to give your image. Here i have used the name INPUT IMAGE.


4) OUTPUT:-






4) CONCLUSION:-

We have study how to add,insert an image in to the MATLAB

Comments

Popular post

How to plot different discrete signal using MATLAB

How to do Frequency Shift Keying (FSK) using MATLAB