Parag Patil
, IJRIT 484
IJRIT International Journal of Research in Information Technology, Volume 1, Issue 11, November, 2013, Pg. 484-489
International Journal of Research in Information Technology (IJRIT)
www.ijrit.com
ISSN 2001-5569Implementation and Segmentation of Color Images Using Minimum Spanning
Tree
Sualeh Akhtar1, Suhaib Mushtaq Ansari1, Parag Patil1, Surendra Bharambe1, Karthikeyan K.2
1MTech (ST), School of Information and Technology Engineering, VIT University, Vellore, Tamil Nadu, India
2Associate Professor, SES, VIT University, Vellore, Tamil Nadu, India [email protected]
Abstract
Image segmentation in graph is mostly performed on gray-scale images. So, we suggest an unsubstantiated method for color image segmentation that combines with uncertain outcome in IT (Information theory). Then current image is mapped into a weighted undirected graph in which the pixels are nominated as nodes. To confirm unsubstantiated implementation, function will obtain thresholding with maximum uncertain outcome. Our algorithm is based on prim’s algorithm which gives better performance & better complexity as compared to other similar algorithms in segmenting the color image using graph theory.
Prims algorithm gives faster performance for small size images.
Keywords: Segmentation, Entropy, MST, HLS.
1. Introduction
Image after supervising is the main issue which is involved in getting the pattern that also includes as an essential technology in the world of computing [1]. Segmented Image is a technique also as procedure which can be used to divide the image into many regions including their own features, holding the mark which we needed. This region which bisects each other encounters a kind of similarities in features of different colors. The image is the most probable description of the real world. Image segmenting is featuring more and more people with computing experience for facing the problems [2, 3]. So far, most of the images segmenting methods are available to factual issues only. The methods on which we would work belong in the evaluation process till now. Many useful methods have been produced of which segmenting image methods are based on graph theory, like drawing attention for people work on these regions [4-6]. Various methods which address the issues in implementation of images like the Minimum Spanning Tree (MST) method [7] and Normalized Cut (NC) method [8, 9]. Then current image is mapped
Parag Patil
, IJRIT 485
into a weighted undirected graph, where the pixels are considered as nodes and ranges into different groups by clustering. This completes the segmentation process further. These applications are mostly limited to gray image only which limits the thresholds. We define an objective function [10] on the basis of prim’s Algorithm and transform them with optimizing the given function.2. MST Method
MST stands for Minimum Spanning tree which gives shortest path to cover all vertices present in the node [11]. In our project MST is used to create spanning tree based on sample data .this method choose smallest weight edges adjacent from the selected vertex i.e. if weight value greater than threshold value then it not add into tree.
Steps that follows to generate tree:
1) For given data pixel, undirected graph will create which is based on weight of edges.
2) By setting Threshold value remove all long distance edges.
3) Collect all trees ,and form one forest
4) Select each node and cluster them into one class.
Fig. 1 Minimum spanning tree: Based on data pixel, undirected graph will create which is based on weight of edges.
Fig. 2. Minimum spanning tree after removing longer edges
The most important part in MST is to detect the exact value of dy, as different values of segmented threshold will lead to different corresponding results for the class. Calculating uncertain information of the current image will
Parag Patil
, IJRIT 486
define image as in one system only. This paper defines an objective function which is based on prim’s algorithm to re-collecting the clustering the data in the given class automatically.3. Segmentation For The Color Image
3.1 HLS Color ImageColors that are used here are basic three colors i.e. Red (R), Green (G) and Blue (B). These RGB colors space provide better displaying images but it difficult to segmented and analyze color image, because these basic colors are closely related with each other. If the luminance of image is changes then all related base color change. Base color i.e. RGB is odd in nature so it’s difficult to determine. Variance between any two pixel points. Advantage of using Base color space that it supports linear as well as non-linear translation. Here HLS used which denoted as hue (H), luminance (L), Saturation (S). RGB color space to HLS color space is translation is known as HSL Translation.
Algorithm for translation of RGB image into HLS transformation:
First convert RGB color space image to HSL space beginning with normalizing RGB value:
= , = , =
Each normalized H, S and l components are then obtained by, ℎ = cos .))]
)))]/ When h ϵ [0, п] for b<= g ℎ = 2п − cos .))]
)))]/ When h ϵ [п, 2п] for b> g s=1-3.min(r, g, b) Where s ϵ [0, 1]
l=(R+G+B)/3.255 Where l ϵ [0, 1]
For convenience, h, s and l values are converted in the ranges of [0,360] , [0,100] , [0, 255] respectively by: H=
h*180/ п; S = s*100 and I = i×255.
3.2 Construction of the Graph
3.2.1 Working of Nodes
As per the theoretical concept, we have an idea where in each pixel represent as node and thus the connection is established between two nodes for the color image. In this, we can use four-connected method to minimize repetitive use of algorithm. Before proceeding towards other operation, every node will be connected to its next four pixels.
3.2.2 Costs Function
Cost Function has some equality between two points. In clustering, we bring equal features together and store them in similar or dissimilar classes. Further we classify them based on their features as color, space and quality of being luminous. Thus by giving the color image and space as per the pixels feature involving 5 quantities such as H,L,S,x,y for calculating geometry as developed by Euclid and space to identify the difference between the two or more pixels as distance of cost value.
Parag Patil
, IJRIT 487
3.2.3 The generation of MSTHere we are using Prim’s Algorithm, which connect Pixels based on cost of the edges.
1. Choose any element r; set S={r} and A=0(Take r as the root of our spanning tree) 2. Find a lightest edge such that one endpoint is in S and the other is in V\S.
3. Add this edge to A and its (other) endpoint to S.
4. If v/=0, then stop and output (minimum) spanning tree(S,A).otherwise go to step 1.
The graph which consists of n nodes, Prims algorithm gives the complexity of O ((n + e) log n).
3.3 Construction of objective function:
We will get MST after the data set been generated in which the vertexes are denoted by the sampling values. The unique data values are being reflected to cost on basis of their edge. The objective function can be measured with the help of sub-trees and quality criterion of clustering. These requires maximum uncertainty outcome of cost for assessing dissimilar outputs. This optimizes the calculation of clusters for separate datasets and it results into new implementation of segmentation.
3.3.1 Data Entropy:
Data Entropy denotes as mean uncertainty of information from Y [13]. That is when entropy increases, uncertainty also increases. Entropy of provide objective for system:
"#) = − $ %#&) log %#&)
)
*+
Where H(Y) denotes average uncertainty of data {Yi} (i=1, 2, 3…..n), and Probability of Yi.
But it’s difficult to recognize variance between individual data using entropy of data.
3.3.2 Uncertain Outcome of Cost:
Each data has its own cost that will indicate subjective features of data.so it become easy to classify the data. Cost function calculates based on the difference between data .so two criteria occur:
1) If variance between two data point is small then number of subset created are similar.
2) If variance between two data point is larger than subsets are not similar.
Cost of data (Ci) is calculated as
,& = -. − /,0&)1-2 ,3&)1&45 6)
"7#) = − $ 8& 9& log%&)
)
*+
Where CI(i)max is large Variance between two subset points, which gives resemblance between points ,CO(i)min indicates smallest variance between two points which gives different subset., G value greater than 1.
#9
,= : ;1 ;2 ⋯ ;)
9;1) 9;2) … %;)) 71 ,2 ⋯ ,)
?
Where 9*= %;*) ≥ 0, & = 1,2, … 4; ∑ 9)*+ *= 1 , ,*≥ 0
Parag Patil
, IJRIT 488
3.3.3 Segmented image based on cutting EntropyPrims Algorithm recognized the MST based on the cost of each edge recognized by cost entropy function.
4. Results And Discussion
Here we are considering one image for segmentation and depending upon value of entropy and thresholding effect on image are given below.
Fig.1. First Image (Without Segmentation)
The figure 1 shows us the original image which is not segmented.
Fig.2. Segmented Image, ej = 2.000 Fig.3. Segmented Image with optimum Thresholding, ej = 1.333
In the Figure 2 we can find out that the result of image obtained of vegetables is not give better visual perception as compared to figure 3.So the objective functions of maximum weighted entropy is more reliable with our
observation.
The Table 1 shows us the Parameters about the MST. They show us the starting, ending points and the uncertain costs of the MST. Given table shows different entropy value for given input pixel depending upon weight of each edge.
Table 1
Starting Point Ending Point Uncertain Cost
1 34 1.3256
Parag Patil
, IJRIT 489
1 2 1.6151
34 67 1.6703
67 68 1.3227
68 101 1.4317
101 102 1.2147
Partial parameter about MST
5. Conclusion
Image Segmentation based on graph theory using Prims Algorithm which connects the pixels by recognizing image segmentation based on the weighted function. When same function used reversely on output image we get original image back which gives a robust image. In future we would be trying to found out more of these techniques which will do the same work with less time complexity and space complexity without disturbing picture quality.
6. References:
[1] ZHANG Yu-jin.Image project (media), image analysis. Beijing: Tsinghua University Press, 2005.
[2] LIN Kai-yan,WUJun-hui,XU Li-hong. A survey on color image segmentation techniques[J]. Journal of Image andGraphics,2005, 10(1) :1-10.
[3] WANG Ze-bing,YANG Chao-hui. Research in Color image Segmentation Techniques [J]. Video Engineering2005, 4:20-24.
[4] YAN Cheng-xin SANG Nong, ZHANG Tian-xu. Survey on graph theory based image segmentation technique [J].Computer Project and Applications,2006, 5:11-14.
[5] YANG Fan, LIAO Qing-min. Analysis and research of graph-based segmentation method [J]. Video Engineering, 2006, 7:80-83.
[6] QIAN Yun-tao, ZHAO Rong-chun, XIE Wei-xin. Robust clustering-An approach based on graph theory and objective function [J] .ACTA ECELTRONICA SINICA, 1998, 26 (2):91-94.
[7] P F Felzenszwalb.Eifficient Graph-Based Image Segmentation [J].International Journal of Computer Vision, 2004, 59(2):167-181
[8] J Shi. Normalized cuts and image segmentation [J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2000, 22(8):888-905.
[9] Z Wu. An optimal graph theoretic approach to data clustering: theory and its application to image segmentation [J].IEEE Transactions on Pattern Analysis and Machine Intelligence, 1993, 15(11):1101-1113.
[10] Wu Nai-long,Yuan Su-Yun. Maximum entropy method [M].Hunan Science and Technology Press, 1991 [11] XU Jun-ming. Graph theory and its application [M]. Hefei: China University of Science and Technology Press, 1998.
[12] ZHU S L, Zhang Z Acquisition and Analysis of Remote Images [M].Beijing: Science Press, 2000.
[13] Li De-yi, Du Yi. Uncertainty Artificial Intelligence [M].Beijing: National Defense Industry Press, 2005.