0% found this document useful (0 votes)
31 views4 pages

2experiment Writeup DPCOE

Uploaded by

Sachin Rathod
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)
31 views4 pages

2experiment Writeup DPCOE

Uploaded by

Sachin Rathod
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/ 4

DHOLE PATIL EDUCATION SOCIETY’s

DHOLE PATIL COLLEGE OF ENGINEERING


DEPARTMENT: E&TC Engg ACADEMIC YEAR:

CLASS: TE SEMESTER : 6

SUBJECT: DIP DATE:

NAME: ROLL NO.:

TITLE : Perform basic point processing operations on images

AIM Perform the following basic operations on the image


1. Obtain a Negative image
2. Obtain a Flip image

SOFTWARE REQUIREMENT: Matlab /Python

THEORY:
Point processing is used to transform an image by operating on individual pixels. If array A
represents an input image then an output array B is produced by a transformation.
B[x,y] = T(A[x,y])

1. Basic Gray Level Transformations


i. Linear (negative and identity transformations),
ii. logarithmic (log and inverse-log transformations),
iii.power-law (nth power and nth root transformations).

DPCOE/E&TC DIVP 1
Figure: Some basic gray-level
transformation functions.
All curves were to fit in the
range shown

Image Negative s = L - 1 - r

2. Geometrical operations on images


a) Translation: This operator performs a function that maps the position of each picture
element in the input image to the new position for the output image.
b) Scaling: It refers to the resizing of the digital image.
c) Flip: A flip (mirror effect) is done by reversing the pixels horizontally or vertically.
For instance, flipping the image horizontally means turning the image left side right.
The pixel situated at coordinate (x, y) will be situated at coordinate (width - x - 1, y)

DPCOE/E&TC DIVP 2
in the new image. And for vertical flip i.e. upside down, the pixel situated at
coordinate (x, y) will be situated at coordinate (x, height - y-1) in the new image.

>>> import numpy as np


>>> mirror = np.fliplr(A)
>>> mirror

d) Rotate: The algorithm used for a rotation is similar to a flip: to compute the new
image, we iterate over all the pixels and print the corresponding pixel from the source
image. The point situated at the coordinates (x, y) in the new image is equal to the
point (xp, yp) in the input image:

xp = x * cos(angle) - y * sin(angle)
yp = x * sin(angle) + y * cos(angle)

ALGORITHMS:
1. Negative image
Step 1 – Import libraries.
Step 2 – Let’s read the image.
Step 3 – Convert the image to RGB
Step 4 – Let’s read the image in grayscale also.
Step 5 – Lets generate the negative image with the Algorithm:
s = L - 1 – r (where L=255 for grayscale images)
Step 6 – Let’s plot the results.

2. Flip the image


Step 1 – Import libraries.
Step 2 – Let’s read the image.
Step 3 – Flip the image horizontally by interchanging the left column with the
corresponding right column.
Step 4 – Let’s plot the results.

RESULTS:

See the attachment

CONCLUSION:
___________________________________________________________________________

DPCOE/E&TC DIVP 3
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________

REFERENCES:
1. Rafael C. Gonzalez and Richard E. Woods, “Digital Image Processing”, 3rd Edition,
Pearson Education.
2. S Sridhar, “Digital Image Processing”, Oxford University Press.
3. Rafael C. Gonzalez, Richard E. Woods, and Steven L. Eddins, “Digital Image Processing
using MATLAB”, 2nd Edition, Tata McGraw Hill Publication.

Submission date: / / Subject Teacher

DPCOE/E&TC DIVP 4

You might also like