13-09-2013, 04:56 PM
Introduction to Image Processing
Image Processing.pptx (Size: 2.18 MB / Downloads: 66)
Pixels
A pixel (abbr. for picture element) is the smallest unit of an image.
Therefore, a 640x480 image is a matrix of 640 columns and 480 rows, each element of this matrix is called an image pixel.
MATLAB Image Coordinates
MATLAB stores images as matrices.
In MATLAB, image pixels are referenced using (row, col) values.
Origin of the coordinate system (1,1) is the top left corner of the image
RGB and Grayscale
In RGB format, each Pixel has 3 color components: Red, Green, and Blue.
Other color representations, e.g. HSV, YUV, CMYK, are also used. Transformations from RGB to these color spaces and back are defined in MATLAB.
If only intensity (bright/dark) variations are considered, the resultant image is called a grayscale image. Each pixel has only 1 component: intensity.
Background Subtraction
Background subtraction is a technique used to isolate useful information in an image (foreground) from the rest of the image (background).
A reference image is selected as the background.
Each successive image in a video stream is compared against this image.
If the difference between the images is significant, the areas which are different are considered to be the foreground for that image.
Intensity Thresholding
Intensity thresholding is another foreground separation technique. It uses histograms.
A histogram is an image statistic which usually operates on an intensity image, i.e. pixels having a single value between 0-255
The range 0-255 is divided into bins, e.g. each intensity value may be given its own bin
The Y axis shows the count of number of pixels in an image which lie within limits for a bin.
Color Processing
Used in identifying well color for the Minesweeper problem.
In MATLAB, a color (RGB) image is stored as a 3D matrix with the third dimension being color.
Each pixel has a Red, Green, and Blue value. The values range (for each color) from 0 to 255, e.g. a purely red pixel at (25,30) will have the RGB value (255,0,0).
To access the Red value for this pixel in the 3D image matrix, we reference img(25,30,1). Similarly, Green will be img(25,30,2) and Blue, img(25,30,3).
Shape-based Processing
Once the foreground objects have been detected, it is important to know their properties such as area, shape, location, etc.
MATLAB has a function called regionprops which takes a binary image as input and identifies properties of contiguous (connected) pixels in foreground regions.
The output of regionprops is an array of structures. Each element of the array contains information about one foreground region.
MATLAB help file is very useful