IMAGE ENHANCEMENT 1
What is image enhancement? Image enhancement techniques Point operation 2
What is Image Enhancement? Image enhancement is to process an image so that the result is more suitable than the original i limage for a Specific application. Image enhancement is therefore, very much dependent on the particular problem/image at hand. Image enhancement can be done in either: Spatial domain: operation on the original image g ( m, n ) T [ f ( m, n )] Frequency domain: operation on the DFT of the original i limage 3
Image Enhancement Techniques Point Mask Transform so Coloring o operation operation operation operation Image Negative Smoothing Low pass False Contrast operations filtering coloring Stretching Median High pass Full color Compression of Filtering Filtering dynamic range Sharpening processing Band pass Gray level slicing operations filtering Image Subtraction Derivative Image Averaging operations Homomorphic Histogram operations Histogram operations filtering Histogram operations 4
Point Operation What is point operation in image enhancement? Output pixel value g(x,y) at pixel (m,n) depends only on the input pixel value at f(m,n) at (m,n) (and not on the neighboring pixel values). We normally write s=t(r), where s is the output pixel value and r is the input pixel value. T is any increasing function that maps [0,1] into [0,1]. 5
Example: Convert a uint8 image into double one x is a uint8 array, with gray values in [0,255]. y is a double array, with gray values in [0,1] (obtained by linear scaling). 6
Image Negatives They are obtained by using the transformation function s=t(r). () T ( r) L 1 r L : maximum gray value T ( r) L 1 r Used mainly in medical images and to produce slides of the screen. 7
Example: 8
Contrast Stretching Increase the dynamic range of gray values in the input image. Suppose you are interested t in stretching t the input intensity it values in the interval [r 1, r 2 ]: Note that (r 1 - r 2 )<(s 1 - s 2 ). The gray values in the rang [r 1, r 2 ] 9 is stretched into the rang[s 1, s 2 ].
A special case: thresholding or binarization r 1 = r 2 =m ; s 1 =0 and s 2 =1 Useful when we are interested t din the shape of fthe objects. 10
Example: Original blood cell binary blood cell 11
Gamma Correction s 1 =0 and s 2 =1 0 r < r 1 g r r 1 T ( r), r1 r r r 2 r 1 1 r > r 2 2 Output image is darker Output image is brighter 12
Example: J = IMADJUST(I,[LOW_IN HIGH_IN],[LOW_OUT HIGH_OUT],GAMMA) original Gamma<1 Gamma>1 13
Compression of Dynamic Range When the dynamic range of the input gray values is large compared to that of the display, we need to compress the gray values range, ---example: Fourier transform magnitude (range 0 to 1.5x10 6 ). Typically we use a log scale. s=t(r)= c log(1+r) 14
Example: Original Fourier spectrum Result of log transformation, c=0.1 15
Look at the function: 1 s T() r 1 ( m / r ) E Where r represents the intensities of the input images, s is the corresponding intensity values in the output image, and E controls the slope of the function That function is called a contrast-stretching stretching transformation. The function compresses the input levels lower than m into a narrow range of dark levels in the output image; similarly, it also compresses the values above m into a narrow band of light levels in the output. 16
Gray Level Slicing Highlight a specific ranges of gray level One way is to display a high value for all gray levels in the range of interest and a low value for all other gray levels (binary image). Without t background 17
The second approach is to bi brighten the desired drange of gray levels but preserve the background and gray-level tonalities in the image: With background 18
19
Bit-Plane Slicing To highlight the contribution made to the total image appearance by specific bits. i.e. Assuming that each pixel is represented by 8 bits, the image is composed of 8 1-bit planes. Plane 0 contains the least significant bit and plane 7 contains the most significant bit. 20
More on bit planes: Only the higher order bits (top four) contain visually significant data. The other bit planes contribute the more subtle details. dtil Plane 7 corresponds exactly with an image thresholded at gray level 128. 21
22
Example: display different bits as an individual image original Bit 7 Bit 6 23
Image Subtraction In this case, the difference between two similar images is computed to highlight or enhance the differences between them: g(m,n) =f 1 (m,n) f 2 (m,n) It has applications in image segmentation and enhancement. 24
Example: segmentation original After processing Subtraction result 25
Image Averaging for Noise Reduction Noise is any random phenomenon that contaminates an image. Noise is inherent in most practical system: Image acquisition Image transmission Image recording Noise is typically modeled as an additive process g( m, n) f ( m, n) N ( m, n) Noisy image Noise free image Noise 26
The noise N(m,n) at each pixel (m,n) is modeled as a random variable. Usually, N(m,n) has Zero-mean and the noise values at different pixels are uncorrelated. Suppose we have M observations {g (m,n)}, i i=1 1,2,,M, we can (partially) mitigate the effect of noise by averaging 1 M g ( m, n ) gi ( m, n ) M i 1 In this case, we can show that 1 E[ g( m, n)] f ( m, n) Var[ g( m, n)] Var[ N( m, n)] M Therefore, as the number on observations increases (M infinite), the effect of noise trends to zero. 27
Example: Original M=1 M=10 28