8
Image Segmentation - Region Growing Algorithm Pi19404 February 25, 2013

Region Growing Algorithm For UnderWater Image Segmentation

Embed Size (px)

DESCRIPTION

Region Growing Algorithm For Image Segmentation in under water environment for object segmentation

Citation preview

Page 1: Region Growing Algorithm For UnderWater Image Segmentation

Image Segmentation- Region Growing

Algorithm

Pi19404

February 25, 2013

Page 2: Region Growing Algorithm For UnderWater Image Segmentation

Contents

Contents

Image Segmentation - Region Growing Algorithm For UnderWater Image

Segmentation 3

0.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30.2 Image Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . 3

0.3 Region Growing Algorithm . . . . . . . . . . . . . . . . . . . . . . 3

0.4 4/8 conneced neighbors Recurive Algorithm . . . . . . . . . 4

0.5 Modification of OverExposed Regions . . . . . . . . . . . . . . 6

0.6 Using The Edge Map . . . . . . . . . . . . . . . . . . . . . . . . 60.7 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80.8 Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2 | 9

Page 3: Region Growing Algorithm For UnderWater Image Segmentation

Image Segmentation - Region Growing Algorithm For UnderWater ImageSegmentation

Image Segmentation - RegionGrowing Algorithm For UnderWaterImage Segmentation

0.1 IntroductionIn this document we will look at task of image segmentation anduse region growing algorithms to achieve this task and its applicationto underwater image segmentation.

0.2 Image Segmentation

The goal of image segmentation is to partition the image into sub-regions with homogeneous intensity (color or tex- ture) propertieswhich will hopefully correspond to objects or object parts.

Region growing algorithms is a method to extract similar partsof image. The region growing algorithms checks for similarity of theneighborhood pixels of given initial seed point and labels the pixelsthat meet the similarity criteria and mean value of region foorsimilarity evaluation is determined.

The neighborhood pixels of the newly labelled points are anal-ysed and similarity comparison is performed with newly computedmean value. In this way neighborhood can grow in a iterative mannertill stopping criteria is met.

0.3 Region Growing Algorithm

Conider a set R which contains pixels that belongs to the regionthat is required to be segmented.Let set S represent a set ofpixels called seed points. Seed points are pixels that is known tobelong to object desired to be segmented.

3 | 9

Page 4: Region Growing Algorithm For UnderWater Image Segmentation

Image Segmentation - Region Growing Algorithm For UnderWater ImageSegmentation

For the present application we assume that we need identifythe region in the image to which seed pixels belong ie other regionof the image are not required.

For every seed points 4/8 connected neighbors of seed pointare analyzed for similarity with the seed pixel using some pre-defined criteria.

Thus all the neighborhood pixels are marked to be compared withseed pixel.

If the connected neighbor satisfies the criteria then it is in-cluded labelled as desired region and neighbor is unmarked. Whileall the connected neighbors of the present neighbor are marked.

This process continues till no marked pixels remains which results insegmentation of region to which seed pixel belongs.

As the region grows the similarity comparision can be peformedwith the mean value of region rather than just the seed pixels.

0.4 4/8 conneced neighbors Recurive Algorithm

We will use a recurive algorithm to implement the task. Input toalgorithm is input image and seed pixel location,the output is alabelled image.

Input to recurive function will be location of pixel required tobe analyzed. Inital call to recurive function is the seed pixel location.

The function calls a ColorDistance function to check for simi-larity of the given pixel with the seed pixel provided the pixel hasnot been analyzed already.

If the distance is less than a specified threshold pixel is markedin the output labelled image and recursive calls are initiated toneighbors of the current pixel.

Labelling the output image indicates the pixel has been analyzedand any call to function labelled pixel locations will return withoutperforming any action.

4 | 9

Page 5: Region Growing Algorithm For UnderWater Image Segmentation

Image Segmentation - Region Growing Algorithm For UnderWater ImageSegmentation

