Image Processing Lecture PDF
Document Details
Uploaded by AmbitiousStream895
Dr. Doaa Ali Taban
Tags
Summary
This document provides an introduction to image enhancement techniques. It covers both spatial and frequency domain methods, including linear and non-linear transformations. The document discusses applications of these techniques, including contrast stretching and negative transformations. Specific examples of implementation are highlighted in MATLAB.
Full Transcript
Image processing Lecture Dr. Doaa Ali Taban CHAPTER FIVE: Image Enhancement Image Enhancement 5.1 Image Enhancement Image enhancement is the process of manipulating an image so the result is more suitable than the origi...
Image processing Lecture Dr. Doaa Ali Taban CHAPTER FIVE: Image Enhancement Image Enhancement 5.1 Image Enhancement Image enhancement is the process of manipulating an image so the result is more suitable than the original for a specific application. The idea behind enhancement techniques is to bring out details that are hidden, or simple to highlight certain features of interest (such as edges, boundaries, or contrast) in an image. Enhancing an image provides better contrast and a more detailed image as compare to non-enhanced image as in |Figure (1). image enhancement techniques usually have one of these two goals: 1. To improve the subjective quality of an image for human viewing. 2. To modify the image in such a way as to make it more suitable for further analysis and automatic extraction of its contents. Figure (1) Image Enhancement. 1 5.2 Image Enhancement Approaches Image enhancement approaches fall into two broad categories: spatial domain methods and frequency domain methods. Spatial domain: The methods in this category are based on direct manipulation of pixels in an image. Frequency domain methods: are based on modifying the Fourier transform of an image. 5.3 Image Enhancement in Spatial Domain Spatial domain refers to the image plane itself. i.e. the total number of pixels composing an image. Spatial domain methods are procedures that operate directly on these pixels. To enhance an image in the spatial domain, an image is transformed by changing pixel values or moving them around. A special domain process is denoted by the expression: s = T(r) where, r is the input image, s is the processed image, and T is an operator on r. The operator T is applied at each location (x,y) in r to yield the output, s, at that location. 5.4 Enhancement Using Basic Gray-Level (Point) Transformations Point operations are also referred to as gray-level transformations can be expressed as g(x, y) = T[f(x, y)] (1) where g(x, y) is the processed image, f (x, y) is the original image, and T is an operator on f (x, y). Since the actual coordinates do not play any role in the way the transformation function processes the original image, equation (2) can be rewritten as: s = T(r) (2) where r is the original gray level of a pixel and s is the resulting gray level after processing. Point operations are usually treated as simple mapping operations whereby the new pixel value at a certain location (x0, y0) depends only on the original pixel value at the same location and the mapping function. In other words, the resulting image does not exhibit any change in size, geometry, or local structure if compared with the original image. Basic gray-level (point) transformation function, illustrated in Fig. (2), can be divided into: 2 Linear: such as image negative and piecewise-linear transformation Non-linear: such as logarithm and power-law transformations. Figure (2) Some basic intensity transformation functions. Each curve was scaled independently Our interest here is on the shapes of the curves, not on their relative values. 5.4.1 Linear Transformation 1. Image Negatives In negative transformation, each value of the input image is subtracted from the L-1 (255) and mapped onto the output image. IMAGE NEGATIVE: The image negative with gray level value in the range of [0,L-1] is obtained by negative transformation given by S =T(r) or s = (L − 1) − r Where r= gray level value at pixel (x,y), L is the largest gray level consists in the image. Reversing the intensity levels of a digital image in this manner produces the equivalent of a photographic negative. This type of processing is used, for example, in enhancing white or gray detail embedded in dark regions of an image, especially when the black areas are dominant in size. The Figure bellow is example of using negative transformation in analyzing digital mammogram. Where it easier to analyze the fine details of the breast tissue using the negative image. 3 (a) (b) Figure (3) (a) The original image is a digital mammogram (b) negative image obtained using negative transformation. In MATLAB (Negative image) img = imread('image.jpg'); img = rgb2gray(img); % Convert to grayscale if the image is RGB negative_img = 255 - img; imshow(negative_img); title('Negative Image'); 2. Piecewise-linear Transformation The piecewise linear functions can be arbitrarily complex; the main disadvantage of these functions is that their specification requires considerable user input. Some important transformations can be formulated only as piecewise functions, such as thresholding: For any 0