0% found this document useful (0 votes)
10 views53 pages

Template Ait

The document discusses various image enhancement techniques, focusing on piecewise-linear transformations like contrast stretching, logarithmic transformations, and power-law transformations. It explains how these transformations manipulate pixel values to improve image quality, highlighting methods such as histogram equalization and bit-plane slicing. Additionally, it covers the importance of histograms in analyzing image quality and the effects of different transformation functions on contrast and visibility of details in images.

Uploaded by

roopa2875
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views53 pages

Template Ait

The document discusses various image enhancement techniques, focusing on piecewise-linear transformations like contrast stretching, logarithmic transformations, and power-law transformations. It explains how these transformations manipulate pixel values to improve image quality, highlighting methods such as histogram equalization and bit-plane slicing. Additionally, it covers the importance of histograms in analyzing image quality and the effects of different transformation functions on contrast and visibility of details in images.

Uploaded by

roopa2875
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 53

Piecewise-Linear

Piecewise-Linear Transformation
Transformation Functions
Functions
Case
Case 1:
1: Contrast
Contrast Stretching
Stretching
Some Basic Gray Level
Transformations
• simplest of all image enhancement techniques.
• The values of pixels, before and after processing, will be denoted by r
and s, respectively.
• s=T(r),
• where T is a transformation that maps a pixel value r into a pixel value
s.
• Since we are dealing with digital quantities, values of the
transformation function typically are stored in a one-dimensional array
and the mappings from r to s are implemented via table lookups.
• For an 8-bit environment, a lookup table containing the values of T
will have 256 entries. ECE Dept., AIT
• Three basic form of Transformation functions used frequently
for image enhancement:
• linear (negative and identity transformations)
• logarithmic (log and inverse-log transformations),
• power-law (nth power and nth root transformations).

ECE Dept., AIT


ECE Dept., AIT
The identity Transformation function

• Less useful
• output intensities are identical to input intensities.
• If we map input pixel value with output pixel value ,we will get same
value at the output
• Consider L\4,If we map that identity line we get i\p,o\p values are L\4

ECE Dept., AIT


Image Negatives
• Intensity levels [0,L-1]
• s=L-1-r
• To produce photographic negatives
• It will give the inverse value of the pixels[0-block,( L-1): WHITE]
• In Image Negative block will be converted into white
• s=L-1-r
• r=0 , s=L-1; block is converted into white

ECE Dept., AIT


Log Transformations
• Transformation maps a narrow range of low gray-level values in the input
image into a wider range of output levels.The opposite is true of higher
values of input levels.
• s = c log(1 + r)
• Compress the gray level and expand the gray level using log
transformation
• Some function can be performed using power law transformation
function also
• Log transformation at the output of the image we will get higher contrast
or lower contrast image ,depending upon the function we performed
ECE Dept., AIT
• Consider the logarithmic transformation graph, which is in the form of a
curve. If we take input pixel value as L\4,Let us map with the curve,
• Output pixel value somewhere we will get
• Input pixel value will narrower, output pixel value will wider
• Higher pixel value produce the higher contrast image,which will
enhance the image
• For inverse log TF, If we take PV 3L\4,If we map with output pixel value
• Wide i\p pixel value, narrow output pixel value we get, This will produce
the low contrast image at the output

ECE Dept., AIT


POWER LAW TRANSFORMATION
FUNCTION
• Power-law transformations have the basic form
• Gama>1; nth power
• Gama<1; the power law acts as nth root transformation
• It is also known as gama correction ,since we are using the constant
gama
• This transformation similar to log transformation but different values
of gama
• Input pixel is same vary the gama value we will get different high
contrast level, If we take nth power transformation.

ECE Dept., AIT


gama>1,compression of brightness
region
gama<1,expansion of darker region

ECE Dept., AIT


• Inensity ramp image ,To display any image on the monitor, it display
darker image compared to original image before g correction
• fig(2) more darker compare to original image
• Correct original image using g correction get fig 3
• G corrected img is displayed on the monitor which is approximately
equal and more accurate than original image
• This is one application of g correction

ECE Dept., AIT


ECE Dept., AIT
• MRI SCAN of SC ,There is a fracture but this line is on the darker
region of the fig
• G correction ,That is power law transformation
• Observed that g value is reduced ,darker part of the region is
expanded

ECE Dept., AIT


• Comressing brighter intensity level
• Original image is washedout ,brighter intensity level dominating
• We perform g –c, produces fig b with g=3,
• Darker, brighter int level compressed
• G=5 easily identify the details present in the image

ECE Dept., AIT


Piecewise-Linear Transformation Functions
Case 1: Contrast Stretching

