JGD - 3rd Sem
JGD - 3rd Sem
user inputs. One of the simplest piecewise linear function is that P(rk) gives an estimate of the probability of the occurance of gray level
contrast stretching transformation. rk. note that the sum of all components of a normalized histogram is
Linear Transformation Function equal to 1.
Piecewise Linear Transformation Function Bit plane slicing: Histogram Equalization: it is responsible to conclude that an image
Power Law Transformation 1011 0101 0000 0111 11110000 whose pixels tend to occupy the entire range of possible gray level &
Logarithmmic Transformation 0111 0101 1000 0000 1100 000 in addition tend to be distributed uniformly will have n appearance of
Bit Plane Transformation 0111 1101 1100 1001 0010 0010 high contrast and will exhibit a large variety of gray tones. The net
effect will be an image that shows a great deal of gray level details. A
The types of images in which we are interested are generated by the Break this up into 8 (Xerox 17.08) considering the weights of bits from transformation function that can automatically achieved this effect
combination of an illumination source and the reflection or the most to the least significant bits thus we get 8 different images based only on information available in the histogram of the input
absorption of energy from that source by the elements of the scene from the initial image. image is called histogram equilization or histogram linearization. The
being image. An image is represented using a 2-D function f(x,y) transformation for histogram equalization is defined as follows:
where x and y are spatial co-ordinates and the amplitude of f at any 128 0 128 0 0 64 Sk = T (rk) =
pir of co-ordinates (x,y) is called the intensity or grey level of the 0 128 128 64 0 64
image at the point. Then x,y and the amplitude value of f are all finite 0 128 0 0 64 0 Ramp function & ramp image:
discrete qualities, we call the image a digital image. A digital image is Algorithm:
composed of a finite no. of elements each of which has a particular This is done to analyse the contribution of each bit in the image. for (i=0; i<n; i+t)
location & value. These elements are referred as picture elements, Minute details of images are contributed by lower order bits. for (j=0; j<256; j+t)
image elements/pels and pixels. Bolder shades are contributed by higher order bits. A[i] [j] = j;
The function of f(x,y) may be characterize by two components, the Notes: (Diagram27.07)
amount of source illumination, incident on the scene being viewed & Instead of highlighting grey level ranges, highlighting the contribution (Diagram 27.07)
the amount of illumination reflected by the objects in the scene. made to total image appearance by specific bits might be desired. for (i=0; i<256; i+t)
Appropriately the scenes are called illumination & reflectance Note that the higher order bits (especially the top 4) contain the for (j=0; j<256; j+t)
components and are denoted by I(x,y) and R (x,y) respectively. majority of the visually significant data. The other bit planes if (i-127)2 + (j-127) 2 <= r2)
The two function combined as a product to form f(x,y). contribute to more subtle details in the image. Separating a digital A[i] [j] = 255;
Therefore, f(x,y) = i(x,y) * r(x,y) image into its bit planes is useful for analyzing the relative importance else A[i] [j] = 0;
played by each bit of the image, a process that aids in determining
Sampling & Quantization: the adequacy the no. of bits used to quantize each pixel. This type of Graded Circle:
The continuous image of f(x,y)is converted to digital form using decomposition is useful in image compression. (diagram27.07)
Sampling & Quantization. The function will have to be sampled in
both coordinates and in amplitudes. Digitizing the coordinate values Use of Arithmetic & logical operators in Image Processing: for (i=0; i<256; i+t)
is called Sampling Digitizing. The amplitude value is called Bit masking: for (j=0; j<256; j+t)
Quantization. 110 60 20 0 0 0 0 if (((i-127)2 + (j-127) 2 <= r2)
Enhancement functions: 0 0 A[i] [j] =j;
1.Contrast Enhancement, 2.Brightness Enhancement, 3.Noise 110 40 5 0 255 0 = 0 else A[i] [j] = 0;
Removal. 40 0
Also we have sharpening and blurring. 4 10 15 0 255 0 0
10 0 for (i = 0; i<m; i+t)
Image enhancement approaches fall into 2 broad categories: 5 88 110 0 0 0 0 for (j = 0; j<n; j+t)
1.Spatial Domain Methods, 2.Frequency Domain Methods 0 0 B [i] [j] = A [j] [i];
Black background mask (Diagram 3.08)
The term spatial domain refers to the image plain itself & approaches
in this category are based on direct manipulation of pixels in an Vertical flip (mirror image)
image. Frequency domain processing techniques are based on Extract a certain portion of the image:
modifying the fourier transform of an image. Spatial domain for (i = 0; i<m; i+t)
processes will be denoted by the expression g(x,y) = T[ f(x,y)] 110 60 20 255 255 255 255 for (j = 0; j<n; j+t)
Where f(x,y) is an input image, g(x,y) is the transformed oimage and T 255 255 B [i] [j] = A [i] [n-1=j];
is the operator on f defined over same neighbourhood of (x,y). in 110 40 5 255 0 255 255
addition T can operate on a set of input images such as performing 40 255 Negative of an image
the pixel sum of K images etc. in this case g depends only on the value 4 10 15 255 0 255 = 255
of f at (x,y) and t becomes a grey level transformation function of the 10 255 for (i = 0; i<m; i+t)
form s= t(r) where for simplicity in notation, r & s are variables 5 88 110 255 255 255 255 for (j = 0; j<n; j+t)
denoting respectively the grey level of f(x,y) and g(x,y) at (x,y). 255 255 B [i] [j] = 255- A[i] [j]);
white background mask
Contrast Stretching Function:
T(s)= r - 10, 30<= r <= 60 whether we use a white mask or a black mask depends on whether
= r + 10 100<= r <=150 the image itself is a dark o bright image. This can be known by
analysyzing the histogram of the image.
A histogram is a graph that calculates the frequency of each pixel
value of an image.
S=r Bit masking is very useful in security.
S = T(r) = c*r Image subtraction:
T(r) = r, 0<= r <= r 1 Images are taken at successive internals of say a few minutes and
= c*r, r1 < r <= r2 then the image subtraction is done. The resultant image should be
=r, r2 <r <=255 completely block (0), if the 2 images are supposed to be same.
Note:
Arithmetic logic operations on images are performed by a pixel by
Grey level slicing pixel basis between 2 more images. For example subtraction of 2
Logarithm transformation: s = c log (1+r) images results in a new image who pixel at coordinates (x,y) is the
Power law transformation: s= 10.08 difference between the pixels at the same location in the 2 images
being subtracted. Logic operations similarly operate on a pixel by
Grey level slicing: pixel basis. When dealing with logic operations on grey scale images,
Highlighting a specific range of grey level in an image is often desire pixels values are processed as strings of the binary numbers. The
Applications include enhancing input such as enhancing laws an extra ‘and’ and ‘or’ operations are used for masking i.e. for selecting
image. One approach is to display a high value for all grey levels in the subimages in an image. Of the 4 arithmetic operations, subtraction
range of interest and the low value for all other grey levels. and addition are the most useful. One of the most commercially
successful and beneficial uses of image subtraction is in the area of
Logarithm transformation: the shape of the log curve shows that this medical imaging. The procedure consists of injecting a contrast
transformation maps a narrow range of low grey level values in the medium into the patient’s blood stream, taking a series of images of
input image into a wider range of output levels. The opposite is true the same anatomoical region and subtracting this mask, from the
of the higher values of input levels. We would use a transformation of series of incoming images after injection of the contrast medium.
this type to expand the value of dark pixels in an image while Noise removal
compressing the higher level value. The opposite is true of inverse log
transformation. 40 can be considered a noise pixel. We can smooth it out, by
calculating the average of the neighbourhood pixels (say of size 3*3,
Power law transformation: as in the case of log transformation, 4*4 or 5*5) and replacing the noise pixel by this average value.
power law curves with functional values of gamma map a narrow Medium is a better technique for smoothing as compared to mean
range of dark input values into a wider range of output values with
the opposite being true for higher values of input levels. A variety of
devices used for image capture like respond according to a power law
transformation. The process used to correct the power law response 24.08
phenomenon is called correction. All we need to do is preprocess the
input image before inputting it into the monitor by performing the Histogram of image: with gray level in the range [0,L-1] is a discrete
power law transformation. function h(rk) = nk where rk is the kth gray level and n k is the no. of
pixels in the image having gray level r k. it is common practice to
Piecewise Linear Transformation: the principle advantage of this normalize a histogram by dividing each of its values by the total no of
function over the other functions is that that form of Piecewise pixels in the image, denoted by n. thus the normalized histogram is
functions can be arbitrarily complexed. The principle disadvantage of given by P(rk) = nk/n for k = 0,1,…….. n-1.
this function is that their specification requires considerably mere