You are on page 1of 8

Table of Contents

1. Introduction
2. Types of Image Segmentation
3. Region Based Segmentation
4. Region Based Segmentation Algorithm
5. Implementation of Region Based Segmentation On Biomedical Application
6. Advantage and Disadvantage of Region Based Segmentation
7. Conclusion
References
1. Introduction

Image segmentation is a technique of dividing digital image in to multiple segments so as to


simplify or change the representation of an image in to something that is more meaningful
and easier to analyze. In medical sector, we use image segmentation to locate and identify
cancer cells, measure tissue volumes, run virtual surgery simulation, identifying affected
areas, identifying fracture body for diagnostic purposes. We have different types of image
segmentation used for image processing, but we only see about region based segmentation
and its implementation in biomedical application.

2. Types of Image Segmentation

We have different types of image segmentation such as:

a. Threshold segmentation
 Global
 Otsu
 Local and Adaptive
b. Region based segmentation
c. Edge based segmentation
d. Watershed segmentation
e. Clustering based segmentation
f. Neural network for segmentation

3. Region Based Segmentation

Region based segmentation algorithms divide the image into sections with similar features.
These regions are only a group of pixies (image elements) and the algorithm find these
groups by first locating a seed point which could be a small section or a large portion of the
input image.

After finding the seed points, a region based segmentation algorithm would either add more
pixels to them or shrink them so it can merge with other seed points. According to this we
can classify region based segmentation in to two categories:

I. Region Growing
II. Region Splitting and Merging

Region Growing

In this method, we start with a small set of pixels (seed point) and then start iteratively
merging more pixels according to particular similarity conditions. The similarity could be in
terms of texture, shape or colour. A region growing algorithm pick an arbitrary seed pixel in
the image, compare it with the neighbouring pixels and start increasing the region by finding
matches to the seed point.

When a particular region can’t grow further, the algorithm will pick another seed pixel which
may not belong to any existing region. One region can have too many attributes causing it to
take over most of the image. To avoid this error, region growing algorithm grows multiple
regions at the same time.

We should use region growing algorithm for images that have a lot of noise where edges are
difficult to detect.

Region Splitting and Merging

A region splitting and merging method would perform two actions together _ splitting and
merging portions of image.

In region merging first start with small region that have similar attributes and then merges the
region that has similar characteristics.

Region splitting is the opposite of region growing. Region growing starts from the seed point,
whereas region splitting starts from the whole (entire) image as a single region and subdivide
the region that does not satisfy the condition of homogeneity (similarity).

4. Region Based Segmentation Algorithm

Region Growing Algorithm

 Start with a set of seed points


 The homogeneity (similarity) check has to be carried out between the seed region of
consideration and the image pixel.
 If the similarity is as per the set threshold or below, grow regions by appending that
pixel to the seed region.
 Keep iterating until the discontinuity is identified.

Region Splitting and Merging Algorithm

 Start from the entire image


 Subdivided the entire image in to arbitrary disjoin region
 Split and continue subdivision process until some stopping criteria is fulfilled
 Often it is stopped no further splitting is possible
 Merge adjacent regions if the regions share any common criteria
 Stop the presses when no further merging is possible
5. Implementation of Region Based Segmentation On Biomedical Application

%% Implementetion of Region growing of lever tumor analysis


%% Main calling function
I=imread('tumor_of_lever.png');
subplot(2,2,1)
imshow(I)
title('orginal image')
I2=im2double(I);
x=87;
y=158;
J=regiongrowing(I2,x,y,0.2);
subplot(2,2,2)
imshow(I2+J);
title('Region growing segmmented image');

%% calling function regiongrowing in separate file name

function J = regiongrowing(I,x,y,reg_maxdist)
% This function performs "region growing" in an image from a specified
% seedpoint (x,y)
%
% J = regiongrowing(I,x,y,t)
%
% I : input image
% J : logical output image of region
% x,y : the position of the seedpoint (if not given uses function getpts)
% t : maximum intensity distance (defaults to 0.2)

if(exist('reg_maxdist','var')==0),reg_maxdist=0.2;
end
if(exist('y','var')==0),imshow(I,[]);
[y,x]=getps;
y=round(y(1));
x=round(x(1));
end
J=zeros(size(I)); %out put
Isizes=size(I); % Dimensions of input image
reg_mean = I(x,y); % the mean of segmented region
reg_size=1; % number of pixels in the region
% Free memory to store neighbours of the (segmented) region
neg_free = 10000; neg_pos=0;
neg_list = zeros(neg_free,3);
pixdist=0; % Distance of the region newest pixel to the region mean
% Neighbor locations (footprint)
neigb=[-1 0; 1 0; 0 -1;0 1];
% Start region growing until distance between region and possible new pixels become
% higher than a certain treshold

while(pixdist<reg_maxdist&&reg_size<numel(I))
% Add new neighbors pixels
for j=1:4,
% Calculate the neighbour coordinate
xn = x +neigb(j,1); yn = y +neigb(j,2);
% Check if neighbour is inside or outside the image
ins=(xn>=1)&&(yn>=1)&&(xn<=Isizes(1))&&(yn<=Isizes(2));
% Add neighbor if inside and not already part of the segmented area
if(ins&&(J(xn,yn)==0)) neg_pos = neg_pos+1;
neg_list(neg_pos,:) = [xn yn I(xn,yn)]; J(xn,yn)=1;
end
end
% Add a new block of free memory
if(neg_pos+10>neg_free), neg_free=neg_free+1000; neg_list((neg_pos+1):neg_free,:)=0; end
dist = abs(neg_list(1:neg_pos,3)-reg_mean);
[pixdist, index] = min(dist);
J(x,y)=2; reg_size=reg_size+1;
% Calculate the new mean of the region reg_mean= (reg_mean*reg_size + neg_list(index,3))/(reg_size+1);
% Save the x and y coordinates of the pixel (for the neighbour add proccess)
x = neg_list(index,1); y = neg_list(index,2);
% Remove the pixel from the neighbour (check) list
neg_list(index,:)=neg_list(neg_pos,:); neg_pos=neg_pos-1;
end
J=J>1; % Return the segmented area as logical matrix
6. Advantage and Disadvantage of Region Based Segmentation
7. Conclusion

As summery image segmentation plays a significant role in digital image processing. It is use
full in simplify or change the representation of an image in to something that is more
meaningful and easier to analyze. It facilitates medical sectors. We saw different types of
image segmentation techniques basically region based segmentation. It divides the image into
sections with similar features. It is sub divided in to two groups such as: region growing,
region splitting and merging. Finally we implement region growing algorithm to analysis
tumour of lever.
References

[1] Pavan Vadapalli, Image Segmentation Techniques, Up Grade Educational Private


Limited, 2015.

[2] Shriram K. Vasuderan, Region Based Segmentation, 2021.

[3] Chrysi Papalazarou, Sveta Zinger, Fundamentals of Medical Image processing, Video
Coding and Architectures Research group.

You might also like