14
IMAGE SEGMENTATION USING K-MEANS ALGORITHM Submitted By- Puja Gupta Registration no-161541810016 Roll no-15499016014 MASTER DEGREE THESIS A thesis submitted in partial fulfilment of the requirements for the degree of MSC IN Computer Science Under Supervision Subhajit Adhikari Dinabandhu Andrews Institute of Technology and Management Maulana Abul Kalam Azad University of Technolodgy 11 th MAY,2018

IMAGE SEGMENTATION USING K-MEANS ALGORITHM · In this paper, they have discussed about block-based image segmentation. Here, Image processing is following 3 stages-Reconstruction,

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: IMAGE SEGMENTATION USING K-MEANS ALGORITHM · In this paper, they have discussed about block-based image segmentation. Here, Image processing is following 3 stages-Reconstruction,

IMAGE SEGMENTATION USING K-MEANS ALGORITHM

Submitted

By-

Puja Gupta

Registration no-161541810016

Roll no-15499016014

MASTER DEGREE THESIS

A thesis submitted in partial fulfilment of the requirements for

the degree of MSC

IN

Computer Science

Under Supervision

Subhajit Adhikari

Dinabandhu Andrews Institute of Technology and

Management

Maulana Abul Kalam Azad University of Technolodgy

11th MAY,2018

Page 2: IMAGE SEGMENTATION USING K-MEANS ALGORITHM · In this paper, they have discussed about block-based image segmentation. Here, Image processing is following 3 stages-Reconstruction,

To whom it may concern

This is certified that the work entitled as ‘Image segmentation by K-

MEANS Algorithm’ has been satisfactory complete by Puja Gupta

(Registration no-161541810016 Roll no-15499016014).It is a bona-

fide work carried out under my supervision at DINABANDHU

ANDREWS INSTITUTE OF TECHNOLOGY AND

MANAGEMENT Kolkata for partial fulfilment of M.sc in computer

science during the academic year 2016-2018.

Project Guide

SubhajitAdhikari

Assistant professor

DINABANDHU ANDREWS INSTITUTE OF TECHNOLOGY

AND MANAGEMENT

Kolkata

Forward by

Paramita Ray

HOD of Computer science Dept

DINABANDHU ANDREWS INSTITUTE OF TECHNOLOGY

AND MANAGEMENT

Kolkata

Page 3: IMAGE SEGMENTATION USING K-MEANS ALGORITHM · In this paper, they have discussed about block-based image segmentation. Here, Image processing is following 3 stages-Reconstruction,

CERTIFICATE AND APPROVAL

This is certified that the work entitled as ‘IMAGE SEGMENTATION

USING K-MEANS ALGORITHM’ has been satisfactory complete by

Puja Gupta (Registration no-161541810016 Roll no-

15499016014).It is a bona fide work carried out under my supervision

at DINABANDHU ANDREWS INSTITUTE OF TECHNOLOGY

AND MANAGEMENT Kolkata for partial fulfilment of M.sc in

computer science during the academic year 2016-2018.It is

understood that by this approval the undersigned do not necessarily

endure or approve any statement made, opinion expressed or

conclusion drawn there in but approve for which it has been

submitted.

Examiners

Signature of the examiner

Date:

Page 4: IMAGE SEGMENTATION USING K-MEANS ALGORITHM · In this paper, they have discussed about block-based image segmentation. Here, Image processing is following 3 stages-Reconstruction,

DECLARATION OF ORIGINALITY AND

COMPLIANCE OF ACADEMIC ETHICS

I hereby declare that this thesis contents original research work done

by me, as part of master of computer science studies. All information

in this document has been obtained and presented in accordance with

the academic rules and ethical conduct.

I also declare that, as required by these rules and conduct I have fully

cited and referenced all the materials.

Name-Puja Gupta

Registration no-161541810016

Roll no-15499016014

Title- IMAGE SEGMENTATION USING K-MEANS

ALGORITHM

Signature:

Date:

Page 5: IMAGE SEGMENTATION USING K-MEANS ALGORITHM · In this paper, they have discussed about block-based image segmentation. Here, Image processing is following 3 stages-Reconstruction,

ACKNOWLEDGEMENT

I would like to express my sincere, heartfelt gratitude to my respected

guide Assistant Prof. SUBHAJIT ADHIKARI department in

computer science in DINABANDHU ANDREWS INSTITUTE OF

TECHNOLOGY AND MANAGEMENT under MAKAUT, for his

unfailing guidance, prolific encouragement, constructive suggestions

and continuous involvement during each and every phase of this

work.

I would also thanks principle madam Prof. Dr. SANJUKTA NANDY,

