AreaProcess
10 Pages

AreaProcess

Course Number: CS 791, Fall 2009

College/University: Nevada

Word Count: 1044

Rating:

Document Preview

Area/Mask Processing Methods (Trucco, Chapt 3) - A pixel's value is computed from its old value and the values of pixels in its vicinity. - More costly operations than simple point processes, but more powerful. What is a Mask? - A mask is a small matrix whose values are called weights. - Each mask has an origin, which is usually one of its positions. - The origins of symmetric masks are usually their center...

Unformatted Document Excerpt
Coursehero >> Nevada >> Nevada >> CS 791

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Processing Area/Mask Methods (Trucco, Chapt 3) - A pixel's value is computed from its old value and the values of pixels in its vicinity. - More costly operations than simple point processes, but more powerful. What is a Mask? - A mask is a small matrix whose values are called weights. - Each mask has an origin, which is usually one of its positions. - The origins of symmetric masks are usually their center pixel position. - For nonsymmetric masks, any pixel location may be chosen as the origin (depending on the intended use). 1 1 1 1 1 1 1 1 1 1 2 1 2 4 2 1 2 1 1 1 1 1 Applying Masks to Images (filtering) - The application of a mask to an input image produces an output image of the same size as the input. Convolution (1) For each pixel in the input image, the mask is conceptually placed on top of the image with its origin lying on that pixel. (2) The values of each input image pixel under the mask are multiplied by the values of the corresponding mask weights. (3) The results are summed together to yield a single output value that is placed in the output image at the location of the pixel being processed on the input. -2- Area or Mask Processing Methods input image enhanced image z1 z2 z3 z4 z5 z6 z7 z8 z9 z5' T g(x,y) = T[f(x,y)] T operates on a neighborhood of pixels w1 w2 w3 w4 w5 w6 w7 w8 w9 z5' = R = w1z1 + w2z2 + ... + z9w9 - Mathematical definition of -discrete- convolution: g(i, j) = h(k, l) f (i - k, j - l) k=-n/2 l=-n/2 n/2 n/2 (for a mask with odd dimensions) -3Cross Correlation - Correlation translates the mask directly to the image without flipping it. - It is often used in applications where it is necessary to measure the similarity between images or parts of images. - If the mask is symmetric (i.e., the flipped mask is the same as the original one) then the results of convolution and correlation are the same. g(i, j) = h(k, l) f (i + k, j + l) k=-n/2 l=-n/2 n/2 n/2 -4Non-linear filtering - Linear filters have the property that the output is a linear combination of the inputs. - Filters which do not satify this property are called non-linear. - Erosion and Dilation are examples of non-linear filters. Normalization of mask weights - The sum of weights in the convolution mask affect the overall intensity of the resulting image. - Many convolution masks have coefficients that sum to 1 (the convolved image will have the same average intensity as the original one). - Some masks have negative weights and sum to 0. - Pixels with negative values may be generated using masks with negative weights. - Negative values are mapped to the positive range through appropriate normalization. Practical problems - How to treat the image borders? - Time increases exponentially with mask size. -5- Smoothing (or Low-pass) filters - Useful for noise reduction and image blurring. - It removes the finer details of an image. Averaging or Mean filter - The elements of the mask must be positive. - The size of the mask determines the degree of smoothing. -6- Gaussian (linear filter) "Machine (from Vision" by Jain et al., Chapt 4 and Trucco Chapt 3) - The weights are samples from a Gaussian function. (example using 1D Gaussian) -(x 2 + y 2 ) h(x, y) = exp[ ] 2 2 - The Gaussian's mask weights fall off to (almost) zero at the mask's edges. - Gaussian smoothing can be implemented efficiently thanks to the fact that the kernel is separable: g(i, j) = n/2 n/2 n/2 k=-n/2 l=-n/2 n/2 h(k, l) f (i - k, j - l) = -(k 2 + l 2 ) exp[ 2 2 ] f (i - k, j - l) = k=-n/2 l=-n/2 -k 2 n/2 -l 2 exp[ 2 2 ] l=-n/2 exp[ 2 2 ] f (i - k, j - l) k=-n/2 n/2 -7Algorithm To convolve an image I with a nxn 2D Gaussian mask G with 1. Build a 1-D Gaussian mask g, of width n, with g = G 2. Convolve each column of I with g, yielding a new image I c 3. Convolve each row of I c with g - As increases, the size of the mask must also increase if we are to sample the Gaussian satisfactorily. - The value of determines the degree of smoothing. height = width = 5 (subtends 98.76% of the area) = g -8- Median filter (non-linear) - Effective for removing "salt and pepper" noise (random occurences of black and white pixels). - Replace each pixel value by the median of the gray-levels in the neighborhood of the pixels Area or Mask Processing Methods input image enhanced image 10 20 20 15 99 20 20 25 20 20 T g(x,y) = T[f(x,y)] T operates on a neighborhood of pixels 10 20 20 15 99 20 20 15 20 sort 10 15 20 20 20 20 20 20 99 median -9- Sharpening (or High-pass) - It is used to emphasize the fine details of an image (has the opposite effect of smoothing). - Points of high contrast can be detected by computing intensity differences in local image regions. - The weights of the mask are both positive and negative. - When the mask is over an area of constant or sl...
MOST POPULAR MATERIALS FROM CS 791
MOST POPULAR MATERIALS FROM CS
MOST POPULAR MATERIALS FROM Nevada