As algorithm progress all connected neighbors of seed pixels areused to initiate recursive calls .If these pixels satisfy the similaritycriteria use recurive calls for their connected neighbors and so on.

In this way all the connected pixel of seed pixel satisfying thesimilarity criteria are labelled in the output image and segmentationis achieved.

The we can either consider 4/8 connected beighbors for analy-sis.

In the present implementation we use a threshold of 20 . Ifeuclidean distance between two pixels is less than 20 we considerthe pixels to be similar.

We can see that region growing algorithm stop at places whenreflections of object fall on the water.Increasing the threshold isone option to overcome this problem.But it is not guranteed towork in all scenarios.This is shown below.

The seed is choosen at location within the shown object. In

(a) Image (b) thresh 20 (c) thresh 50

(d) input 2 (e) thresh 50 (f) thresh 80

Figure 1: Standard Seeded region growing

the second image we can see than even with high threshold of80,the white over exposed region will never be labelled as belonging

5 | 9

Page 6: Region Growing Algorithm For UnderWater Image Segmentation

Image Segmentation - Region Growing Algorithm For UnderWater ImageSegmentation

to the object.

0.5 Modification of OverExposed Regions

The standard region growing algorithms use only color measurementsfor similarity criteria.Underwater images are affected by reflectionsand crinkle effects which leads to over exposure in some parts ofthe object being segmented. Due to these effects a large intensitychange in observed in region withing the object being segmented iesharp edge are observed within the object region.

The standard Region growing algorithms would terminate at theseregion since large color difference is encountered wrt to seed pixelcolor or color of object required to be segmented.

Thus to overcome this we compute the similarity measure basedon the color,exposedness of region as well as local edge intensity.

One simple technique is to check the distance of pixel being consid-ered to white color.If the distance is close to white than seed pixelcolor and within a specified threshold ,which can be independentsimilarity threshold then we will include pixel as belonging to theobject.

However this modification may not always provide desired sementa-tion as shown in the images below.

0.6 Using The Edge Map

In the second image we can see that due to connected whitecolored pixels the region grows belong the desired object.

To over the effect of seeded region growing algorithm growingbelond the object we use edge information. We compute the edgemap using canny edge detection technique. mean value of edgeabout a small neighborhood of point being analysed is computed andadded to the distance computed to white colored pixels. Thus ifthe color is white but region has a edge the distance will increaseand if region has strong edge it will increase the distance belongthe threshold and region growing will stop. though pixel is white in

6 | 9

Page 7: Region Growing Algorithm For UnderWater Image Segmentation

Image Segmentation - Region Growing Algorithm For UnderWater ImageSegmentation

(a) input 2 (b) thresh 80 (c) modified

(d) Image (e) thresh 20 (f) thresh 50

Figure 2: Modified Seeded Region Growing Algorithm

color and connected to original object.

Also we make one more modification of reducing the distancethreshold to white pixels keeping it half of color threhold.

In the above image the hand along with the object is de-

(a) Image (b) thresh 20 (c) modified SRG

(d) edge map

Figure 3: Using Edge Map

tected since the color threshold is kept high.But the main point

7 | 9

Page 8: Region Growing Algorithm For UnderWater Image Segmentation

Image Segmentation - Region Growing Algorithm For UnderWater ImageSegmentation

to note is that due to addition of edge map the region does notoverflow significantly from the desired object boundary

0.7 Future WorkStatic color threholds are being used presently.A adaptive thresholdwould be required based on information content present in theimage as well as strenght of edge .

The recursive algorithm is computationally expensive hence fasterregion growing algorithm will be included in the future work.

A better color distance criteria for similarity matching is required.Analysis in different color space and distance other than eculideanwill be considered in the future work.

0.8 CodeThe class RegionGrowing defines a generic interface for region grow-ing algorithm. The input to algorithm is input image and seed pixellocation and output is labelled image. Code is available in repositoryhttps://github.com/pi19404/m19404/tree/master/RegionGrowing

8 | 9