Shape recognition of overlapped objects using Oversegmentation

DOI : 10.17577/IJERTV1IS4116

Download Full-Text PDF Cite this Publication

Text Only Version

Shape recognition of overlapped objects using Oversegmentation

International Journal of Engineering Research & Technology (IJERT)

ISSN: 2278-0181

Vol. 1 Issue 4, June – 2012

Modified Shape prediction algorithm using Oversegmentation

HarpreetKaur

Chandigarh Engineering College, Landran, Mohali

ManpreetKaur

Chandigarh Engineering College, Landran, Mohali

This paper represents a modified shape prediction algorithm to predict the shapes of different objects using oversegmentation technique. This is the main research topic to predict the shapes of different objects. Feature extraction process is used in it for predicting the shapes of objects. Before the feature extraction process, firstlypredicts the boundary of the shape. Based on morphological commands features of the objects are extracted using fuzzy logic operations. After the feature extraction process, then use the prediction table for matching the features of the current object with the preloaded feature data base or training set. This algorithm predicts the different shapes of objects depending on two parameters corners, and the dimensions (length, breadth) of a particular object in a prediction table. Also profiling of the algorithm is done to measure the execution time

.With the help of the mathematical relation it can predict the accuracy of algorithm execution.

Keywords:oversegmentation, morphological operation,shapeprediction,.

  1. Shape analysis is used to analyze and process geometric shapes. The shape analysis is related to the statistical analysis of geometric shapes, to shape matching and shape recognition. Most commonly a boundary representation is used to describe the object with its boundary.

    Shape recognition represents a very important computer vision domain, consisting of recognizing of image objects based on their information [1].

    Shape analysis is used in many application fields such as archeology for example, to find similar objects or missing parts, in architecture for example, to identify objects that spatially fit into a specific space, in medical imaging to understand shape changes related to illness or aid surgical planning, in entertainment industry (movies, games) to construct and process geometric models or animations, in computer-aided design and computer-aided manufacturing to process and to compare designs of mechanical parts or design objects.

    By extracting shape from images, they have to be simplified before a comparison can be achieved. The simplified representation is often called a shape descriptor. These simplified representations try to carry most of the important information, while being easier to handle, to store and to

    compare than the shapes directly. Different shape descriptors target different aspects of shape and can be used for a specific application. Therefore, depending on the application, it is necessary to analyze how well a descriptor captures the features of interest.

    In image processing, feature extraction is a special form of dimensionality reduction. When the input data to an algorithm is too large to be processed and it is suspected to be notoriously redundant (much data, but not much information) then the input data will be transformed into a reduced representation set of features also named feature vector. Transforming the input data into the set of features is called feature extraction. If the features extracted are carefully chosen it is expected that the features set will extract the relevant information from the input data in order to perform the desired task using this reduced representation instead of the full size input.

    Morphology is a broad set of image processing operations that process images based on shapes. Morphological operations apply a structuring element to an input image, creating an output image of the same size.

    The most basic morphological operations are dilation and erosion. Dilation adds pixels to the boundaries of objects in an image, while erosion removes pixels on object boundaries. The number of pixels added or removed from the objects in an image depends on the size and shape of the structuring element used to process the image.

    If there is any noise or slight deviations, the correct matches of objects are possible by using oversegmentation [14].

    1. Algorithm withoutoversegmentation

      During this process the shapes of the different objects are being saved in .bmp file as shown in Figure 2 (I). Using this algorithm, the shape of objects circle, square, rectangle can be predicted as shown in figure 2 (II).

      Figure 2 (I): Input image

      Figure 2 (II): Output image

      If the two or three objects are merged as shown in figure 2 (III), In this square and rectangle are merged. It can be seen that without using oversegmentation this algorithm cant predict the shape of merged objects as shown in figure 2 (IV). This process cant distinguish the shape of irregular images in which two or three objects are merged with each other to form a complete object.

      Figure 2 (III): Input image

      Figure 2 (IV): Output image

      Without using oversegmentation it will take merged objects as a single object and cant predict the shapes of merged objects. This problem can be solved by using oversegmentation.

    2. Algorithm withoversegmentation