• Contrast is the difference between the lowest and highest gray level of
an image
• Low-contrast images can result from poor illumination, lack of
dynamic range in the imaging sensor, or even wrong setting of a lens
aperture during image acquisition.
• The idea behind contrast stretching is to increase the dynamic range of
the gray levels in the image being processed. Figure 3.10(a) shows a
typical transformation used for contrast stretching. The locations of
points (r1, s1) and (r2, s2) control the shape of the transformation
• Idea is to increase the contrast of an image by making darker portion
more darker, brighter portion more brighter
ECE Dept., AIT
• Transformtion function
• Low contrast image,not properly visible
• Result of contrast stretching
• Result of thresholding

ECE Dept., AIT


Gray-level slicing
• Highlighting a specific range of gray levels in an image often is
desired.
• There are several ways of doing level slicing,
• One approach is to display a high value for all gray levels in the range
of interest and a low value for all other gray levels.
• This transformation, shown in Fig. 3.11(a), produces a binary image
• The second approach, based on the transformation shown in Fig.
3.11(b), brightens the desired range of gray levels but preserves the
background

ECE Dept., AIT


• Highlighting a specific range of gray levels in an image
• 1st approach to implement GLS IS
• To display a high value of all GL in the range of interest & low level value for
all other GL, this transformation produce the binary image.
• Region of interest having high value, other GLS having low value
• Range of pixels b\w A&B are high value, other pixels are having low value
• 2nd approach is to brighten the desired GLS but preserve the GLSUnchanged
for other pixels,
• values of pixels b\w A&B is given higher value or it is highlighted, the other
pixel value are kept as it is , it is similar linear line of identity. pixel value
change only b\w A&B
ECE Dept., AIT
Examples of GLS GLS is performed on fig(c)
Fig(d) image obtained after performing GLS
using 1st approach, only desired pixels are
having higher value ,remaining pixels are
having lower value
Brighten the desired gray Level
range ,Preserve the GL unchanged for the
other pixels
Values of pixels between A &B ARE GIVEN
higher value, other pixels values are kept as
it is, this is similar to linear line of identity,
only pixel value change between A&B

ECE Dept., AIT


Piecewise-Linear Transformation Functions
Piecewise-Linear Transformation Functions
• Bit-plane slicing: Case
Case 3:Bit-plane
3:Bit-plane Slicing
Slicing
– It can highlight the contribution made to total image
appearance by specific bits.
– Each pixel in an image represented by 8 bits.
– Image is composed of eight 1-bit planes, ranging from bit-
plane 0 for the least significant bit to bit plane 7 for the most
significant bit.
– Bit plane 0 is LSB, 7 is MSB .The higher order bits. Top 4 bits
contains majority of information, visually significant data
– Seperating digital image into its bit plane is useful for
analysing the relative importance played by each bit, this
method is used in image compression
• Ex of 8 bit image,fig shows 8 bit plane of image
• Top4 bits are having majority of visually significant data

ECE Dept., AIT


• dark, light, low contrast, high contrast, and their corresponding histogram
• If we consider a dark image, the histogram is placed at 0,it is grouped at
block values ,image consists of block pixels
• Darker images HIG lies towards lower intensity level
• If we consider a bright image, the histogram values are placed towards
white or 255 , Indicates more white pixels
• at 0,it is grouped at block values ,image consists of block pixels
• In low contrast , Image is placed at center
• In high contrast , Image histogram is placed at entire plan
• histogram at entire plan is called as flat profile of Histogram
• Uniform distribution of HIG over entire range intensity levels

ECE Dept., AIT


ECE Dept., AIT
Histogram Processing
• Histograms are the basis for spatial domain processing techniques.
Used to improve quality.
• Histogram manipulation can be used effectively for image
enhancement. In addition to providing useful image statistics,
histograms also is quite useful in other image processing
applications,such as image compression and segmentation.
• Histogram equalization is technique in order to obtain flatten
histogram, to improve the quality of the image, we will flatten the
HIG.we will make it uniform .It is distributed over entire range of
intensity 0 to L-1

ECE Dept., AIT


