Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Matlab Working With Images

15,465 views

Published on

Matlab Working With Images

Published in: Technology, Business

Matlab Working With Images

  1. 1. Matlab:Working with images<br />
  2. 2. Types of images<br />Binary image<br />Grayscale images<br />Indexed image<br />RGB image<br />
  3. 3. Binary Images<br />Binary images are made of only two colors: Black and White<br />
  4. 4. Grayscale Images<br />A grayscale image is a data matrix whose values represent intensities within some range.<br />
  5. 5. Indexed Images<br />In an Indexed Image, the color of each image pixel is determined by using the corresponding value of X as an index into map.<br />
  6. 6. RGB Images<br />An RGB image is stored as an m*n*3 data array that defines red, green, and blue color components for each individual pixel.<br />
  7. 7. Converting<br />Matalb offers many useful commands to convert images form one form to another:<br />Demosaic Convert Bayer pattern encoded image to truecolor (RGB) image. <br />Dither Use dithering to convert a grayscale image to a binary image or to convert a truecolor image to an indexed image.<br />Gray2ind Convert a grayscale image to an indexed image.<br />Grayslice Convert a grayscale image to an indexed image by using multilevel thresholding.<br />
  8. 8. Converting<br />Matalb offers many useful commands to convert images form one form to another:<br />Im2bw Convert a grayscale image, indexed image, or truecolor image, to a binary image, based on a luminance threshold.<br />Ind2gray Convert an indexed image to a grayscale image.<br />Ind2rgb Convert an indexed image to a truecolor image. <br />
  9. 9. Converting<br />Matalb offers many useful commands to convert images form one form to another:<br />Mat2gray Convert a data matrix to a grayscale image, by scaling the data.<br />Rgb2gray Convert a truecolor image to a grayscale image. <br />Rgb2ind Convert a truecolor image to an indexed image.<br />
  10. 10. Viewing<br />The following set of commands will read an image and display it:<br /><ul><li>IMAGE=imread(‘image1.jpg’);
  11. 11. imshow(IMAGE);</li></li></ul><li>Pixel-values<br />The following set of commands will read an image, display it and give the information of the pixel at the tool-tip:<br /><ul><li>IMAGE=imread(‘image1.jpg’);
  12. 12. imshow(IMAGE);
  13. 13. impixelinfo;</li></li></ul><li>Measuring the Distance Between Two Pixels<br />The distance between any two pixels of an image can be calculated by opening the image in ‘imtool’ and using the ‘ruler’ tool:<br /><ul><li>IMAGE=imread(‘image1.jpg’);
  14. 14. imtool(IMAGE);</li></li></ul><li>Cropping an image<br />An image can be cropped by opening the image in ‘imtool’ and using the ‘crop’ tool:<br /><ul><li>IMAGE=imread(‘image1.jpg’);
  15. 15. imtool(IMAGE);</li></li></ul><li>Cropping an image<br />An image can be cropped by opening the image in ‘imtool’ and using the ‘crop’ tool:<br /><ul><li>IMAGE=imread(‘image1.jpg’);
  16. 16. imtool(IMAGE);</li></li></ul><li>Visit more self help tutorials<br />Pick a tutorial of your choice and browse through it at your own pace.<br />The tutorials section is free, self-guiding and will not involve any additional support.<br />Visit us at www.dataminingtools.net<br />

×