The shapes of the different objects are being saved in bmp file. This is the very basic way to test and verify our algorithm to predict the shape of the different objects. Oversegmentation concept is used in this algorithm for predicting the shape of different objects like circle, square, triangle, rectangle, polygon.

This algorithm is used to predict the shape of the objects which are merged with each other. This algorithm is also used for predicting the shapes of different objects which are merged with each other

having slightly different colour intensity which is not recognized by human vision.

The images in which objects having the slightly different colour intensity from the background. In such case, objects in the image are not evenly recognized by the human vision .In this case oversegmentation is used to predict the shapes of the objects.

Elementary Multiplication

Figure 3: Flow chart Firstly read the rgb image.

Then convert the rgbimage to gray colour(img1) Create a new image named grand_ total of the same size as the image (gray colour img1) and convert the grand_total image to a binary image.

Store the threshold value (Th). Using a thresholding technique convert the grayscale image to a binary image until the Th=0. Thresholding is used to create a binary image from grayscale image. Then the binary image is processed using morphological operations.After creating the binary image (named dummy), use the NOT operation on the binary image to create another image named ( ~

dummy). Multiply this image (~dummy) with grayscale image (img1) that multiplication will be elementary multiplication.

The morphological erosion operation is applied to binary image (named dummy). Using erosion operation the size of the objects get reduced. If the objects are attached to each other then by using morphological erosion operation these objects can be separated from one another.

After the erosion operation, the result is placed in dummy1.Then OR operation of grand_total image is done with the dummy1 image. If Th=0 then the process is stopped.

    1. For the shape prediction of different objects, Shapes of the objects are described and boundary of the shape is predicted, the objects re segmented from the background using oversegmentation [16].

      Then feature extraction process is applied in the shape of objects. The feature extraction process by which features of the objects are extracted using fuzzy logic operations and it is based on morphological commands.

      Thresholding technique is used to create binary images from grayscale images .During the thresholding process, individual pixels in an image are marked as "object" pixels if their value is greater than some threshold value and as "background" pixels otherwise. Typically, an object pixel is given a value of 1 while a background pixel is given a value of 0. Finally, a binary image is created by colouring each pixel white or black, depending on a pixel's label.

      Erosion and dilation are the two basic operators in the area of mathematical morphology. Erosion is applied to binary images to erode away the boundaries of regions of foreground pixels. Thus areas of foreground pixels shrink in size, and holes within those areas become larger.

      For performing the morphological operation take the structuring element.

      se = strel('disk',1); dummy1=imerode (dummy,se);

      Disk shaped structuring element used in it. For example 'disk', 1 means the diameter of objects will be reduced according to this value.

      For eroding an image, imerode function is used. The imerode function accepts two primary arguments.

      • The input image to be processed (binary image).

      • A structuring element object, returned by the strel function.

      In this, structuring element will find the precise effect of the erosion on the image. Because of a disk shaped structuring element, shape of the region has been quite well preserved.

      Labellingthe objects

      Labelling of the objects is necessary for predicting the shapes of objects. Each object is labelled with the different number.

      [lablednum]=bwlabel(grand_total);

      S = regionprops (labeled, 'centroid'); centroids = cat(1, s.Centroid);

      For the shape recognition of the circle, triangle, square, rectangle and polygon use the prediction table in which twoparameterdimensions (length, breadth) and corners are defined.

      For detecting the corners of each object sensitivity factor must be used, it will be different for each object.

      The prediction of the shapeof objects depending on tolerance of each object.By choosing different tolerance for each object, shapes of different objects can be predicted.

    2. For predicting the shapes of merged objects

      Figure 4.1 (I): Input image

      Without oversegmentation the shapes of individual objects can be predicted but the shapes of the merged objects cant bepredicted. In this figure 4.1

      (I) rectangles and circle attached with each other. By using oversegmentation concept, the shapes of these objects are predicted. The output is shown in 4.1 (II), 4.1 (III)

      Figure 4.1 (II) showing the objects containing in the image

      In this figure 4.1 (II) for predicting the shape of these objects, this algorithm extracts the boundary of each object. Merged objects are identified by extracting the boundaries of objects. After this feature extraction process is used.

      Figure 4.1 (III) showing the predicted shapes of objects

      For the shape prediction of objects match the features of the objects with the predefined data in prediction table. The objects whose shapes are

      predicted are shown in figure 4.1 (III). It also solves the problem stated in the problem statement, where the rectangle and square are merged with each other.

    3. For predicting the shapes of merged objects having slightly different colour intensity

      In this figure 4.2 (I), object (A) is merged with square and rectangle which having slightly different colour intensity from each other which is not recognized by human vision. But this algorithm using oversegmentation technique the shape of square and rectangle is predicted which is shown in the output.

      Figure 4.2 (I): Input image

      Figure 4.2 (II): showing the merged objects that are present in the image

      Figure 4.2 (III) showing the predicted shapes of objects

      Figure4.2 (II) showing the merged objects that are present in the image which are not recognized by human vision and in this it separates the merged objects by extracting the boundary of objects and gives the object no for each object and figure 4.2

      (III) shapes of all the objects are predicted by matching the features of objects with the predefined data in the prediction table.

    4. For predicting the shapes of objects which are not recognized by human vision