and Assistant Prof. PARAMITA RAY’, HOD of the computer science

department, all faculty members and staff for providing me all the

facilities and for their support to all activities.

I would like to express my gratitude to my parents ‘LATE BIJAY

GUPTA and RADHA GUPTA’ for their unbreakable believe, support

and guidance.

Last but not the least I would like to thanks all my classmates of M.sc

Computer science batch 2016-2018for their co-operation and support.

Date:

Name-Puja Gupta

Registration no-161541810016

Roll no-15499016014

Page 6: IMAGE SEGMENTATION USING K-MEANS ALGORITHM · In this paper, they have discussed about block-based image segmentation. Here, Image processing is following 3 stages-Reconstruction,

ABSTRACT

Image segmentation is the classification of an image into different

groups or regions. In this project, we want to do some prediction

about the features of image regions that will help us to find some

abnormality that can be present in an image for forensic study. So

segmentation is taken to partition the image into different clusters or

regions. K-means segmentation algorithm is used to find clusters from

an colour image. First, colour the image is taken and resized, then it is

converted it into grey scale image. Then k-means algorithm is used to

find different clusters and a .csv file is written.

Page 7: IMAGE SEGMENTATION USING K-MEANS ALGORITHM · In this paper, they have discussed about block-based image segmentation. Here, Image processing is following 3 stages-Reconstruction,

INTRODUCTION

IMAGE[1] is a virtual representation, it is an extact replica of a

storage device.An image is defined as a two dimentional function,f(x,

y), where x and y are the coordinates of the function f and the

amplitudes of f at the coordinates (x, y) is called the gray level of the

image.

IMAGE PROCESSING-

When the co-ordinates (x, y) and the intensity values of the function f

are all finite ,then call the image as a digital image. In the field of

image processing [2] refers to processing digital images by means of a

digital computer. A digital image is composed of a finite number of

elements , it has a particular location and a value. These elements of

digital image are called picture elements ,image elements, pixel(used

to denote the elements of a digital image).

SEGMENTATION

Image segmentation [3] is the method of partitioning a digital image

into several segments. The goal of segmentation is to simplify and

change the representation of an image into something that is more

meaningful and easier to analyze.

In a region, each pixels are similar with some properties such as

colour, intensity or texture. The main goal of segmentation is to

divide an image into parts having strong correlation with areas of

interest in the image. Image segmentation can be done , based on two

properties of an image:

A. Discontinuities based method are used to partition an image

based on abrupt changes in intensity, this includes image

segmentation algorithm like edge detection.

B. Method based on similarity measure is used to divide an image

into constituent parts according to predefined criteria, this

includes image segmentation algorithms like thresholding,

region growing. Image segmentation is the process where a

digital image partition into multiple image.

Page 8: IMAGE SEGMENTATION USING K-MEANS ALGORITHM · In this paper, they have discussed about block-based image segmentation. Here, Image processing is following 3 stages-Reconstruction,

APPLICATION OF IMAGE SEGMENTATION

Medical Image Segmentation

Medical image segmentation [3] is used in various applications. As

for example, in medical image analysis, segmentation is used to locate

tumours, analyze anatomical structure etc. It provides comparable

resolution and better contrast resolution.

K-Means Clustering Algorithm

Clustering is a method to divide a set of data into a specific number of

groups. It’s one of the popular method is k-means clustering. In k-

means clustering[4], it partitions a collection of data into a k number

group of data11, 12. It classifies a given set of data into k number of

disjoint cluster. Kmeans algorithm consists of two separate phases. In

the first phase it calculates the k centroid and in the second phase it

takes each point to the cluster which has nearest centroid from the

respective data point.

The DBSCAN Algorithm The density-based spatial clustering of applications with noise

algorithm, usually abbreviated as DBSCAN[5], is a recently

developed alternative method for clustering data sets. Unlike other

clustering algorithms that require many parameters, such as before the

computation the number of clusters should be defined, the DBSCAN

algorithm has only two input parameters: the minimum size of a

cluster and the maximum distance between points in a cluster. The

algorithm operates by cycling through all points in the data set and

calculating the number of neighbours each point has, which is defined

as the number of other points that are within the minimum distance of

the original point. Any data point that has fewer neighbours than the

minimum cluster size parameter is declared to be a noise point that is

not associated with any cluster.

Page 9: IMAGE SEGMENTATION USING K-MEANS ALGORITHM · In this paper, they have discussed about block-based image segmentation. Here, Image processing is following 3 stages-Reconstruction,

COMPARASION BETWEEN K MEANS AND DBSCAN

ALGORITHM

K-means DBScan

