You are on page 1of 11

MATLAB

Image Processing

What is an image ?

Discrete representation of data Both spatial (layout) and intensity (color) information

Image data types

Binary images: 2D arrays with each pixel having value 0 or 1. Intensity or gray scale images: 2D arrays with each pixel having numerical value representing intensity at that point RGB images: 2D arrays with each pixel three numerical values corresponding to red, green and blue channels

Reading and writing images

imread( ) imwrite( ) imshow( ) imfinfo( ) Showing multiple images subplot RGB value display Set pixel value to 1

Gray scale and extracting channels

rgb2gray( ) R, G and B channels extract imadd( ) imsubtract( ) imabsdiff( ) immultiply( ) imdivide( ) Multiplying or dividing images by each other does not make sense

Other operations

imcomplement( ) im2bw( ) Thresholding in binary conversion imhist( ) graythresh( ) imnoise( ) salt and pepper, gaussian

Morphological processing

Extracting meaningful information from image based on shape

Morphological processing

Extracting meaningful information from image based on shape

Morphological processing

Structuring element

Morphological processing

Erosion: Center pixel of structuring element placed on each foreground pixel. If any of neighboring pixels are background, center pixel is switched.

Dilation is exactly the opposite.

Morphological processing

You might also like