In this figure 4.3 (I), two rectangles, circle, square, triangle and polygon are present in it. In this objects having the slightly different colour intensity from the background so it is not visualized by human vision. Figure 4.3 (I) input image containing objects whose shape is to be predicted. In such case oversegmentation is used for predicting the shapes of objects. The results are shown in figure 4.3 (II) and figure 4.3 (III)

Figure4.3 (I) Input images containing the objects

Using oversegmentation the shapes of those objects are predicted that are not recognized by human vision. In figure 4.3 (II) showing the objects that are present it.In figure 4.3 (III) predicted shapes of the objects are

shown as below .

Figure 4.3 (II) shows the objects that are not recognized by human vision in the above image

Figure 4.3 (III) Image shows the predicted shape of objects

By using oversegmentation technique, this algorithm extracts the boundary of objects that are present in the image 4.3 (I). These objects are not identified by the human vision. By using oversegmentation the objects are visualized in 4.3 (II)

Figure 4.3 (III) It can be seen that the shape of the objects are predicted. For predicting the shape of objects, match the features of objects in the image

4.3 (II) with the predefined data in the prediction table. The predicted shapes of the objects are shown in figure 4.3 (III)

Figure 4.1 (III) shows the predicted shape of objects. It also shows the shape of the merging objects.

Figure 4.2 (III) shows the predicted shapes of merging objects which have the slightly different colour intensity from each other that is not recognized by the human vision .

Figure 4.3 (III) shows the predicted shapes of objects which have the slightly different colour intensity from the background. Due to the slightly different colour intensity these objects are not recognized by the human vision. But using oversegmentation the shapes of these objects are predicted.

  1. Figure 6

    This algorithm also computes the execution time for predicting the shape of different objects.

    This figure (6) shows the how much time is taken by the algorithm for predicting the shapes of different objects. Execution time of the algorithm (sec) is determined with respect to the size of images (KB). The execution time depends on the size of the image and no of objects present in the image. The image size of 148 KB takes 3.987 sec for execution. The image size of 804 KB takes 9.73 sec for execution. The image size of 924 KB takes 8.637 sec for execution. The image size of 1051 KB takes 11.943 sec for execution. The image size of 1329 KB takes 12.482 sec for execution

    The image size of 804 KB takes more time than image size of 924 KB because of the size of 804 KB having 9 objects present in the image and image size of 924 KB having 6 objects present in the image. The result is based on a system having a configuration as follows

    CPU: AMD Phenom II 3.3 Ghz RAM: 4 GB

    OS : Windows 7 64-bit

The accuracy of the algorithm to predict the shapes of different objects depends on false detection in the result and true detection in the result.