Supervised Unsupervised

Number of clusters are required Number of clusters are not

required

Fast convergence Slow convergence

LITERATURE SURVEY

In this paper, they have discussed about block-based image segmentation. Here,

Image processing is following 3 stages-Reconstruction, Transformation and

Classification. [6]

In this paper, they have discussed about defect detection by K-means clustering.

Here, they have worked using automated segmentation, it is the most difficult

task in image analysis. [7]

In this paper, they have discussed about clustering,clustering algorithms

areclassified - Exclusive Clustering, Overlapping Clustering Hierarchical

Clustering, Probabilistic Clustering. Here, they have worked using K-means

segmentation. [8]

In this paper, they have discussed about the filtering algorithm, Data sensitive

analysis, Emperical analysis. [9]

In this paper, they have discussed about watershed segmentation,k-means

clustering algorithm, improved watershed segmentation algorithm, [10]

Page 10: IMAGE SEGMENTATION USING K-MEANS ALGORITHM · In this paper, they have discussed about block-based image segmentation. Here, Image processing is following 3 stages-Reconstruction,

ALGORITHM

STEP 1.Read the image

STEP 2.Convert into grayscale

STEP 3.Resize the image

STEP 4.Perform K-means f(x,y) where x=data, y=no. of clusters

STEP 5.Write the clusters into a .csv file

1.Read the image

Page 11: IMAGE SEGMENTATION USING K-MEANS ALGORITHM · In this paper, they have discussed about block-based image segmentation. Here, Image processing is following 3 stages-Reconstruction,

2.Convert into greyscale

3.Resize the image

Page 12: IMAGE SEGMENTATION USING K-MEANS ALGORITHM · In this paper, they have discussed about block-based image segmentation. Here, Image processing is following 3 stages-Reconstruction,

Start

Stop

4. Perform K-means clustering:

BLOCK DIAGRAM

Read Image

Convert into

grayscale

Resize the image

Perform k-means

Function(x,y)

Page 13: IMAGE SEGMENTATION USING K-MEANS ALGORITHM · In this paper, they have discussed about block-based image segmentation. Here, Image processing is following 3 stages-Reconstruction,

CONCLUSION & FUTURE SCOPE

I have segmented an image by using k-MEANS clustering algorithm.

First, I read the image and convert it into grey scale very carefully.

After resizing the image, I have implemented k-means clustering

algorithm. Many clusters are found. In future, i want to analyse the

different properties (e.g. shape) of each clusters to predict some

abnormality is present or not in the image for forensic study. .

REFERENCES

1.Bilen, Hakan. "image Processing." (2017).

2. Rafael C.Gonzalez and Richard E.Woods, “Digital Image Processing

(book)”.

3.Chandni Panchasara and Amol Joglekar , ”Application of Image

Segmentation Techniques on Medical Reports”, Chandni Panchasara et al, /

(IJCSIT) International Journal of Computer Science and Information

Technologies.

4.Dhanachandra, Nameirakpam, Khumanthem Manglem, and Yambem Jina

Chanu. "Image segmentation using K-means clustering algorithm and

subtractive clustering algorithm." Procedia Computer Science 54.2015 (2015):

764-771.

5.Dudik, Joshua M., et al. "A comparative analysis of DBSCAN, K-means, and

quadratic variation algorithms for automatic identification of swallows from

swallowing accelerometry signals." Computers in biology and medicine 59

(2015): 10-18

6.Zaitoun, Nida M., and Musbah J. Aqel. "Survey on image segmentation

techniques." Procedia Computer Science 65 (2015): 797-806.

7. Pham, Van Huy, and Byung Ryong Lee. "An image segmentation approach

for fruit defect detection using k-means clustering and graph-based

algorithm." Vietnam Journal of Computer Science 2.1 (2015): 25-33.

Page 14: IMAGE SEGMENTATION USING K-MEANS ALGORITHM · In this paper, they have discussed about block-based image segmentation. Here, Image processing is following 3 stages-Reconstruction,

8. Patel, Piyush M., Brijesh N. Shah, and Vandana Shah. "Image segmentation

using K-mean clustering for finding tumor in medical

application." International Journal of Computer Trends and Technology

(IJCTT) 4.5 (2013): 1239-1242.

9. Kanungo, Tapas, et al. "An efficient k-means clustering algorithm: Analysis

and implementation." IEEE transactions on pattern analysis and machine

intelligence 24.7 (2002): 881-892.

10. Ng, H. P., et al. "Medical image segmentation using k-means clustering and

improved watershed algorithm." Image Analysis and Interpretation, 2006 IEEE

Southwest Symposium on. IEEE, 2006.