+ All Categories
Home > Documents > Final Report for project

Final Report for project

Date post: 15-Apr-2017
Category:
Upload: rajarshi-roy
View: 31 times
Download: 0 times
Share this document with a friend
18
Prepared by: Rajarshi Roy Page 1/26 Summer Internship Program: (Indian Institute of Engineering Science and Technology, Shibpur, Kolkata, India) Digital Image Processing and Analysis Prepared by: Rajarshi Roy (Freshman Student of Virginia Tech University, Blacksburg, Virginia, USA) Working under the guidance of: Dr. Samit Biswas (Department of Computer Science and Technology Indian Institute of Engineering, Science and Technology, Shibpur, W.B, India) Kolkata, India May - June 2016
Transcript
Page 1: Final Report for project

Prepared by: Rajarshi Roy Page 1/26

Summer Internship Program:

(Indian Institute of Engineering Science and Technology, Shibpur, Kolkata, India)

Digital Image Processing and Analysis

Prepared by:

Rajarshi Roy

(Freshman Student of Virginia Tech University, Blacksburg, Virginia, USA)

Working under the guidance of:

Dr. Samit Biswas

(Department of Computer Science and Technology

Indian Institute of Engineering, Science and Technology, Shibpur, W.B, India)

Kolkata, India

May - June 2016

Page 2: Final Report for project

Prepared by: Rajarshi Roy Page 2/26

2. Acknowledgement

At the outset, my sincere gratitude to Dr. Amit Das, Dean of Computer Science Department, Indian Institute

of Engineering, Science and Technology (IIEST) for accepting my candidature and permit me to work for

Summer Internship to a project in Digital Image Processing and Analysis.

I offer my deep sense of obligation to Dr. Samit Biswas for his guidance and mentoring to carry out this work

within deadline. I am also thankful to other staff of Department of Computer Science, IIEST for their kind

cooperation.

I do acknowledge my indebtedness to Prof. (Dr.) S. Mukherjee of Aerospace Department for constant

encouragement to my endeavor.

I must not forget to express my sincere regards to Professor (Dr.) Preston L. Durrell of Chemistry Department

and Professor Ms. Mary Denson Moore of English Department of Virginia Tech. University, USA who had

encouraged me and gave recommendations to participate this summer Internship program.

Page 3: Final Report for project

Prepared by: Rajarshi Roy Page 3/26

Table of Contents Sl No Contents

Page Number

1 Title 1

2 Acknowledgement 2

3 Abstract 5

4 Certification 6

5 Analysis of Digital Image Processing 7

5.1

Image Read / Write 7

5.2

Image Negative 9

5.3

Sharpening of Image 11

5.4 Edge Detection of

a Digital Image 12

5.5 Transpose of an

Image Matrix 14

5.6

Stretched Image 15

5.7

Vertical and Horizontal Movement of Image 17

5.8

Image Filtering 20

5.8.1

Mean Filtering 20

5.9 Histogram 22

6 Schedule 24

7 Conclusion 25

Page 4: Final Report for project

Prepared by: Rajarshi Roy Page 4/26

8 Glossary 25

9 Bibliography 25

10 Appendix 26

Page 5: Final Report for project

Prepared by: Rajarshi Roy Page 5/26

3. Abstract

The image processing technique has wide applications in the development of broadband wireless service

and mobile technology. Internet helps the easy access of instant information. Most of this information is

designed in forms images. They are: in visual form of text, graphics, and pictures, or multimedia

presentations.

The word “IMAGE” in image processing world is nothing but a two dimensional signal. A digital image is mere

the data – numbers indicating differences of Red, Green and Blue at a particular location on a grid of pixel.

It is defined by the mathematical function f (x, y) where x and y are two coordinates, horizontal and vertical.

The value of f (x, y) at any point is termed as pixel value at that point of an image.

Image processing essentially means a technique of recognizing the digital image data. So in another words

it is the signal processing where the required input is an image, such as photograph. After processing the

output of the function is also being either an image or set of parameters related to image.

During this processing each image is treated as two dimensional array of signals. It is a matrix of intensity of

corresponding pixel.

For this project I have developed several functions in C++ language with the help of mathematical tools on

Array. The prime idea of the project is to read the file, modify the image and develop the output after

experimenting with wide selection of image types.

Herein, I have selected the basic image in grayscale. At the beginning the image is of 100 X 100 bitmap size.

Secondly, it is converted to Text File. The array is manipulated to generate each function. The output of the

function is also formed in image. My main objective was to transfer the image pixels in my array which I will

then run some functions on the pixels which will do some filters on the output image in C++.

Page 6: Final Report for project

Prepared by: Rajarshi Roy Page 6/26

