Download presentation
Presentation is loading. Please wait.
1
Spatial operations and transformations
Last chapter uses statistical measures This chapter combines previous operations with operations on single images that deal with pixels and their neighbors (spatial operations) Spatial filters (removing noise by reference to neighboring pixel values) Weighted averaging of pixel areas (convolution) Comparing areas on an image with known pixel area shapes so as to find shapes in images (correlation) Edge detection Detection of ‘interest points’ 09/10/62 Image Processing, Lecture #7
2
Spatially dependent transformations
A spatially dependent transformation is the transformation that depends on its position in the image. The histogram of gray levels does not retain its original shape. The spatially dependent function is F(g,X,Y), for example An image was captured using a weak ambient light together with some sort of point light source giving the effect of a dark picture at the bottom right and a light picture at the top left. The function, discovered by inspection, was used to even out thee lighting: F(g,X,Y) = X/20 + Y/20 - 5 Use of threshold technique is unlikely to be as effective There are other techniques for removal of this kind of gradation. 09/10/62 Image Processing, Lecture #7
3
240-373 Image Processing, Lecture #7
Technique 1 & 2 Technique 1: Gradation removing by averaging USE: to remove gradual shading across a single image (not suitable for text image) OPERATION: 1. subdivide the picture into rectangles 2. Evaluate the mean for each rectangle and also for the whole picture 3. To each rectangle of pixels, add or subtract a constant so as to give the rectangles across the picture the same mean. Technique 2: Masking USE: to remove or negate part of an image so that that part is not visible. OPERATION: ANDing an image with a binary mask amounts to thresholding to zero at the maximum gray level for part of the picture, without any thresholding on the rest of the picture. 09/10/62 Image Processing, Lecture #7
4
Template and convolution
Template operations are very useful as elementary image filters. They can be used to: enhance certain features, de-enhance others identifying edge smooth out noise discover known shapes in an image Technique 3: Convolution USE: widely used in many operations OPERATION: A template is an array of values. It is placed step by step over the image. At each step, creating a new window in the image the same size as the template Associating with each element in the template a corresponding pixel in the image Typically, the template element is multiplied by the corresponding image pixel gray level. The sum of these results, across the whole template, is recorded as a pixel gray level in a new image. This ‘shift, add, multiply’ operation is called the ‘CONVOLUTION’ of the template with the image. 09/10/62 Image Processing, Lecture #7
5
240-373 Image Processing, Lecture #7
Convolution: Cont’d If T(x,y) is the template (n x m) and I(X,Y) is the image (NxM), then the convolving of T with I is written as Often the template is not allowed to shift off the edge of the image, so the resulting image will be smaller than the original image. For example Template Image Result * * * * * * * * * = no value Here the 2x2 template is operating on a 4x5 image, giving a 3x4 result. The value 5 in the result is obtained from (1x1) + (0x3) + (0x1) + (1x4) 09/10/62 Image Processing, Lecture #7
6
240-373 Image Processing, Lecture #7
Common templates Low-pass filter (removing noise, blurring) template 1 1 1 1 template 2 (weighting with half of result is from the center pixel) 3 16 3 High-pass filter (remove gradual change, enhance sudden changes) Laplacian template (the sample sums to zero) 09/10/62 Image Processing, Lecture #7
7
Example of low pass and high pass filtering
Image After high pass after low pass High-pass filter Low-pass filter 09/10/62 Image Processing, Lecture #7
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.