SlideShare a Scribd company logo
IOSR Journal of Computer Engineering (IOSR-JCE)
e-ISSN: 2278-0661, p- ISSN: 2278-8727Volume 11, Issue 3 (May. - Jun. 2013), PP 51-56
www.iosrjournals.org
www.iosrjournals.org 51 | Page
A Hybrid Technique for Shape Matching Based on chain code
and DFS Tree
Kirti Jain1
, Dr.Sarita Singh Bhadauria2 ,
Dr.Gulab Singh3
1
(Computer Science &Engg Dept., LNCTS BHOPAL ,INDIA)
2
(Electronics Dept.,M.I.T.S. GWALIOR, INDIA)
3
( Computer Science &Engg Dept ,LNCTS BHOPAL ,INDIA)
Abstract: Lower features content of image are playing a very important role for content based image retrieval.
The lower features content of image are color ,texture and shape. Shape finds outliers of object stored in
database. The retrieval of image is used in many areas such as multimedia, medical science and internet
technology. The semantic gap between query image and result of retrieval image. In this paper we propose a
hybrid technique for shape matching based on chain code and DFS tree. Chain code is important and well
method for boundary structured detection and DFS is graph searching technique. Here merge both method for
detection of boundary pattern and matching of object. Used of DFS technique find the absolute detection of
decide edge value of chain code.
Keywords: Shape Matching, Features Descriptors, chain Code, DFS
I. Introduction
Now the growth of technology and demand of multimedia data and medical diagnosis need a very high
accurate result of content based image retrieval[1]. Content based image retrieval basically work on lower
feature content of image and video. The lower content of image is playing an important role of image retrieval.
Now a day’s used for lower content of image is features descriptor such as MPEG-7 descriptor [4].MPEG-7
descriptor based on Fourier transform function for shape and boundary features detection. Many shape
representation have been proposed for various purposes. These methods can generally be grouped into contour-
based and region based. Contour-based methods, such as chain code, shape signature, polygonal approximation,
autoregressive models, FD and CSS, exploit shape boundary information which is crucial to human perception
in judging shape similarity[9]. Region based methods, such as geometric moments, Zernike moments, grid
representation and area, exploit only shape interior information, therefore can be applied to more general shapes.
The chain code shape detection have some disadvantage such as[5] (i) the chain of codes is too long (ii)Even
slightly disturbed code would not reconstruct original image. Such problem faced retrieval for query image.
These problem crate semantic gap between query image and retrieval image. For the reduction of chain code
size used DFS searching technique. DFS reduced the size of code and produced better result in compassion of
chain code. This paper is organized as follows: In Section 2, discuss features descriptors and chain code.
Section 3 discusses DFS searching technique. In Section 4 discuss hybrid method of shape matching. In section
5 discuss experimental result. The final section makes the conclusion for this paper.
II. Features Descriptors
Features descriptor plays an important role in content based image retrieval and pattern
Recognition[10]. Feature extraction can be defined as the act of mapping the image from image space to the
feature space. Now days, finding good features that effectively represent an image is still a difficult task. In this
literature, a wide variety of features are used for image retrieval from the database. Image content can
differentiate between visual and semantic content. Features usually represent the visual content[9]. Visual
content can be further divided into general or domain specific. Here discuss some shape based features
descriptors .There are generally two types of shape representations, i.e. contour-based and region-based.
Contour-based methods need extraction of boundary information which in some cases may not Available[3].
Region-based methods, however, do not necessarily rely on shape boundary information, but they do not reflect
local features of a shape. Therefore, for generic purposes, both types of shape representations are necessary.
Fourier descriptors are obtained by applying Fourier transform on shape boundary (usually represented by a
shape signature), the Fourier transformed coefficients are called the Fourier descriptors of the shape. For good
shape description, an appropriate shape signature is essential to obtaining Fourier descriptors.CSS (Curvature
scale space)descriptors are essentially the descriptors of key local shape features. By dealing shape in scale
space, not only the locations , but also the degree of convexities (or concavities) of shape boundaries are
detected. Since curvature is a very important local measure of how fast a planar contour is turning, therefore,
curvature scale space is exploited[7]. The CSS descriptors are obtained by first calculating the CSS contour
A Hybrid Technique for Shape Matching Based on chain code and DFS Tree
www.iosrjournals.org 52 | Page
map, the map is a multi-scale organization of the inflection points (or curvature zero-crossing points). Teague
has proposed the use of orthogonal moments to recover the image from moments based on the theory of
orthogonal polynomials, and has introduced Zernike moments, which allow independent moment invariants to
be constructed to an arbitrarily high order. In grid shape representation, a shape is projected onto a grid of fixed
size, 16×16 grid cells[4]. The grid cells are assigned the value of 1 if they are covered by the shape (or covered
beyond a threshold) and 0 if they are outside the shape. In this paper discuss chain code method as a shape
descriptor.
Chain code
A simple method to represent a contour is Freeman code (chain code)[5], a coding method of closed
shape by approximation of the continuous contour with a sequence of numbers, each number corresponding to a
segment direction[5]. Freeman’s code is usually employed in a 4- neighborhood given in fig-1 (where 4 possible
directions may be used) or in an 8-connectivity given in fig-2 (that gives an 8-directional chain code) [5]. This
representation is compact and is invariant to the geometric transformation translation. However, it depends on
rotation and scaling transformations. Moreover, it is difficult to manage Freeman’s code with complex
shapes.Chain code is a common approach for representing different rasterized shapes as line-drawings, planner
curves, or contours. Chain code describes an object by a sequence of unit-size line segments with a given
orientation. Chain code can be viewed as a connected sequence of straight –line segments with specified lengths
and directions. Chain coding is used to define objects boundaries for the purpose of measurement and
identification. A chain code follows the boundary of an object and indicates the change in direction according to
a 4- or 8- direction pattern as shown here:
Fig-1[4-Connected] Fig-2 [8-Connected]
III. DFS (Depth-First Search)
As in previous section chain code method is used for boundary detection , but the problem with chain
code is that it generate long chain code, if the shape is complex .However, it is also time consuming. In this
paper Depth first search technique is used to reduce the size of long chain code. Depth-first search , as its name
implies, to search ―deeper‖ in the graph whenever possible. In depth-first search, edges are explored out of the
most recently discovered vertex u that still has unexplored edges leaving it[8]. When all of u’s edges have been
explored, the search ―backtracks‖ to explore edges leaving the vertex from which u was discovered. This
process continues until discovered all the vertices that are reachable from the original source vertex. If any
undiscovered vertices remain, then one of them is selected as a new source and the search is repeated from that
source. This entire process is repeated until all vertices are discovered. As in breadth-first search, whenever a
vertex u is discovered during a scan of the adjacency list of an already discovered vertex u, depth-first search
records this event by setting u’s predecessor field π[u] to u. Unlike breadth-first search, whose predecessor
subgraph forms a tree, the predecessor sub graph produced by a depth-first search may be composed of several
trees, because the search may be repeated from multiple sources. The predecessor sub graph of a depth-first
search is therefore defined slightly differently from that of a breadth-first search we let
G, = (V, E,), where
E, = {(π[v]u,) : u E V and π[u] ≠ NIL} .
The following pseudo code is the basic depth-first-search algorithm. The input graph G may be undirected or
directed. The variable time is a global variable that we use for time stamping.
DFS (G)
1 for each vertex u Є V [G]
2 do color[u] ← WHITE
3 π [u] ← NIL
4 time t ←0
5 for each vertex u Є V [G]
6 if color[u] ==white
A Hybrid Technique for Shape Matching Based on chain code and DFS Tree
www.iosrjournals.org 53 | Page
7 then DFS-VISIT (U)
DFS-VISIT (U)
color[u] ← GRAY
d[u] ← time ←time+1
for each vertex u ϵ Adj[u]
if color[v] == WHITE
π[v]←u
DFS -VISIT( v)
color[u] ← BLACK
f [u]←time ← time +1
IV. Hybrid Technique
In this paper as discussed in section II and III that chain code is using for boundary detection and DFS
technique is used to overcome the problem of chain code method. Because here discuss chain code method with
DFS technique to make result efficient and fast, therefore this method is called hybrid approach. Here chain
code decides the direction of pixel data and depth-first search tree create a small loop of structure of sub graph.
The generated sub graph produced the compactness of shape matching. The direction of chain code is too long.
Now apply DFS and break long code into small loop sub graph, that sub graph produced a small segment of
pattern. That segment of pattern produced better compactness of pattern matching. The applied chain code finds
the length of boundary value and strore in vector as bit point. The vector point mapped the bit pattern black and
white. The Order of relation of shape property is 1 to2. For a boundary counter value is Bi ϵCN2
in image
feature extraction process’s=1,2,3…..n the level of traversing of spanning tree. Now the relation of pattern P(x,
y) and mapped feature is F.
𝑝(𝐵𝑖, 𝐹) =
𝑥−𝑥𝑓𝑖𝑛𝑎𝑙 +(𝑦−𝑦𝑓𝑖𝑛𝑎𝑙 ) 1/2
𝑇(𝑝)(𝑥𝑓𝑖𝑛𝑎𝑙 ,𝑦𝑓𝑖𝑛𝑎𝑙 )∈𝐵𝑖 ……………………… (1)
Where (xfinal, yfinal) is the last point of chain length code. T(p) is total visited level of path.
Here we present complete steps of our hybrid approach.
Step1: Create a binary image from the original image, possibly using some Thresholding and edge connection
techniques.
Step2: Chose a random pixel of image and decide the source node of tree.
Step 3: Save the image in matrix of 0’s for back ground and 1's for the object. While this process is in progress,
we compute the area of the object by adding for each Iteration
Step 4: The visited node source to end of pixel is level wise and create array to stored
The visited link.
Step5: Compute chain code by scanning the image to find the starting pixel of the Object. From that pixel, we
traverse the boundary and decide directions and save them as an array or list. This step is repeated until we reach
the end pixel
If end pixel not equal start pixel then Shape is not closed
If end pixel =start pixel then
We have a closed shape
Proceed to step 4
Closed Opened
Step 6: If end of pixel found in level create a sub graph and generate small shape pattern.
Step7: Calculate the area of shape by summing up visited node sub graph.
Step8: Compute the compactness by the shape. Check these values to find out if shape is generated or not go to
step 6.
Step 9: Count the corner based on direction change and save the elements for each Corner visited node.
Elements are the 4-chain segments where direction changed. Check the angle in each corner. Depending on the
number of corners and start and ending pixels. To decide the shape we have to find if the angles are 90
Step 10: Generate and connected sub graph produced many compacted small pattern.
Step 11: The transverse of DFS IS Stopped.
These are compact steps of our hybrid technique. From this technique we produced multiple patterns in single
image. Through this approach the accuracy of compactness of pattern are increases.
V. Experimental Result
To implement the above technique, we first find the shape features for images. The number of pixels in
each edge is referred to as one feature. These features are then stored in a matrix in row by row fashion i.e. each
row contains the shape features corresponding to one image. In this paper evaluated performance of our
algorithm using a general-purpose image database containing 500 JPEG images with size of 256*256 or
A Hybrid Technique for Shape Matching Based on chain code and DFS Tree
www.iosrjournals.org 54 | Page
256*384 pixels from COREL photo gallery. These images are divided into 5 categories, and there are 100
images in each semantic category. We test the performance of; the retrieval performance is measured by
precision and recall, which are defined as
Precision=
number of relevant images retrieved
number of images retrieved
……………………………………. (1)
Recall==
number of relevant images retrieved
number of relevant images in database
……………………………………….. (2)
Here we show the our retrieval result in figure this result is retrieved by our hybrid technique
And the performance of retrieval is better in comparison of chain code technique.
This figure shows that the retrieval result of chain code technique.
A Hybrid Technique for Shape Matching Based on chain code and DFS Tree
www.iosrjournals.org 55 | Page
Table 1 shows the empirical value of precision and recall
This graph shows that performance evaluation of both technique of image retrieval, blue line shows the dfs
technique for the retrieval of image.
VI. Conclusion
In this paper proposed a new technique for pattern detection using DFS technique combined with
chain code method. These technique generate a sub graph of a small pattern and produced a better compactness
and accuracy in compression of chain code method. Our experimental result shows the better performance in
comparison of only used chain code method. Using hybrid approach the performance of precision and recall are
increases in comparison of chain code method.
References:
[1] Eli Saber ,Yaowu Xub,, A. Murat Tekalp‖ Partial shape recognition by sub-matrix matching for partial matching guided image
labeling‖ in Pattern Recognition 38 (2005) 1560 – 1573
[2] Dengsheng Zhang and Guojun Lu‖ A Comparative Study of Three Region Shape Descriptors‖ in Digital Image Computing
Techniques and Applications, 21—22 January 2002
[3] Sanjoy K. Saha , Amit K. Das , Bhabatosh Chanda‖ Image retrieval based on indexing and relevance feedback‖ in Pattern
Recognition Letters 28 (2007) 357–366
[4] Dengsheng Zhang, Guojun Lu‖ Evaluation of MPEG-7 shape descriptors against other shape descriptors ‖ in Multimedia Systems c
Springer-Verlag 2003
[5] Lili Ayu Wulandhari, Habibolah Haron,‖ The Evolution and Trend of Chain Code Scheme‖ ICGST-GVIP, ISSN 1687-398X,
Volume (8), Issue (III), October 2008.
[6] Naif Alajlan_, Mohamed S. Kamel, George Freeman‖ Multi-object image retrieval based on shape and topology‖ in Signal
Processing: Image Communication 21 (2006)
[7] Dengsheng Zhang, Guojun Lu‖ Review of shape representation andd description techniques ‖ in Pattern Recognition 37 (2004)
[8] Thomas H. Cormen Charles E. Leiserson Ronald L. Rivest‖ Introduction to Algorithms‖ in IEEE 2002
performance evaluation of chain code and dfs tecnique
75
80
85
90
95
100
Recall
Precision
Precision (%)
Recall (%)
Data set Precision (%) Recall (%)
category 1
CHAIN
CODE
87.24 84.43
HYBRIDE
DFS
96.11 94.10
category 2
CHAIN
CODE
84.32 83.23
HYBRIDE
DFS
92.14 91.21
category 3
CHAIN
CODE
86.14 85.11
HYBRIDE
DFS
93.21 91.13
category 4
CHAIN
CODE
88.21 87.66
HYBRIDE
DFS
94.52 93.67
A Hybrid Technique for Shape Matching Based on chain code and DFS Tree
www.iosrjournals.org 56 | Page
[9] E. J. Cand`es and D. L. Donoho, ―Curvelets – a surprisingly effective nonadaptive representation for objects with edges,‖ in Curve
and SurfaceFitting, A. Cohen, C. Rabut, and L. L. Schumaker, Eds. Saint- Malo: Vanderbilt University Press, 2000.
[10] M. N. Do and M. Vetterli, ―Contourlets,‖ in Beyond Wavelets, G. V.Welland, Ed. New York: Academic Press, 2003.
[11] M. N. Do and M. Vetterli, ―The Contourlet Transform: ―An Efficient Directional Multiresolution Image Representation‖, IEEE
Transactions on Image Processing, vol. 14, no. 12, December 2005, pp. 2091 – 2106.
[12] D. D.-Y. Po and M. N. Do, ―Directional multiscale modeling of images using the contourlet transform‖, IEEE Transactions on
Image Processing, vol. 15, no. 6, pp. 1610-1620, June 2006.
[13] L. Zhang, P. Bao, ―Edge detection by scale multiplication in wavelet domain‖, Pattern Recognition Letters‖, 2002, 23, pp, 1771-
1784.
[14] Canny, J., 1986. ―A computational approach to edge detection‖. IEEE Trans. PAMI PAMI-8, pp. 679–698.

More Related Content

PDF
Conceptual Fixture Design Method Based On Petri Net
PDF
Classifier fusion method to recognize
PDF
IRJET- Extract Circular Object By Tracing Region Boundary and using Circulari...
PPTX
Text extraction from images
PDF
Jr3516691672
PDF
IRJET- Extract Circular Object by Tracing Region Boundary and using Circulari...
PPTX
Text detection and recognition from natural scenes
PDF
07 18sep 7983 10108-1-ed an edge edit ari
Conceptual Fixture Design Method Based On Petri Net
Classifier fusion method to recognize
IRJET- Extract Circular Object By Tracing Region Boundary and using Circulari...
Text extraction from images
Jr3516691672
IRJET- Extract Circular Object by Tracing Region Boundary and using Circulari...
Text detection and recognition from natural scenes
07 18sep 7983 10108-1-ed an edge edit ari

What's hot (18)

PDF
Study on a Hybrid Segmentation Approach for Handwritten Numeral Strings in Fo...
PDF
A MULTI-STREAM HMM APPROACH TO OFFLINE HANDWRITTEN ARABIC WORD RECOGNITION
PDF
A MULTI-STREAM HMM APPROACH TO OFFLINE HANDWRITTEN ARABIC WORD RECOGNITION
PPTX
SCENE TEXT RECOGNITION IN MOBILE APPLICATION BY CHARACTER DESCRIPTOR AND STRU...
PDF
Image restoration based on morphological operations
PDF
Path Finding Solutions For Grid Based Graph
DOCX
Template Matching - Pattern Recognition
PDF
E018212935
PDF
50120130406021
PDF
Content Based Image Retrieval Approach Based on Top-Hat Transform And Modifie...
PDF
Free-scale Magnification for Single-Pixel-Width Alphabetic Typeface Characters
PDF
Comparison of Defuzzification Methods from a Real World Problem
PDF
E041122335
PDF
SEGMENTATION OF CHARACTERS WITHOUT MODIFIERS FROM A PRINTED BANGLA TEXT
PDF
V.karthikeyan published article
PDF
Improved algorithm for road region segmentation based on sequential monte car...
PDF
International Journal of Engineering Research and Development (IJERD)
PDF
Automatic rectification of perspective distortion from a single image using p...
Study on a Hybrid Segmentation Approach for Handwritten Numeral Strings in Fo...
A MULTI-STREAM HMM APPROACH TO OFFLINE HANDWRITTEN ARABIC WORD RECOGNITION
A MULTI-STREAM HMM APPROACH TO OFFLINE HANDWRITTEN ARABIC WORD RECOGNITION
SCENE TEXT RECOGNITION IN MOBILE APPLICATION BY CHARACTER DESCRIPTOR AND STRU...
Image restoration based on morphological operations
Path Finding Solutions For Grid Based Graph
Template Matching - Pattern Recognition
E018212935
50120130406021
Content Based Image Retrieval Approach Based on Top-Hat Transform And Modifie...
Free-scale Magnification for Single-Pixel-Width Alphabetic Typeface Characters
Comparison of Defuzzification Methods from a Real World Problem
E041122335
SEGMENTATION OF CHARACTERS WITHOUT MODIFIERS FROM A PRINTED BANGLA TEXT
V.karthikeyan published article
Improved algorithm for road region segmentation based on sequential monte car...
International Journal of Engineering Research and Development (IJERD)
Automatic rectification of perspective distortion from a single image using p...
Ad

Viewers also liked (20)

PDF
Searching and Analyzing Qualitative Data on Personal Computer
PDF
The Wind Powered Generator
PDF
Analysis of Rate Based Congestion Control Algorithms in Wireless Technologies
PDF
Survey: Problems Related to Human in Software Projects
PDF
An Application Jeevan – Kushalaiah Method to Find Lagrangian Multiplier in Ec...
PDF
Motivation for Green Computing, an Analytical Approach
PDF
Data Classification Algorithm Using k-Nearest Neighbour Method Applied to ECG...
PDF
Filtering Schemes for Injected False Data in Wsn
PDF
Context Based Web Indexing For Semantic Web
PDF
An Approach to Improve Brain Disorder Using Machine Learning Techniques
PDF
A Distinctive Scheme for Extraction of Symmetrical Components along with Harm...
PDF
An SPRT Procedure for an Ungrouped Data using MMLE Approach
PDF
F0963741
PDF
Knowledge Management in Software Enterprise
PPTX
PPTX
Automation Hackathon 4
PDF
Presentazione dogsinthecity
PPTX
Proyecto final Topicos Avanzados En Telecomunicaciones
PDF
Using Social Media to Promote your Toastmasters Club
PDF
Chaos Based Direct Public Verifiable Signcryption Scheme
Searching and Analyzing Qualitative Data on Personal Computer
The Wind Powered Generator
Analysis of Rate Based Congestion Control Algorithms in Wireless Technologies
Survey: Problems Related to Human in Software Projects
An Application Jeevan – Kushalaiah Method to Find Lagrangian Multiplier in Ec...
Motivation for Green Computing, an Analytical Approach
Data Classification Algorithm Using k-Nearest Neighbour Method Applied to ECG...
Filtering Schemes for Injected False Data in Wsn
Context Based Web Indexing For Semantic Web
An Approach to Improve Brain Disorder Using Machine Learning Techniques
A Distinctive Scheme for Extraction of Symmetrical Components along with Harm...
An SPRT Procedure for an Ungrouped Data using MMLE Approach
F0963741
Knowledge Management in Software Enterprise
Automation Hackathon 4
Presentazione dogsinthecity
Proyecto final Topicos Avanzados En Telecomunicaciones
Using Social Media to Promote your Toastmasters Club
Chaos Based Direct Public Verifiable Signcryption Scheme
Ad

Similar to A Hybrid Technique for Shape Matching Based on chain code and DFS Tree (20)

PDF
Performance analysis of chain code descriptor for hand shape classification
PPTX
Image feature extraction
PDF
Four Side Distance: A New Fourier Shape Signature
PDF
Unit-7 Representation and Description.pdf
PDF
Two Dimensional Shape and Texture Quantification - Medical Image Processing
PDF
2D Features-based Detector and Descriptor Selection System for Hierarchical R...
PDF
2D FEATURES-BASED DETECTOR AND DESCRIPTOR SELECTION SYSTEM FOR HIERARCHICAL R...
PDF
2D FEATURES-BASED DETECTOR AND DESCRIPTOR SELECTION SYSTEM FOR HIERARCHICAL R...
PPTX
Image Representation & Descriptors
PDF
Hh2513151319
PDF
Hh2513151319
PDF
11. Define a simple deformable model to detect a half-circular shape.pdf
PPTX
representation.pptx
PDF
A hybrid approach for categorizing images based on complex networks and neur...
PDF
B017360516
PDF
Empirical Coding for Curvature Based Linear Representation in Image Retrieval...
PDF
Aj2418721874
PPTX
Multimedia searching
PDF
Image Information Retrieval From Incomplete Queries Using Color and Shape Fea...
PDF
PPT s07-machine vision-s2
Performance analysis of chain code descriptor for hand shape classification
Image feature extraction
Four Side Distance: A New Fourier Shape Signature
Unit-7 Representation and Description.pdf
Two Dimensional Shape and Texture Quantification - Medical Image Processing
2D Features-based Detector and Descriptor Selection System for Hierarchical R...
2D FEATURES-BASED DETECTOR AND DESCRIPTOR SELECTION SYSTEM FOR HIERARCHICAL R...
2D FEATURES-BASED DETECTOR AND DESCRIPTOR SELECTION SYSTEM FOR HIERARCHICAL R...
Image Representation & Descriptors
Hh2513151319
Hh2513151319
11. Define a simple deformable model to detect a half-circular shape.pdf
representation.pptx
A hybrid approach for categorizing images based on complex networks and neur...
B017360516
Empirical Coding for Curvature Based Linear Representation in Image Retrieval...
Aj2418721874
Multimedia searching
Image Information Retrieval From Incomplete Queries Using Color and Shape Fea...
PPT s07-machine vision-s2

More from IOSR Journals (20)

PDF
A011140104
PDF
M0111397100
PDF
L011138596
PDF
K011138084
PDF
J011137479
PDF
I011136673
PDF
G011134454
PDF
H011135565
PDF
F011134043
PDF
E011133639
PDF
D011132635
PDF
C011131925
PDF
B011130918
PDF
A011130108
PDF
I011125160
PDF
H011124050
PDF
G011123539
PDF
F011123134
PDF
E011122530
PDF
D011121524
A011140104
M0111397100
L011138596
K011138084
J011137479
I011136673
G011134454
H011135565
F011134043
E011133639
D011132635
C011131925
B011130918
A011130108
I011125160
H011124050
G011123539
F011123134
E011122530
D011121524

Recently uploaded (20)

PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
composite construction of structures.pdf
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
Well-logging-methods_new................
PDF
PPT on Performance Review to get promotions
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
Digital Logic Computer Design lecture notes
PPTX
web development for engineering and engineering
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
composite construction of structures.pdf
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Well-logging-methods_new................
PPT on Performance Review to get promotions
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Internet of Things (IOT) - A guide to understanding
Digital Logic Computer Design lecture notes
web development for engineering and engineering
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
OOP with Java - Java Introduction (Basics)
Lesson 3_Tessellation.pptx finite Mathematics
Lecture Notes Electrical Wiring System Components
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Arduino robotics embedded978-1-4302-3184-4.pdf
Model Code of Practice - Construction Work - 21102022 .pdf

A Hybrid Technique for Shape Matching Based on chain code and DFS Tree

  • 1. IOSR Journal of Computer Engineering (IOSR-JCE) e-ISSN: 2278-0661, p- ISSN: 2278-8727Volume 11, Issue 3 (May. - Jun. 2013), PP 51-56 www.iosrjournals.org www.iosrjournals.org 51 | Page A Hybrid Technique for Shape Matching Based on chain code and DFS Tree Kirti Jain1 , Dr.Sarita Singh Bhadauria2 , Dr.Gulab Singh3 1 (Computer Science &Engg Dept., LNCTS BHOPAL ,INDIA) 2 (Electronics Dept.,M.I.T.S. GWALIOR, INDIA) 3 ( Computer Science &Engg Dept ,LNCTS BHOPAL ,INDIA) Abstract: Lower features content of image are playing a very important role for content based image retrieval. The lower features content of image are color ,texture and shape. Shape finds outliers of object stored in database. The retrieval of image is used in many areas such as multimedia, medical science and internet technology. The semantic gap between query image and result of retrieval image. In this paper we propose a hybrid technique for shape matching based on chain code and DFS tree. Chain code is important and well method for boundary structured detection and DFS is graph searching technique. Here merge both method for detection of boundary pattern and matching of object. Used of DFS technique find the absolute detection of decide edge value of chain code. Keywords: Shape Matching, Features Descriptors, chain Code, DFS I. Introduction Now the growth of technology and demand of multimedia data and medical diagnosis need a very high accurate result of content based image retrieval[1]. Content based image retrieval basically work on lower feature content of image and video. The lower content of image is playing an important role of image retrieval. Now a day’s used for lower content of image is features descriptor such as MPEG-7 descriptor [4].MPEG-7 descriptor based on Fourier transform function for shape and boundary features detection. Many shape representation have been proposed for various purposes. These methods can generally be grouped into contour- based and region based. Contour-based methods, such as chain code, shape signature, polygonal approximation, autoregressive models, FD and CSS, exploit shape boundary information which is crucial to human perception in judging shape similarity[9]. Region based methods, such as geometric moments, Zernike moments, grid representation and area, exploit only shape interior information, therefore can be applied to more general shapes. The chain code shape detection have some disadvantage such as[5] (i) the chain of codes is too long (ii)Even slightly disturbed code would not reconstruct original image. Such problem faced retrieval for query image. These problem crate semantic gap between query image and retrieval image. For the reduction of chain code size used DFS searching technique. DFS reduced the size of code and produced better result in compassion of chain code. This paper is organized as follows: In Section 2, discuss features descriptors and chain code. Section 3 discusses DFS searching technique. In Section 4 discuss hybrid method of shape matching. In section 5 discuss experimental result. The final section makes the conclusion for this paper. II. Features Descriptors Features descriptor plays an important role in content based image retrieval and pattern Recognition[10]. Feature extraction can be defined as the act of mapping the image from image space to the feature space. Now days, finding good features that effectively represent an image is still a difficult task. In this literature, a wide variety of features are used for image retrieval from the database. Image content can differentiate between visual and semantic content. Features usually represent the visual content[9]. Visual content can be further divided into general or domain specific. Here discuss some shape based features descriptors .There are generally two types of shape representations, i.e. contour-based and region-based. Contour-based methods need extraction of boundary information which in some cases may not Available[3]. Region-based methods, however, do not necessarily rely on shape boundary information, but they do not reflect local features of a shape. Therefore, for generic purposes, both types of shape representations are necessary. Fourier descriptors are obtained by applying Fourier transform on shape boundary (usually represented by a shape signature), the Fourier transformed coefficients are called the Fourier descriptors of the shape. For good shape description, an appropriate shape signature is essential to obtaining Fourier descriptors.CSS (Curvature scale space)descriptors are essentially the descriptors of key local shape features. By dealing shape in scale space, not only the locations , but also the degree of convexities (or concavities) of shape boundaries are detected. Since curvature is a very important local measure of how fast a planar contour is turning, therefore, curvature scale space is exploited[7]. The CSS descriptors are obtained by first calculating the CSS contour
  • 2. A Hybrid Technique for Shape Matching Based on chain code and DFS Tree www.iosrjournals.org 52 | Page map, the map is a multi-scale organization of the inflection points (or curvature zero-crossing points). Teague has proposed the use of orthogonal moments to recover the image from moments based on the theory of orthogonal polynomials, and has introduced Zernike moments, which allow independent moment invariants to be constructed to an arbitrarily high order. In grid shape representation, a shape is projected onto a grid of fixed size, 16×16 grid cells[4]. The grid cells are assigned the value of 1 if they are covered by the shape (or covered beyond a threshold) and 0 if they are outside the shape. In this paper discuss chain code method as a shape descriptor. Chain code A simple method to represent a contour is Freeman code (chain code)[5], a coding method of closed shape by approximation of the continuous contour with a sequence of numbers, each number corresponding to a segment direction[5]. Freeman’s code is usually employed in a 4- neighborhood given in fig-1 (where 4 possible directions may be used) or in an 8-connectivity given in fig-2 (that gives an 8-directional chain code) [5]. This representation is compact and is invariant to the geometric transformation translation. However, it depends on rotation and scaling transformations. Moreover, it is difficult to manage Freeman’s code with complex shapes.Chain code is a common approach for representing different rasterized shapes as line-drawings, planner curves, or contours. Chain code describes an object by a sequence of unit-size line segments with a given orientation. Chain code can be viewed as a connected sequence of straight –line segments with specified lengths and directions. Chain coding is used to define objects boundaries for the purpose of measurement and identification. A chain code follows the boundary of an object and indicates the change in direction according to a 4- or 8- direction pattern as shown here: Fig-1[4-Connected] Fig-2 [8-Connected] III. DFS (Depth-First Search) As in previous section chain code method is used for boundary detection , but the problem with chain code is that it generate long chain code, if the shape is complex .However, it is also time consuming. In this paper Depth first search technique is used to reduce the size of long chain code. Depth-first search , as its name implies, to search ―deeper‖ in the graph whenever possible. In depth-first search, edges are explored out of the most recently discovered vertex u that still has unexplored edges leaving it[8]. When all of u’s edges have been explored, the search ―backtracks‖ to explore edges leaving the vertex from which u was discovered. This process continues until discovered all the vertices that are reachable from the original source vertex. If any undiscovered vertices remain, then one of them is selected as a new source and the search is repeated from that source. This entire process is repeated until all vertices are discovered. As in breadth-first search, whenever a vertex u is discovered during a scan of the adjacency list of an already discovered vertex u, depth-first search records this event by setting u’s predecessor field π[u] to u. Unlike breadth-first search, whose predecessor subgraph forms a tree, the predecessor sub graph produced by a depth-first search may be composed of several trees, because the search may be repeated from multiple sources. The predecessor sub graph of a depth-first search is therefore defined slightly differently from that of a breadth-first search we let G, = (V, E,), where E, = {(π[v]u,) : u E V and π[u] ≠ NIL} . The following pseudo code is the basic depth-first-search algorithm. The input graph G may be undirected or directed. The variable time is a global variable that we use for time stamping. DFS (G) 1 for each vertex u Є V [G] 2 do color[u] ← WHITE 3 π [u] ← NIL 4 time t ←0 5 for each vertex u Є V [G] 6 if color[u] ==white
  • 3. A Hybrid Technique for Shape Matching Based on chain code and DFS Tree www.iosrjournals.org 53 | Page 7 then DFS-VISIT (U) DFS-VISIT (U) color[u] ← GRAY d[u] ← time ←time+1 for each vertex u ϵ Adj[u] if color[v] == WHITE π[v]←u DFS -VISIT( v) color[u] ← BLACK f [u]←time ← time +1 IV. Hybrid Technique In this paper as discussed in section II and III that chain code is using for boundary detection and DFS technique is used to overcome the problem of chain code method. Because here discuss chain code method with DFS technique to make result efficient and fast, therefore this method is called hybrid approach. Here chain code decides the direction of pixel data and depth-first search tree create a small loop of structure of sub graph. The generated sub graph produced the compactness of shape matching. The direction of chain code is too long. Now apply DFS and break long code into small loop sub graph, that sub graph produced a small segment of pattern. That segment of pattern produced better compactness of pattern matching. The applied chain code finds the length of boundary value and strore in vector as bit point. The vector point mapped the bit pattern black and white. The Order of relation of shape property is 1 to2. For a boundary counter value is Bi ϵCN2 in image feature extraction process’s=1,2,3…..n the level of traversing of spanning tree. Now the relation of pattern P(x, y) and mapped feature is F. 𝑝(𝐵𝑖, 𝐹) = 𝑥−𝑥𝑓𝑖𝑛𝑎𝑙 +(𝑦−𝑦𝑓𝑖𝑛𝑎𝑙 ) 1/2 𝑇(𝑝)(𝑥𝑓𝑖𝑛𝑎𝑙 ,𝑦𝑓𝑖𝑛𝑎𝑙 )∈𝐵𝑖 ……………………… (1) Where (xfinal, yfinal) is the last point of chain length code. T(p) is total visited level of path. Here we present complete steps of our hybrid approach. Step1: Create a binary image from the original image, possibly using some Thresholding and edge connection techniques. Step2: Chose a random pixel of image and decide the source node of tree. Step 3: Save the image in matrix of 0’s for back ground and 1's for the object. While this process is in progress, we compute the area of the object by adding for each Iteration Step 4: The visited node source to end of pixel is level wise and create array to stored The visited link. Step5: Compute chain code by scanning the image to find the starting pixel of the Object. From that pixel, we traverse the boundary and decide directions and save them as an array or list. This step is repeated until we reach the end pixel If end pixel not equal start pixel then Shape is not closed If end pixel =start pixel then We have a closed shape Proceed to step 4 Closed Opened Step 6: If end of pixel found in level create a sub graph and generate small shape pattern. Step7: Calculate the area of shape by summing up visited node sub graph. Step8: Compute the compactness by the shape. Check these values to find out if shape is generated or not go to step 6. Step 9: Count the corner based on direction change and save the elements for each Corner visited node. Elements are the 4-chain segments where direction changed. Check the angle in each corner. Depending on the number of corners and start and ending pixels. To decide the shape we have to find if the angles are 90 Step 10: Generate and connected sub graph produced many compacted small pattern. Step 11: The transverse of DFS IS Stopped. These are compact steps of our hybrid technique. From this technique we produced multiple patterns in single image. Through this approach the accuracy of compactness of pattern are increases. V. Experimental Result To implement the above technique, we first find the shape features for images. The number of pixels in each edge is referred to as one feature. These features are then stored in a matrix in row by row fashion i.e. each row contains the shape features corresponding to one image. In this paper evaluated performance of our algorithm using a general-purpose image database containing 500 JPEG images with size of 256*256 or
  • 4. A Hybrid Technique for Shape Matching Based on chain code and DFS Tree www.iosrjournals.org 54 | Page 256*384 pixels from COREL photo gallery. These images are divided into 5 categories, and there are 100 images in each semantic category. We test the performance of; the retrieval performance is measured by precision and recall, which are defined as Precision= number of relevant images retrieved number of images retrieved ……………………………………. (1) Recall== number of relevant images retrieved number of relevant images in database ……………………………………….. (2) Here we show the our retrieval result in figure this result is retrieved by our hybrid technique And the performance of retrieval is better in comparison of chain code technique. This figure shows that the retrieval result of chain code technique.
  • 5. A Hybrid Technique for Shape Matching Based on chain code and DFS Tree www.iosrjournals.org 55 | Page Table 1 shows the empirical value of precision and recall This graph shows that performance evaluation of both technique of image retrieval, blue line shows the dfs technique for the retrieval of image. VI. Conclusion In this paper proposed a new technique for pattern detection using DFS technique combined with chain code method. These technique generate a sub graph of a small pattern and produced a better compactness and accuracy in compression of chain code method. Our experimental result shows the better performance in comparison of only used chain code method. Using hybrid approach the performance of precision and recall are increases in comparison of chain code method. References: [1] Eli Saber ,Yaowu Xub,, A. Murat Tekalp‖ Partial shape recognition by sub-matrix matching for partial matching guided image labeling‖ in Pattern Recognition 38 (2005) 1560 – 1573 [2] Dengsheng Zhang and Guojun Lu‖ A Comparative Study of Three Region Shape Descriptors‖ in Digital Image Computing Techniques and Applications, 21—22 January 2002 [3] Sanjoy K. Saha , Amit K. Das , Bhabatosh Chanda‖ Image retrieval based on indexing and relevance feedback‖ in Pattern Recognition Letters 28 (2007) 357–366 [4] Dengsheng Zhang, Guojun Lu‖ Evaluation of MPEG-7 shape descriptors against other shape descriptors ‖ in Multimedia Systems c Springer-Verlag 2003 [5] Lili Ayu Wulandhari, Habibolah Haron,‖ The Evolution and Trend of Chain Code Scheme‖ ICGST-GVIP, ISSN 1687-398X, Volume (8), Issue (III), October 2008. [6] Naif Alajlan_, Mohamed S. Kamel, George Freeman‖ Multi-object image retrieval based on shape and topology‖ in Signal Processing: Image Communication 21 (2006) [7] Dengsheng Zhang, Guojun Lu‖ Review of shape representation andd description techniques ‖ in Pattern Recognition 37 (2004) [8] Thomas H. Cormen Charles E. Leiserson Ronald L. Rivest‖ Introduction to Algorithms‖ in IEEE 2002 performance evaluation of chain code and dfs tecnique 75 80 85 90 95 100 Recall Precision Precision (%) Recall (%) Data set Precision (%) Recall (%) category 1 CHAIN CODE 87.24 84.43 HYBRIDE DFS 96.11 94.10 category 2 CHAIN CODE 84.32 83.23 HYBRIDE DFS 92.14 91.21 category 3 CHAIN CODE 86.14 85.11 HYBRIDE DFS 93.21 91.13 category 4 CHAIN CODE 88.21 87.66 HYBRIDE DFS 94.52 93.67
  • 6. A Hybrid Technique for Shape Matching Based on chain code and DFS Tree www.iosrjournals.org 56 | Page [9] E. J. Cand`es and D. L. Donoho, ―Curvelets – a surprisingly effective nonadaptive representation for objects with edges,‖ in Curve and SurfaceFitting, A. Cohen, C. Rabut, and L. L. Schumaker, Eds. Saint- Malo: Vanderbilt University Press, 2000. [10] M. N. Do and M. Vetterli, ―Contourlets,‖ in Beyond Wavelets, G. V.Welland, Ed. New York: Academic Press, 2003. [11] M. N. Do and M. Vetterli, ―The Contourlet Transform: ―An Efficient Directional Multiresolution Image Representation‖, IEEE Transactions on Image Processing, vol. 14, no. 12, December 2005, pp. 2091 – 2106. [12] D. D.-Y. Po and M. N. Do, ―Directional multiscale modeling of images using the contourlet transform‖, IEEE Transactions on Image Processing, vol. 15, no. 6, pp. 1610-1620, June 2006. [13] L. Zhang, P. Bao, ―Edge detection by scale multiplication in wavelet domain‖, Pattern Recognition Letters‖, 2002, 23, pp, 1771- 1784. [14] Canny, J., 1986. ―A computational approach to edge detection‖. IEEE Trans. PAMI PAMI-8, pp. 679–698.