1. Trang chủ
  2. » Giáo án - Bài giảng

image enhancement spatial filtering

40 261 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 40
Dung lượng 1,96 MB

Nội dung

  Prof Duong Anh Duc  Image enhancement in the spatial domain can be represented as: Transformation Enhanced Image g(m,n) = T(f)(m,n) Given Image  The transformation T maybe linear or nonlinear We will mainly study linear operators T but will see one important nonlinear operation  If the operator T is linear and shift invariant (LSI), characterized by the point-spread sequence (PSS) h(m,n) , then (recall convolution) n) is of “finite extent: h(k, l) = for (k, l)   where  is a small set (called neighborhood)  is also called as the support of h  In practice, to reduce computations, h(m,  In the frequency domain, this can be represented as: G(u,v) = He(u,v) Fe(u,v) where He(u,v) and Fe(u,v) are obtained after appropriate zeropadding   Many LSI operations can be interpreted in the frequency domain as a “filtering operation.” It has the effect of filtering frequency components (passing certain frequency components and stopping others) The term filtering is generally associated with such operations  Examples of some common filters (1-D case): Lowpass filter Highpass filter  If h(m, n) is a by mask given by w1 w2 w3 h= w4 w5 w6 then w7 w8 w9  The output g(m, n) is computed by sliding the mask over each pixel of the image f(m, n) This filtering procedure is sometimes referred to as moving average filter  Special care is required for the pixels at the border of image f(m, n) This depends on the so-called boundary condition Common choices are: o The mask is truncated at the border (free boundary) o The image is extended by appending extra rows/columns at the boundaries The extension is done by repeating the first/last row/column or by setting them to some constant (fixed boundary) o The boundaries “wrap around” (periodic boundary)   In any case, the final output g(m, n) is restricted to the support of the original image f(m, n) The mask operation can be implemented in MATLAB using the filter2 command, which is based on the conv2 command   Image smoothing refers to any image-to-image transformation designed to “smooth” or flatten the image by reducing the rapid pixelto-pixel variation in grayvalues Smoothing filters are used for: o Blurring: This is usually a preprocessing step for removing small (unwanted) details before extracting the relevant (large) object, bridging gaps in lines/curves, o Noise reduction: Mitigate the effect of noise by linear or nonlinear operations 10 Original Image Highpass filtering 26  This is a filter whose output g is produced by subtracting a lowpass (blurred) version of f from an amplified version of f g(m,n) = A f(m,n) – lowpass(f(m,n))  This is also referred to as unsharp masking 27    Observe that g(m,n) = A f(m,n) – lowpass(f(m,n)) = (A – 1) f(m,n) + f(m,n) – lowpass(f(m,n)) = (A – 1) f(m,n) + hipass(f(m,n)) For > A , part of the original image is added back to the highpass filtered version of f The result is the original image with the edges enhanced relative to the original image 28 Highpass filtering Original Image High-boost filtering 29    Averaging tends to blur details in an image Averaging involves summation or integration Naturally, differentiation or “differencing” would tend to enhance abrupt changes, i.e., sharpen edges Most common differentiation operator is the gradient: 30  The magnitude of the gradient is:  Discrete approximations to the magnitude of the gradient is normally used 31  Consider the following image region: z2 z3 z4 z5 z6 z7  z1 z8 z9 We may use the approximation: 32  This can implemented using the masks:  As follows: 33  Alternatively, we may use the approximation:  This can implemented using the masks:  As follows: 34   The resulting maks are called Roberts cross-gradient operators The Roberts operators and the Prewitt/Sobel operators (described later) are used for edge detection and are sometimes called edge detectors 35 36 37  Better approximations to the gradient can be obtained by:  This can be implemented using the masks: as follows: 38  Another approximation is given by the masks:  The resulting masks are called Sobel operators 39 Prewitt Sobel 40 ... Image enhancement in the spatial domain can be represented as: Transformation Enhanced Image g(m,n) = T(f)(m,n) Given Image  The transformation T maybe linear... original image is added back to the highpass filtered version of f The result is the original image with the edges enhanced relative to the original image 28 Highpass filtering Original Image High-boost... filtered image g can be thought of as the difference between the original image f and a lowpass filtered version of f :  g(m, n) = f(m, n) – lowpass(f(m, n)) 25 Original Image Highpass filtering

Ngày đăng: 26/01/2015, 09:32

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN