0% found this document useful (0 votes)
11 views10 pages

DIP-EXP2-modified

The document outlines an experiment on point processing operations in image processing, focusing on techniques such as image negation, log transformation, power-law transformation, and image flipping. It discusses the fundamentals of digital image enhancement, including spatial and frequency domain methods, and provides theoretical background on basic gray level transformations. The document also includes references for further reading and emphasizes the importance of gamma correction in accurately displaying images.

Uploaded by

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

DIP-EXP2-modified

The document outlines an experiment on point processing operations in image processing, focusing on techniques such as image negation, log transformation, power-law transformation, and image flipping. It discusses the fundamentals of digital image enhancement, including spatial and frequency domain methods, and provides theoretical background on basic gray level transformations. The document also includes references for further reading and emphasizes the importance of gamma correction in accurately displaying images.

Uploaded by

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

PUNE INSTITUTE OF COMPUTER TECHNOLOGY, PUNE - 411043

Department of Electronics & Telecommunication Engineering

CLASS : T.E. E&TCE SUBJECT: DIP

EXPT. NO. : 2 DATE:

TITLE : POINT PROCESSING OPERATIONS ON AN IMAGE.

CO 1: Apply the fundamentals of digital image processing to perform various image-


enhancement and Image segmentation operations on gray scale image.

AIM :

To implement:
1. Negative of an image
2. Log transformation
3. Power Law Transformation
4. Image Flipping

SOFTWARES REQUIRED: Google Colaboratory / Jupyter Notebook

THEORY:

2.1 Image Enhancement.


The principal objective of enhancement is to process an image so that the result is
more suitable than the original image for a specific application. Image enhancement

T.E. DIP- SEM II A.Y. 2024-25


PUNE INSTITUTE OF COMPUTER TECHNOLOGY, PUNE - 411043

Department of Electronics & Telecommunication Engineering

approaches fall into two broad categories: spatial domain methods and frequency domain
methods. The term spatial domain refers to the image plane itself, and approaches in this
category are based on direct manipulation of pixels in an image. Frequency domain
processing techniques are based on modifying the Fourier transform of an image.

2.1.1 Spatial Domain Transformations.


The term spatial domain refers to the aggregate of pixels composing an image.
Spatial domain methods are procedures that operate directly on these pixels. Spatial domain
processes will be denoted by the expression:
g(x, y) = T[f(x, y)]
where f(x, y) is the input image, g(x, y) is the processed image, and T is an operator on f,
defined over some neighborhood of (x, y). In addition, T can operate on a set of input
images.
The principal approach in defining a neighborhood about a point (x, y) is to use a
square or rectangular sub image area centered at (x, y), as Fig. 2.1 shows. The center of the
sub image is moved from pixel to pixel starting, say, at the top left corner. The operator T
is applied at each location (x, y) to yield the output, g at that location. The process utilizes
only the pixels in the area of the image spanned by the neighborhood. Although other
neighborhood shapes, such as approximations to a circle, sometimes are used, square and
rectangular arrays are by far the most predominant because of their ease of implementation.

T.E. DIP- SEM II A.Y. 2024-25


PUNE INSTITUTE OF COMPUTER TECHNOLOGY, PUNE - 411043

Department of Electronics & Telecommunication Engineering

Fig 2.1: A 3x3 neighborhood about a point in an image f(x,y)

The simplest form of T is when the neighborhood is of size 1*1 (that is, a Single pixel).
In this case, g depends only on the value of f at (x, y), and T becomes a gray-level (also
called intensity or mapping) transformation function of the form:
s = T(r)
Where, for simplicity in notation, r and s are variables denoting, respectively, the gray level
of f(x, y) and g(x, y) at any point (x, y).

2.2 Basic Gray Level Transformations:

2.2.1 Image Negative:


The negative of an image with gray levels in the range [0,L-1]is obtained by using
the negative transformation, which is given by the expression,
s=L-1–r
Reversing the intensity levels of an image in this manner produces the equivalent of
a photographic negative. This type of processing is particularly suited for enhancing white
or gray detail embedded in dark regions of an image, especially when the black areas are
dominant in size.

T.E. DIP- SEM II A.Y. 2024-25


PUNE INSTITUTE OF COMPUTER TECHNOLOGY, PUNE - 411043

Department of Electronics & Telecommunication Engineering

Fig 2.2: Some Basic Gray level Transformations

2.2.2 Log Transformation:


The general form of the log transformation shown in Fig. 2.2 is
s = c log (1+r)
where c is a constant, and it is assumed that r >= 0.The shape of the log curve in
Fig. 2.2 shows that this 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. We would use a transformation of this type to expand the values of dark pixels
in an image while compressing the higher-level values. The opposite is true of the inverse
log transformation. Any curve having the general shape of the log functions shown in
Fig.2.2 would accomplish this spreading/compressing of gray levels in an image. In fact,
the power-law transformations discussed next are much more versatile for this purpose than
the log transformation. However, the log function has the important characteristic that it

T.E. DIP- SEM II A.Y. 2024-25


PUNE INSTITUTE OF COMPUTER TECHNOLOGY, PUNE - 411043

Department of Electronics & Telecommunication Engineering

compresses the dynamic range of images with large variations in pixel values. A classic
illustration of an application in which pixel values have a large dynamic range is the Fourier
spectrum. At the moment, we are concerned only with the image characteristics of spectra.
It is not unusual to encounter spectrum values that range from 0 to or higher .While
processing numbers such as these presents no problems for a computer, image display
systems generally will not be able to reproduce faithfully such a wide range of intensity
values. The net effect is that a significant degree of detail will be lost in the display of a
typical Fourier spectrum. In such scenarios, log transformation is used.

2.2.3 Power - Law (Gamma) Transformation:

Power-law transformations have the basic form


s=crγ
Plots of s versus r for various values of γ are shown in Fig. 2.3 on the next page. Here
c and γ are positive constants. As in the case of the log transformation, power-law curves
with fractional values of gamma map a narrow range of dark input values into a wider range
of output values, with the opposite being true for higher values of input levels. Unlike the
log function, however, we notice here a family of possible transformation curves obtained
simply by varying γ. As expected,we see in Fig. 2.3 that curves generated with values of γ
>1 have exactly the opposite effect as those generated with values of γ<2. Finally, we note
that eq. s=crγ reduces to the identity transformation when c= γ =2. A variety of devices used
for image capture, printing, and display respond according to a power law. By convention,
the exponent in the power-law equation is referred to as gamma. The process used to
correct the power-law response phenomena is called gamma

T.E. DIP- SEM II A.Y. 2024-25


PUNE INSTITUTE OF COMPUTER TECHNOLOGY, PUNE - 411043

Department of Electronics & Telecommunication Engineering

correction. Gamma correction is important if displaying an image accurately on a computer


screen is of concern.

Fig 2.3: Plots of the curve s=crγ for various values of γ and c=2.
Images that are not corrected properly can look either bleached out, or, what is more likely,
too dark. Trying to reproduce colors accurately also requires some knowledge of gamma
correction because varying the value of gamma correction changes not only the brightness,
but also the ratios of red to green to blue.

T.E. DIP- SEM II A.Y. 2024-25


PUNE INSTITUTE OF COMPUTER TECHNOLOGY, PUNE - 411043

Department of Electronics & Telecommunication Engineering

2.2.4 Image Flipping


A static or moving image created by mirror-reversing an original over a horizontal axis is
referred to as a flipped image or reversed image. A flip (mirror effect) is done by
reversing the pixels horizontally or vertically. For instance, for an horizontal flip, the
pixel situated at coordinate (x, y) will be situated at coordinate (width - x - 1, y) in the
new image.
For Example: -

T.E. DIP- SEM II A.Y. 2024-25


PUNE INSTITUTE OF COMPUTER TECHNOLOGY, PUNE - 411043

Department of Electronics & Telecommunication Engineering

2.3 Algorithms for Basic operations and gray transformations on Image:


2.3.1 Image Negation:

2.3.2 Log Transform:

T.E. DIP- SEM II A.Y. 2024-25


PUNE INSTITUTE OF COMPUTER TECHNOLOGY, PUNE - 411043

Department of Electronics & Telecommunication Engineering

2.3.3 Power Law Transform:

2.3.4 Image Flipping

T.E. DIP- SEM II A.Y. 2024-25


PUNE INSTITUTE OF COMPUTER TECHNOLOGY, PUNE - 411043

Department of Electronics & Telecommunication Engineering

2.4 Conclusion:

2.5 References:
i. Gonzalez R, Woods R, “Digital image processing”, Pearson Prentice Hall, 2008.
ii. Gonzalez R, Woods R, Steven E, “Digital Image Processing Using MATLAB®”, McGraw Hill
Education,2010.
iii. Jayaraman S, Esakkirajan S and Veerakumar T,“Digital Image Processing” Tata McGraw Hill,
2010
iv. Joshi, Madhuri A. “Digital Image Processing: an algorithm approach”, PHI Learning Pvt. Ltd.,
2006.
v. Pictures taken from: http://www.imageprocessingplace.com/root_files_V3/image_databases.html

(Course Teacher)

T.E. DIP- SEM II A.Y. 2024-25

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy