Download presentation
Presentation is loading. Please wait.
Published byPatricia Baker Modified over 6 years ago
1
CSC 381/481 Quarter: Fall 03/04 Daniela Stan Raicu
Homepage: School of CTI, DePaul University 12/3/2018 Daniela Stan - CSC381/481
2
Outline Chapter 3: Image Enhancement in the Spatial Domain
Introduction (Section 3.1) Enhancement by point processing (Section 3.2): Image negatives Log transformations Power-law transformations Piecewise-linear transformations Histogram Processing (Section 3.3) Final Projects discussion 12/3/2018 Daniela Stan - CSC381/481
3
Introduction Image Enhancement procedures are techniques used to achieve a subjective improvement in image “quality” for a specific application (problem-oriented). Typical applications: noise removal geometric correction smoothing sharpening edge enhancement or extraction. Usually ad hoc procedures. Image Enhancement: in the Spatial Domain (pixel operators) the Frequency Domain (frequency filtering). 12/3/2018 Daniela Stan - CSC381/481
4
Spatial Domain Methods
Procedures that operate directly on the aggregate/neighborhood of pixels composing an image A neighborhood about (x,y) is defined by using a square (or rectangular) subimage area centered at (x,y). 12/3/2018 Daniela Stan - CSC381/481
5
Spatial Domain Methods
When the neighborhood is 1 x 1 then g depends only on the value of f at (x,y) and T becomes a gray-level transformation (also called an intensity or mapping) function: s=T(r) r,s: gray levels of f(x,y) and g(x,y) at any point (x,y) r denotes the pixel intensity before processing s denotes the pixel intensity after processing. These intensity transformations are also called point processing techniques. 12/3/2018 Daniela Stan - CSC381/481
6
Enhancement by Point Processing
The following methods are based only on the intensity of single pixels. Image negatives Log transformations Power-law transformations Piecewise-Linear Transformation Functions: Contrast stretching Gray-level slicing Bit-plane slicing 12/3/2018 Daniela Stan - CSC381/481
7
Image Enhancement in the
Spatial Domain Linear: Negative, Identity Logarithmic: Log, Inverse Log Power-Law: nth power, nth root 12/3/2018 Daniela Stan - CSC381/481
8
[0,L-1] the range of gray levels
Image Negatives Are obtained by using the transformation function s=T(r). Function T reverses the order from black to white so that the intensity of the output image decreases as the intensity of the input increases. [0,L-1] the range of gray levels S= L-1-r 12/3/2018 Daniela Stan - CSC381/481
9
Image Enhancement in the
Spatial Domain Medical applications: much easier to analyze the breast tissue in the negative image 12/3/2018 Daniela Stan - CSC381/481
10
Log Transformations s = c log(1+r) c: constant, r >=0
Compresses the dynamic range of images with large variations in pixel values 12/3/2018 Daniela Stan - CSC381/481
11
Piecewise-Linear Transformation Functions: Contrast Stretching
To increase the dynamic range of the gray levels in the image being processed. 12/3/2018 Daniela Stan - CSC381/481
12
Contrast Stretching The locations of (r1,s1) and (r2,s2) control the shape of the transformation function. If r1= s1 and r2= s2 the transformation is a linear function and produces no changes. If r1=r2, s1=0 and s2=L-1, the transformation becomes a thresholding function that creates a binary image. 12/3/2018 Daniela Stan - CSC381/481
13
Image Enhancement in the
Spatial Domain Contrast Stretching Thresholding 12/3/2018 Daniela Stan - CSC381/481
14
Contrast Stretching More on function shapes:
Intermediate values of (r1,s1) and (r2,s2) produce various degrees of spread in the gray levels of the output image, thus affecting its contrast. Generally, r1≤r2 and s1≤s2 is assumed. 12/3/2018 Daniela Stan - CSC381/481
15
Image Enhancement in the
Spatial Domain Low contrast image High contrast image 12/3/2018 Daniela Stan - CSC381/481
16
Spatial Domain Methods
Mask processing or filtering: when the values of f in a predefined neighborhood of (x,y) determine the value of g at (x,y). Through the use of masks (or kernels, templates, or windows, or filters). More in the next lecture when we discuss about Basics of Spatial filtering (Section 3.5) 12/3/2018 Daniela Stan - CSC381/481
17
Example of the use of a mask
Step 1: Move the window to the first location where we want to compute the average value and then select only pixels inside the window. Step 2: Compute the average value 4 6 7 1 9 2 5 3 4 1 9 2 3 7 Sub image p Step 3: Place the result at the pixel in the output image Original image 4.3 Step 4: Move the window to the next location and go to Step 2 Output image 12/3/2018 Daniela Stan - CSC381/481
18
Histogram Processing The histogram of a digital image with gray levels from 0 to L-1 is a discrete function h(rk)=nk, where: rk is the kth gray level nk is the # pixels in the image with that gray level n is the total number of pixels in the image k = 0, 1, 2, …, L-1 Normalized histogram: p(rk)=nk/n sum of all components = 1 To visualize the histogram of a digital image, we plot pr(rk) versus rk 12/3/2018 Daniela Stan - CSC381/481
19
Image Enhancement in the
Spatial Domain The shape of the histogram of an image does provide useful info about the possibility for contrast enhancement. 12/3/2018 Daniela Stan - CSC381/481
20
Types of Histogram Processing
Histogram equalization Histogram matching (specification) Local enhancement 12/3/2018 Daniela Stan - CSC381/481
21
Histogram Equalization
As mentioned above, for gray levels that take on discrete values, we deal with probabilities: pr(rk)=nk/n, k=0,1,.., L-1 The plot of pr(rk) versus rk is called a histogram and the technique used for obtaining a uniform histogram is known as histogram equalization (or histogram linearization). 12/3/2018 Daniela Stan - CSC381/481
22
Histogram Equalization (HE)
The technique used for obtaining a uniform histogram is known as histogram equalization (or histogram linearization). where pr(rk)=nk/n, k=0,1,.., L-1 Histogram equalization(HE) results are similar to contrast stretching but offer the advantage of full automation, since HE automatically determines a transformation function to produce a new image with a uniform histogram. 12/3/2018 Daniela Stan - CSC381/481
23
12/3/2018 Daniela Stan - CSC381/481
24
Local Enhancement When it is necessary to enhance details over smaller areas, then we need to devise transformation functions based on the gray-level distribution in the neighborhood of every pixel The procedure is: 1. Define a square (or rectangular) neighborhood and move the center of this area from pixel to pixel. 2. At each location, the histogram of the points in the neighborhood is computed and either a histogram equalization or histogram specification transformation function is obtained. 3. This function is finally used to map the gray level of the pixel centered in the neighborhood. The center is then moved to an adjacent pixel location and the procedure is repeated. 12/3/2018 Daniela Stan - CSC381/481
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.