• The histogram of a digital image with gray levels in the range [0, L-1]
• The histogram of a digital image is the representation of the frequency
of the occurrence of the each gray level in the image
• Histogram can be represented graphically in the form of a plot
• 2 methods
• X-axis- gray levels
• Y-axis-no. of pixels in the image in each gray levels
• Histograms can be plotted as
HIS is a discrete function cab be mathematically represented as
H(rk)=nk, where rk is the kth gray level and nk is the number of pixels
in the image having gray level rk.
10 Pixels are having the intensity value 1
ECE Dept., AIT
• 2nd Method
• X-axis- gray levels
• Y-axis-Probability of occurrence of no. of pixels in each gray level
• Histograms can be plotted as
• P(rk)=nk/MN
• Rk: kth intensity level
• nk:no. of pixels in the image with intensity level rk
• MN: Total number of pixels in the image
• In this method rather than simply finding no.of pixels having that particular int .levels.
• Here we find out the Probability of occurrence of no. of pixels with that particular intensity levels
• To find out the prob. (2) No. off pixels with intensity level rk divide by no. of pixels
• Rk=3, to find out the Y-axis-Probability of occurrence of this, first we need to find out the no. of
pixels having int levels
• M; no. of rows N: columns
• Nk=30 mn=100
• P(rk)=nk/mn
ECE Dept., AIT
• Nomalized histogram
• These are the 2 methods in order to represenr Histogram plots
• Fig 1 shows the darker pollen image,very diff to find the fine details
hidden in this image

ECE Dept., AIT


• TO illustrate that
• By looking into it ,it is poor quality image ,daker image ,H plot
towards left ,lower int level
• To improve the quality go for HIS Equalization
• Output image appears like this
• This is the good quality image, uniform distribution of intensity levels

ECE Dept., AIT


Image appears like washed out,fine details not
able to observe,Brighter images HIS is
concentrated towards Right side

ECE Dept., AIT


Low contrast pollen image,information is not visible
properly, HIS concentrated at the center, it is in the
narrower range of int level. High contrast image, details
are clearly visible, it is a good quality image.plots are
distributed towards entire range of int level.uniformly
distributed

ECE Dept., AIT


• Darker img --- HIS lower int l
• Lighter img ---- Higher int L
• Low contrast—narrower int level at the center of the graph
• Good quality img--- uniformly distributed, entire int level

ECE Dept., AIT


ECE Dept., AIT
ECE Dept., AIT
ECE Dept., AIT
ECE Dept., AIT
ECE Dept., AIT
ECE Dept., AIT
• To transform intensity level into new intensity levels transformation
function is used
• S=T(r)
• Mapping of r to s depends on T. T can be any operator
• To perform HIS EQUALIZATION there are 2 important conditions

ECE Dept., AIT


ECE Dept., AIT
• Monotonically increasing function means based on cumulative result
• Rk is mapped to sk,the transformed value of rk is sk after using transform
function tr
• Using transformed value sk ,I can recover back the original intensity value
of original value rk,just by performing inverse transform operation I can
recover the original intensity valu r rk by using this sk value
• Tr varies from 0 to L-1, R varies from 0 to L-1,

• Image satisfy these 2 conditions then only we can perform histogram


equalization
ECE Dept., AIT
• Image having continuous intensity values ,after histogram equalization it
produces flatten histogram image
• Poor quality image, low contrast image after performing HgE ,the
histogram is flatten so that the HG is uniformly distributed over 0 to L-1 ,
PRODUCING a good quality image
• To illustrate that , dealing with Continous images, Consider PDF
• Pr(r)---PDF of r
• PS(s)—PDF of S
• In order to find the PDF of transformed variable S
• From basics of Prob theory
ECE Dept., AIT
• In order to find PDF of transformed variable S ,I need to use
• Ps(S)=Pr(r) input img
• Since imgs what we r dealing with are cont. images TF TR(R) is
differentiable over the range of interest 0 to L-1

ECE Dept., AIT


• HEQ, is a good approach, implementation is simple
• HEQ is not a best approach for some applications
• This is applied for entire image, it is not suitable if u wish to enhance
specific region
• New approach HIS matching or HIS specificaations
• Method to generate a processed image that has a specified histogram
• Histogram is used for various image processing applications like
maupulating contrast or brightness
• Histogram can control quality of the image by normalizing the histogram
values to a flat profile
ECE Dept., AIT
• Spatial domain
• Operation performed in Spatial domain are further classified into
intensity transformation & spatial filtering
• In intensity transformation operation performed directly on single
pixel present in the image
• In spatial filtering we don’t directly operate on a single pixel instead
here we consider the neighborhood of the pixel, resulting intensity is
assigned to center pixel

ECE Dept., AIT


• Perform intensity transformation directly on single pixel
• Spatial filter we don’t directly operate on single pixel instead we are
• Consider neighbouring pixel

ECE Dept., AIT


Histogram Processing
• GL [0 L-1]
• It is the representation of Frequency of occurrence of each G L in the
image.
• HIG can be represented graphically in the form of plots

ECE Dept., AIT


ECE Dept., AIT
ECE Dept., AIT
ECE Dept., AIT
ECE Dept., AIT
ECE Dept., AIT
ECE Dept., AIT
ECE Dept., AIT

You might also like