Table 1: Accuracy

Images

Falsedetectionof objects

(FD)

True detection of objects

(TD)

No. of objects present in the image

Image 1

0

5

5

Image 2

1

6

7

Image 3

0

8

8

Image 4

2

9

11

Image 5

0

6

6

Image 6

0

4

4

Image 7

1

8

9

Accuracy is calculated as =

n

TD× 100 i=1 FD + TD

Where, i= Image 1.

TD= True detection of objects in the image. FD= False detection of objects in the image. n= Total number of images .

The accuracy of this algorithm is 92.016% obtained.

In this study shape prediction algorithm using oversegmentation is proposed, theshapes of circle, square, rectangle, triangle, polygon are predicted. This is an efficient and new method for shape prediction of different objects .By integrating oversegmentation technique, this algorithm predicts the shape of merged objects. It can be seen that this algorithm canalso predict the shape of those merged objects that have slightly different colour intensity from each other which is not visualized by

human vision. This algorithm can also be used in some complicated cases in which the objects in the image having slightly different colour intensity from the backgroundso that they are not evenly recognized by human vision. In such cases, this algorithm is used to obtain the efficient result. The execution time for different size of images is also evaluated. With use of the above mentioned mathematical formula it has predicted accuracy of

92.016 % , it is a satisfactory result . But this result can be much improved by including overlap technique in our MATLAB program .

Withthe successful result of the shape prediction of the different objects using oversegmentation, this paper focuses the same area needs to work on. This motivates to improve the efficiency .So that it canbe more efficient. The future work mainly focuses on to be made successful prediction of the images with completely overlap with each other.

  1. L. Floriani, M. Spagnuolo, Shape Analysis and Structuring, Springer, 2007.

  2. J. A. Jaramillo, M. Orozco, G. Castellanos and J. C. Rhino Variational Shape Model for Lip Postures Recognition using GA 2006 IEEE

  3. KosorlThournandYuttanaKitjaidure Multi-View Shape Recognition Based on Principal Component Analysis 2008 IEEE

  4. SorinIvascu,CorneliuToma, Axel Gräser High Dynamic Range Acquisition And Shape Recognition 2010 IEEE

  5. Yang Mingqiang ,KpalmaKidiyo, Ronsin Joseph Shape Matching and Object Recognition Using Chord Contexts 2008 IEEE

  6. Jon Almazan, Alicia Fornes, Ernest Valveny A Nonrigid Feature Extraction Method for Shape Recognition 2011 IEEE

  7. Mr.Suhas G. Salve ,Ms.Kalpana C. JondhaleShape Matching and Object Recognition Using Shape Contexts 2010 IEEE

  8. DonggangYu , Jesse S. Jin1 , Suhuai Luo1 ,Wei Lai

    ,MiraPark and Tuan D. Pham Shape Analysis and Recognition Based on Skeleton and Morphological 2010 IEEE

  9. Tudor Barbu Automatic Unsupervised Shape Recognition Technique using Moment Invariants

  10. Weiqi Yuan, Lantao Jing Hand- Shape Feature Selection and Recognition

    Performance Analysis 2011

  11. Ron Wang, Fanliang Bu, Hua Jin, Lihua Li Toe Shape Recognition Algorithm Based On Fuzzy Neural Networks 2007 IEEE

  12. EhsanMoomivand, ErfanAbolfazli A Modified Structural Method for Shape Recognition 2011 IEEE

  13. James C. BezdekandSankar K. PAL Fuzzy models for pattern recognition.IEEE 1992.

  14. S. Thilagamani,N. ShanthiA Novel Recursive Clustering Algorithm for ImageOversegmentation, ISSN 2011.

  15. Manuel J. Fonseca JoaquimA. JorgeUsing Fuzzy Logic to Recognize Geometric Shapes Interactively

  16. XiaofengRen and Jitendra Malik Learing a Classification Model for Segmentation In Proc.9th International Conf. Computer vision, volume 1, page 10- 17, 2003.

Leave a Reply