It makes all the difference whether one sees darkness through the light or brightness through the shadows David Lindsay IMAGE ENHANCEMENT in SPATIAL DOMAIN by Intensity Transformations Kalyan Kumar Barik Synergy 1
Image Enhancement Image enhancement is the process of making images more useful. Processing an image to enhance certain features of the image. The reasons for doing this include: Highlighting interesting detail in images Removing noise from images Making images more visually appealing The result is more suitable than the original image for certain specific applications. 2
Image Enhancement Examples 3
Image Enhancement Examples(cont...) 4
Different Enhancement Techniques There are two broad categories of image enhancement techniques Spatial domain techniques Work image plane itself Direct manipulation of image pixels in an images Frequency domain techniques Modify Fourier transform coefficient of an image Take inverse Fourier transform of the modify coefficients to obtain enhanced image We will focus on the spatial domain methods 5
Spatial domain Enhancement techniques Operate directly on the pixels composing an image Pixel gray level information is use Output Gray level of pixel f(x,y) is denoted by g ( x, y ) T [ f ( x, y )] T : Mapping Function Or Gray level Transformation g(x,y) : output gray level Usually a neighborhood about image position (x,y) is considered by using a square or rectangular pixel area centered at (x,y) 6
g( x, y) T[ f ( x, y)] f(x,y) input image, g(x,y) output image T is an operator on f defined over a neighborhood of point (x,y) 7
Types Spatial domain Enhancement techniques There are three broad categories of Spatial domain enhancement techniques Point Processing Neighborhood Processing Histogram Processing Point processing : Mapping function T depends only on the value of f at (x,y) Neighborhood Processing : Mapping function T depends on the value of f at (x,y) & neighboring pixels of f(x,y) Histogram Processing : Mapping function T depends on all the pixels of an image 8
Intensity Transformations Point processing also called as Intensity Transformation or Gray level Transformation or Zero Memory Operation 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 (or mapping) function: S=T(r) where r and s denotes respectively the intensity of g and f at any point (x, y). 9
Some Simple Intensity Transformations Image negatives Log Transformations Power-law Transformation Piecewise-Linear Transformation Functions: Thresolding Contrast stretching Gray-level slicing Bit-plane slicing 10
Image Negatives Image Negative is a Point Processing where : s=t(r) Image Negative is obtained by : s=l-1-r where [0, L-1] denotes intensity levels of the image. 11
Image Negatives 1 2 7 8 9 4 5 5 9 8 7 2 1 0 5 4 4 0 12
Image Negatives Function reverses the order from black to white so that the intensity of the output image decreases as the intensity of the input increases Used mainly in medical images and to produce slides of the screen 13
Log Transformations Log Transformation of an image is obtained by s s = c log(1+r) Where c: constant S=clog(1+r) r 14
Maps a narrow range of low gray level values into a wider range of output levels Opposite is true of higher values of input levels To accomplish spreading and compressing of gray levels Imp: It compresses the dynamic range of images with large variations in pixel levels Ex: Fourier spectra Log Transformations 15
Example: Log Transformation 16
Power Law (Gamma) transformation Power-law Transformation of an image is obtained by : s cr Where C, : positive constants Application in Gamma correction =c=1: identity 17
Power Law (Gamma) transformation Maps a narrow range of low gray level values into a wider range of output levels, when 'γ' is Fractional Opposite is true of higher values of input levels. when 'γ' is higher The process used to correct the power-law response phenomena is called Gamma- Correction Gamma correction is important when displaying images on computer screen 18
Power Law (Gamma) transformation 19
Gamma Correction 20
Typical Types of Gray-level Transformation 21
Piecewise Linear Transformation Functions A complementary approach to the previous Methods These functions can be arbitrarily complex Some important transformations are purely piece-wise linear transforms Disadv: Specification requires more user input Ex: Contrast stretching transform 22
Thresholding function Special case of clipping ie s = L-1 for r >m Useful for binarization of scanned binary images documents, signatures, fingerprints 23
Contrast Stretching Low-contrast images : Poor illumination, lack of dynamic range in sensor, wrong setting of lens aperture To increase the dynamic range of the gray levels in the image being processed Contrast stretching is a process that expands the range of intensity levels in a image so that it spans the full intensity range of the recording medium or display device. 24
The locations of (r 1,s 1 ) and (r 2,s 2 ) control the shape of the transformation function If r 1 = s 1 and r 2 = s 2 the transformation is a linear function and produces no changes If r 1 =r 2, s 1 =0 and s 2 =L-1, the transformation becomes a threshold function that creates a binary image More on function shapes: Contrast Stretching Intermediate values of (r 1,s 1 ) and (r 2,s 2 ) produce various degrees of spread in the gray levels of the output image, thus affecting its contrast Generally, r 1 r 2 and s 1 s 2 is assumed 25
Contrast Stretching - Examples 26
Gray-Level Slicing Also called as Intensity-level Slicing. To highlight a specific range of gray levels in an image (e.g. to enhance certain features) One way is to display a high value for all gray levels in the range of interest(roi) and a low value for all other gray levels (binary image) 27
Gray-Level Slicing The second approach is to brighten the desired range of gray levels but preserve the background and gray-level tonalities in the image: 28
Gray-Level Slicing 29
Bit-Plane Slicing To highlight the contribution made to the total image appearance by changing specific bits of gray levels. 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 Only higher order bits (top four) contains visually significant data where other bit planes contribute the more subtle details. Aids in determining the adequacy of the number of bits used to quantize each pixel Also in image compression 30
Bit-Plane Slicing MSB LSB 31
Bitplanes Original 8bits/pixel Bitplane 7 Bitplane 6 one 8-bit byte Bitplane 7 Bitplane 0 Bitplane 5 Bitplane 4 32
Bitplanes Original 8bits/pixel Bitplane 7 Bitplane 3 Bitplane 2 Bitplane 0 Bitplane 1 Bitplane 0 33
Bit-Plane Slicing exp.. Q: Show the 3 bit-plane slicing of following image A: Binary equivalent pixels is If LSB changed to zero 000 000 000 If USB changed to zero 100 110 110 4 6 6 010 011 100 2 2 4 001 010 011 010 011 000 001 001 000 0 0 0 1 2 3 2 3 0 1 1 0 5 6 7 2 3 4 1 1 0 101 110 111 010 011 100 001 001 000 34
****Thank You**** 35