Certification

Page 7: Final Report for project

Prepared by: Rajarshi Roy Page 7/26

5. Analysis of Digital Image Processing

“It is said, picture is worth a thousand words.” It is indeed, visual impact is more than any other kind of

communication. Nowadays the visual information is created digitally. Application wise, it is gaining popularity.

For instance, Medical Science, Astronomy, Aviation, Traffic Control and other industries.

In Digital Image Processing, an image is defined as two dimensional functions, where x and y are coordinates which essentially represents gray level of image at that point. Here, I have the following fundamental steps in Image Processing

1. Image acquisition: to acquire a digital image 2. Image preprocessing: To improve the image 3. Image representation: to convert the input data to a form suitable for computer processing.

5.1 Image Read / Write

This function needs the matrix made from pixel values of an image. These values are in gray scale format of.

pnm file. Eventually, the purpose of this function is to write the output in another file. I store the output matrix

(MXN matrix) in project-version 1 file for experiment. I can also perform further operations based on my future

expansion of the project.

At the beginning, I select an image for the project and convert to the. pnm format. It is in ASCII mode.

Secondly, I displayed various information of the image with the help of the text editor. This text file becomes

the input for my C++ program, through which I copy the pixel value into matrix. This pixel matrix becomes

significant input for further modification of the experimental image. On subsequent changes of data values in

the matrix, I can easily edit and update the image quality, texture and resolution. At this stage, I am prepared

to apply the functions which is based on numerous operation of matrix.

Processing

Input Image Output Image

Page 8: Final Report for project

Prepared by: Rajarshi Roy Page 8/26

5.2 Image Negative

It is an image enhancement technique, where the output image is more suitable than the original for a

specific application. It is a spatial domain transformation of the array where I did point operation on each

pixel intensity values. Negative image is particularly useful in highlighting the white or gray details which

are embedded in the dark regions of the image.

The transformation function has been given below

s = T (r)

Where r is the pixels of the input image and s is the pixels of the output image. T is a transformation function that maps each value of r to each value of s.

In negative transformation, each value of the input image is subtracted from the L-1 and mapped onto the output image.

Here L is number of levels in the image = 256

In this case the following transition has been done.

s = (L – 1) – r

Since the input image of Einstein is an 8 bpp image, so the number of levels in this image are 256. Putting 256 in the equation, we get this

s = 255 – r

So each value is subtracted by 255 and the result image has been shown above. So as a result, the lighter pixels become dark and the darker picture becomes light. The output of the function is Image Negative.

Page 9: Final Report for project

Prepared by: Rajarshi Roy Page 9/26

ORIGINAL IMAGE OUTPUT IMAGE

ORIGINAL IMAGE OUTPUT IMAGE

5.3 Sharpening of Image

Sharpening of the image is defined by the process which opposed to blurring. Apparently I increase the edge content of the image. So firstly, I find the edges of the image. For this process I use Prewitt operator. After finding the edges, I add those edges on the image, and thus the image got more edges. Eventually, the image looked sharpen.

ORIGINAL IMAGE OUTPUT IMAGE

Page 10: Final Report for project

Prepared by: Rajarshi Roy Page 10/26

5.4 Edge Detection of a Digital Image

The function of identifying the points of a digital image at which image brightness changed, is called Edge

Detection. The points where brightness changed sharply is termed as Edge. It is the fundamental steps in

Image Processing. It is particularly helpful feature detection and feature extraction. It is basically subtracting

the current pixel with the previous pixel and change it as the current pixel.

The main aim for developing this function is to capture important events in image and changes in

properties of image of materials. Taking the data of the edge detection process, the amount of data of

whole image can be reduced for testing. So some amount of data is filtered out to test, makes the job easy.

ORIGINAL IMAGE OUTPUT IMAGE

Page 11: Final Report for project

Prepared by: Rajarshi Roy Page 11/26

5.5 Transpose of Image Matrix

The transpose of a MXN matrix is NXM matrix.

With its (i, j) element equals to the (j, i) elements of the original matrix.

Sample Array = 1 3 5 2 4 6

ORIGINAL IMAGE OUTPUT IMAGE

Transpose of the above matrix is ans = 1 2 3 4 5 6

Page 12: Final Report for project

Prepared by: Rajarshi Roy Page 12/26

5.6 Stretched Image

There are the methods of enhancing contrast. The first one is called Histogram stretching that

increase contrast of the image.

The formula is:

Here I use the function and specify the source and destination rectangle. It will crop and stretch the image.

INPUT IMAGE OUTPUT IMAGE

5.7 Vertical and Horizontal Movement of Image

Blurring is a process which is applied to whole image. An image looks sharp when we receive all edge of

