Showing posts with label tutorial. Show all posts
Showing posts with label tutorial. Show all posts

Tuesday, August 3, 2010

Reading and displaying an input image

TO READ AN INPUT IMAGE:

       First,browse to the image folder on the top left window named "Current Directory".
            
                   • To read a graphics file format image use" imread".

                   • The imread function reads image data into MATLAB arrays from graphics files in various    standard formats, such as gif, tiff , jpeg, png etc..

imread:
    imread - used to read image
    imread (‘filename’)

      File name is the name of the image file you wish to read. Put the file name within single quotes ‘ ‘).

 Example:
                       imread('image.jpg')


1.Get the variable called image
2.’imread’ is one of the command to read the input image
3.Finally ‘imshow’ is the command to view the image.

To show the image:
             imshow(variable)


**********coding**********
image=imread('image1.jpg');
imshow(image);

The image opens as below,

Starting Matlab and working basics

How to work in  matlab?

You have to write codings on the command window with the prompt: >>
You can view your codings in command history.