the image. When I reduce the edge content, makes transition of the image from one color to another.

You can reduce vertical or horizontal noise by adjusting the kernel size using blur function. The kernel size

in vertical direction is higher than the kernel size of horizontal direction.

Page 13: Final Report for project

Prepared by: Rajarshi Roy Page 13/26

UNSHARP IMAGE 45-degree motion blur VERTICALLY MOVED HORIZONTALLY MOVED:

5.8 Image Filtering

The Image Filtering is the operations which works on entire image or selection of image.

Image filtering is used to:

Remove noise

Sharpen contrast

Highlight contours

Detect edges

Image filters can be classified as linear or nonlinear.

The linear filters are defined as convolution filters as they are represented using a matrix multiplication

1 Linear filters are also known as convolution filters as they can be represented using a matrix

multiplication. Thresholding and image equalization are examples of nonlinear operations, as is the median

filter.

Page 14: Final Report for project

Prepared by: Rajarshi Roy Page 14/26

5.8.1 Mean Filtering

Mean filtering is a function of smoothing images. Apparently. there is always an intensity variation between

one pixels to next. Mean Filtering reduces this variation which is termed as noise of the image. The Mean

filter works by moving through the image pixel by pixel, replacing each value with the average of neighboring

pixel, including itself.

An example of mean filtering of a single 3x3 window of values is shown below.

Unfiltered Values

2 4 7

3 9 1

8 4 7

2+ 4 + 7 + 3 + 9 + 1 + 8 + 4 + 7 = 45

45 / 9 = 5

Mean Filtered

* * *

* 5 *

* * *

Center value (previously 1) is replaced by the mean of all nine values (5).

Page 15: Final Report for project

Prepared by: Rajarshi Roy Page 15/26

ORIGINAL IMAGE OUTPUT IMAGE

5.9 Histogram

Histograms are collected counts of data. Data is distributed in sets of bins. In the Matrix, which contains

information of image, intensities of each pixel is arranged. Their values ranges from 0 – 255. If I want to

count the data in an organized way within the range of 256 values, I would create the segment which is

termed as bins like

This makes the job easy to keep count of number of pixel that fall in that range.

Image Histogram is the graphical representation of intensity distribution of an image.

In C ++ we did a count as how many times the pixel occurred for example in this image:

Page 16: Final Report for project

Prepared by: Rajarshi Roy Page 16/26

Input Histogram Data:

Data

value

Number

of Pixel

0 87257

1 53

2 74

3 133

4 217

5 303

6 537

7 636

8 648

9 711

10 760

6. Schedule

Page 17: Final Report for project

Prepared by: Rajarshi Roy Page 17/26

7. Conclusion

This project is done by me alone within short period of time. And, finally I could achieve certain level of

success. I believe, there is still room for further improvement of this project, what I can pursue latter.

I have studied, there is many opportunities to explore the subject of image processing and further

improvement.

Worth mentioning, in future, image processing will help in scanning extra-terrestrial life in space. It will also

help to improve robotic technology.

Advances in image processing and artificial intelligence will work to complement each other that would ensure

more robust security system, medical diagnostics and manufacturing industries among many other fields.

8. Glossary

Blurring: An area process that produces an effect similar to an out-of-focus photograph. Blurring removes the

detail in an image by making each pixel more like its neighbors.

Cropping: A geometric process that reduces the size of an image by discarding the pixels outside a specified

region called the crop selection

Digital Image: An image captured by an imaging device and represented in a computer as a rectangular grid

of pixels

Edge: Edges marks the boundaries between the objects in a scene. A large change in pixel brightness over

a small number of pixels often indicates the presence of an edge

Histogram: The histogram of an image visualizes the distribution of the brightness in the image by plotting

the number of occurrences of each brightness.

Page 18: Final Report for project

Prepared by: Rajarshi Roy Page 18/26

9. Bibliography

1. Class notes on C ++ and Matlab of Prof. David McPherson, Computer Engineering Department,

Virginia Tech University, USA.

2. Books: The C++ Programming Language by Bjarne Stroustrup

3.http://stackoverflow.com/questions/13750142/c-image-proccessing-reading-an-image-file-into-2d-

array

4. http://www.cplusplus.com/reference

5. http://www.astro.umd.edu/~cychen/MATLAB/ASTR310/Lab02/html/images01.html

6. http://www.csc.villanova.edu/~tway/courses/csc8610/s2012/workshop1/rahul_and_pavitra/Worksho

p1%20-%20Rahul%20&%20Pavitra.html

7. https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/imageFunctions.html

10. Appendix

Copy of presentation of the Project “Digital Image Processing and Analysis”

END


Recommended