Vectorizing Image Outlines using Spline Computing Approaches with Simulated Annealing

Similar documents
Vectorization of Image Outlines Using Rational Spline and Genetic Algorithm

Two Approaches for Vectorizing Image Outlines

Curve Representation for Outlines of Planar Images using Multilevel Coordinate Search

Reverse Engineering of the Digital Curve Outlines using Genetic Algorithm

Parallelism for Nested Loops with Non-uniform and Flow Dependences

Smoothing Spline ANOVA for variable screening

S1 Note. Basis functions.

A Binarization Algorithm specialized on Document Images and Photos

2x x l. Module 3: Element Properties Lecture 4: Lagrange and Serendipity Elements

An Optimal Algorithm for Prufer Codes *

Hermite Splines in Lie Groups as Products of Geodesics

Learning the Kernel Parameters in Kernel Minimum Distance Classifier

A Fast Visual Tracking Algorithm Based on Circle Pixels Matching

Active Contours/Snakes

Support Vector Machines

Improvement of Spatial Resolution Using BlockMatching Based Motion Estimation and Frame. Integration

Outline. Type of Machine Learning. Examples of Application. Unsupervised Learning

A Newton-Type Method for Constrained Least-Squares Data-Fitting with Easy-to-Control Rational Curves

A Fast Content-Based Multimedia Retrieval Technique Using Compressed Data

2-Dimensional Image Representation. Using Beta-Spline

The Codesign Challenge

Meta-heuristics for Multidimensional Knapsack Problems

The Shortest Path of Touring Lines given in the Plane

A B-Snake Model Using Statistical and Geometric Information - Applications to Medical Images

Range images. Range image registration. Examples of sampling patterns. Range images and range surfaces

NUMERICAL SOLVING OPTIMAL CONTROL PROBLEMS BY THE METHOD OF VARIATIONS

Type-2 Fuzzy Non-uniform Rational B-spline Model with Type-2 Fuzzy Data

y and the total sum of

A mathematical programming approach to the analysis, design and scheduling of offshore oilfields

Skew Angle Estimation and Correction of Hand Written, Textual and Large areas of Non-Textual Document Images: A Novel Approach

Subspace clustering. Clustering. Fundamental to all clustering techniques is the choice of distance measure between data points;

Invariant Shape Object Recognition Using B-Spline, Cardinal Spline, and Genetic Algorithm

Unsupervised Learning

Determining the Optimal Bandwidth Based on Multi-criterion Fusion

An Iterative Solution Approach to Process Plant Layout using Mixed Integer Optimisation

Computer Animation and Visualisation. Lecture 4. Rigging / Skinning

Modeling, Manipulating, and Visualizing Continuous Volumetric Data: A Novel Spline-based Approach

Cluster Analysis of Electrical Behavior

The Research of Support Vector Machine in Agricultural Data Classification

Content Based Image Retrieval Using 2-D Discrete Wavelet with Texture Feature with Different Classifiers

GSLM Operations Research II Fall 13/14

High-Boost Mesh Filtering for 3-D Shape Enhancement

Feature Reduction and Selection

Lecture 5: Multilayer Perceptrons

Face Recognition University at Buffalo CSE666 Lecture Slides Resources:

Constrained Shape Modification of B-Spline curves

Problem Definitions and Evaluation Criteria for Computational Expensive Optimization

SLAM Summer School 2006 Practical 2: SLAM using Monocular Vision

CHAPTER 2 PROPOSED IMPROVED PARTICLE SWARM OPTIMIZATION

The Greedy Method. Outline and Reading. Change Money Problem. Greedy Algorithms. Applications of the Greedy Strategy. The Greedy Method Technique

Compiler Design. Spring Register Allocation. Sample Exercises and Solutions. Prof. Pedro C. Diniz

CSCI 104 Sorting Algorithms. Mark Redekopp David Kempe

CS 534: Computer Vision Model Fitting

Interpolation of the Irregular Curve Network of Ship Hull Form Using Subdivision Surfaces

12/2/2009. Announcements. Parametric / Non-parametric. Case-Based Reasoning. Nearest-Neighbor on Images. Nearest-Neighbor Classification

Fitting: Deformable contours April 26 th, 2018

A MOVING MESH APPROACH FOR SIMULATION BUDGET ALLOCATION ON CONTINUOUS DOMAINS

5 The Primal-Dual Method

Term Weighting Classification System Using the Chi-square Statistic for the Classification Subtask at NTCIR-6 Patent Retrieval Task

EVALUATION OF THE PERFORMANCES OF ARTIFICIAL BEE COLONY AND INVASIVE WEED OPTIMIZATION ALGORITHMS ON THE MODIFIED BENCHMARK FUNCTIONS

A fast algorithm for color image segmentation

Classifier Swarms for Human Detection in Infrared Imagery

NAG Fortran Library Chapter Introduction. G10 Smoothing in Statistics

MULTISPECTRAL IMAGES CLASSIFICATION BASED ON KLT AND ATR AUTOMATIC TARGET RECOGNITION

Sum of Linear and Fractional Multiobjective Programming Problem under Fuzzy Rules Constraints

Mathematics 256 a course in differential equations for engineering students

Refinement to the Chamfer matching for a center-on fit

A Geometric Approach for Multi-Degree Spline

Optimal Design of Nonlinear Fuzzy Model by Means of Independent Fuzzy Scatter Partition

Tsinghua University at TAC 2009: Summarizing Multi-documents by Information Distance

Classifier Selection Based on Data Complexity Measures *

Solving two-person zero-sum game by Matlab

User Authentication Based On Behavioral Mouse Dynamics Biometrics

An Accurate Evaluation of Integrals in Convex and Non convex Polygonal Domain by Twelve Node Quadrilateral Finite Element Method

A PATTERN RECOGNITION APPROACH TO IMAGE SEGMENTATION

TN348: Openlab Module - Colocalization

Fast Computation of Shortest Path for Visiting Segments in the Plane

Detection of an Object by using Principal Component Analysis

Quality Improvement Algorithm for Tetrahedral Mesh Based on Optimal Delaunay Triangulation

R s s f. m y s. SPH3UW Unit 7.3 Spherical Concave Mirrors Page 1 of 12. Notes

Shape Preserving Positive and Convex Data Visualization using Rational Bi-cubic Functions

Assignment # 2. Farrukh Jabeen Algorithms 510 Assignment #2 Due Date: June 15, 2009.

3D vector computer graphics

Local Quaternary Patterns and Feature Local Quaternary Patterns

A Robust Method for Estimating the Fundamental Matrix

The Comparison of Calibration Method of Binocular Stereo Vision System Ke Zhang a *, Zhao Gao b

Signature and Lexicon Pruning Techniques

A New Approach For the Ranking of Fuzzy Sets With Different Heights

Real-time Motion Capture System Using One Video Camera Based on Color and Edge Distribution

Maximum Variance Combined with Adaptive Genetic Algorithm for Infrared Image Segmentation

Optimizing Document Scoring for Query Retrieval

Edge Detection in Noisy Images Using the Support Vector Machines

Virtual Machine Migration based on Trust Measurement of Computer Node

Multi-objective Design Optimization of MCM Placement

Problem Set 3 Solutions

EECS 730 Introduction to Bioinformatics Sequence Alignment. Luke Huan Electrical Engineering and Computer Science

Related-Mode Attacks on CTR Encryption Mode

SHAPE OPTIMIZATION OF STRUCTURES BY MODIFIED HARMONY SEARCH

CS434a/541a: Pattern Recognition Prof. Olga Veksler. Lecture 15

Recommended Items Rating Prediction based on RBF Neural Network Optimized by PSO Algorithm

Transcription:

Vectorzng Image Outlnes usng Splne Computng Approaches wth Smulated Annealng MUHAMMAD SARFRAZ Department of Informaton Scence Kuwat Unversty Adalya Campus, P.O. Box 5969, Safat 1060 KUWAIT prof.m.sarfraz@gmal.com Abstract: - Ths paper s an overvew of three splne approaches of degree one, two and three. It represents the revew and comparatve study of Lnear, conc and cubc splnes for the vectorzaton of outlnes of the planar mages. It has varous phases ncludng extractng outlnes of mages, detectng corner ponts from the detected outlnes, and curve fttng. The dea of smulated annealng has been ncorporated to optmze the shape parameters n the descrpton of the conc and cubc splnes. In addton, a straghtforward approach has also been used for lnear splne case because of havng no degree of freedom. The methods ultmately produce optmal results for the approxmate vectorzaton of the dgtal contours obtaned from the generc shapes. Demonstratons and a comparatve study of lnear, conc and cubc splnes make the essental parts of the paper. Keywords: Imagng; optmzaton; smulated annealng; generc shapes; curve fttng 1 Introducton Capturng and vectorzng outlnes of mages s one of the mportant problems of computer graphcs, vson, and magng. Varous mathematcal and computatonal phases are nvolved n the whole process. Ths s usually done by computng a curve close to the data pont set [-5, -5]. Computatonally economcal and optmally good soluton s an ultmate objectve to acheve the vectorzed outlnes of mages for planar objects. The representaton of planar objects n terms of curves has many advantages. For example, scalng, shearng, translaton, rotaton and clppng operatons can be performed wthout any dffculty. Although a good amount of work has been done n the area [10-16, 5], t s stll desred to proceed further to explore more advanced and nteractve strateges. Most of the up-to-date research has tackled ths knd of problem by curve subdvson or curve segmentaton. Curve segmentaton s advantageous n a way that t gves a rough geometry of the shape. Approaches used to acheve ths task, n the lterature, are polygonal approxmatons [8, 1], crcular arc approxmatons [10, 15, 17, 18, ] and approxmatons usng cubcs or hgher order splne functons [, 14, 4-5]. A non-parametrc domnant pont detecton algorthm was proposed n [8], t used the domnant ponts for polygonzaton of dgtal curves. The problem wth polygonal approxmaton s that these approaches are rarely used for shape analyss. A combnaton of lne segments and crcular arcs for object approxmaton s used n [17, 18]. A scheme to construct a curvature contnuous conc splne s proposed n [15]. Ths approach presented the conc splne curve fttng and farng algorthm usng conc arc scalng. The smoothng s done by removng unwanted curvature extrema. Smlar algorthms for data fttng by arc splne curves are presented n []. A method for segmentaton of curves nto lne segments and crcular arcs by usng types of breakponts s proposed n [10]. Advantage of ths technque s that t s threshold free and transformaton nvarant. Fve categores of breakponts have been defned. The lne and conc segmentaton and mergng s based on these breakponts. Least square fttng s mostly adopted n approxmatons, whch uses splnes and hgher order polynomals. Some approaches are based on actve contour models known as snakes. These technques are also based on parameterzaton. Enhancement to the scheme by adjustng both number and postons of control ponts of the actve splne curve s shown n [14]. Ths scheme s based on curve approxmaton usng teratve optmzaton wth B-splne curve by squared dstance mnmzaton. ISBN: 978-1-61804-07-8 18

Another way, other than parametrc form, s to use mplct form of the polynomal. Curve reconstructon problem s solved by approxmatng the pont clouds usng mplct B-splne curve [1]. The authors have used trust regon algorthm n optmzaton theory as mnmzaton heurstcs. Technques descrbed for fttng mplctly defned algebrac splne curves and surfaces to scattered data by smultaneously approxmatng ponts and assocated normal vectors are proposed n [19, 0, 1]. Ths work s a presentaton of three approaches usng lnear, conc, and cubc nterpolatons [4-44]. The lnear nterpolant approach s straght forward. However, the conc and cubc approaches are nspred by an optmzaton algorthm based on smulated annealng (SA) by Krkpatrck et. al. [6]. It motvates the author to an optmzaton technque proposed for the outlne capture of planar mages. In ths paper, the data pont set represents any generc shape whose outlne s requred to be captured. We present an teratve process to acheve our objectve. The algorthm comprses of varous phases to acheve the target. Frst of all, t fnds the contour [5-0] of the gray scaled btmap mages. Secondly, t uses the dea of corner ponts [1-7] to detect corners. That s, t detects the corner ponts on the dgtal contour of the generc shape under consderaton. These phases are consdered as preprocessng steps. Lnear, conc, and cubc nterpolants are then used to vectorze the outlne. The dea of smulated annealng (SA) [6] s used to ft a conc and a cubc splne whch pass through the corner ponts. It globally optmzes the shape parameters n the descrpton of the conc and cubc splnes to provde a good approxmaton to the dgtal curves. In case of poor approxmaton, the nsertons of ntermedate ponts are made as long as the desred approxmaton or ft s acheved. In most of the cases, corner ponts are not enough to approxmate the dgtal object and hence some more ponts are also needed. These ponts are known as break ponts as they are used to break a segment for better approxmaton. For onwards dscusson, the set of corner ponts together wth the break ponts wll be called as the set of sgnfcant ponts. In the fourth phase of the proposed algorthm, for each teraton, we wll nsert a pont as knot n every pece (f needed) n a manner that the dstance, d, of the computed pont on the splne curve and ts correspondng contour pont s greater than a threshold ε. Ths process ncreases the set of sgnfcant ponts and hence needs multlevel coordnate search to be employed agan for the updated set of sgnfcant ponts to ft an optmal splne curve. Ths process contnues untl t rectfes the soluton and helps towards the objectve optmzaton n a global fashon. We stop the teratve process when all d s are less than ε. The proposed splne method, usng multlevel coordnate search, ultmately produces optmal results for vectorzng the dgtal contour of the generc shapes. It provdes an optmal ft as far as curve fttng s concerned. The organzaton of the paper s as follows, Secton dscusses about pre-processng steps whch nclude fndng the boundary of planar objects and detecton of corner ponts. Secton s about the nterpolant forms of lnear, conc, and cubc splne curves. Secton 4 brefly ntroduces about the Smulated Annealng heurstc. Overall methodology of curve fttng s explaned n Secton 5, t ncludes the dea of knot nserton as well as the algorthm desgn for the proposed vectorzaton schemes. Algorthms for the schemes are devsed n Secton 6. Demonstraton of the schemes as well as comparatve study s presented n Secton 7. Fnally, the paper s concluded n Secton 8. Preprocessng The proposed schemes start wth fndng the boundary of the generc shape and then usng the output to fnd the corner ponts. The mage of the generc shapes can be acqured ether by scannng or by some other mean. The am of boundary detecton s to produce an object s shape n graphcal or non-scalar representaton. Chan codes [7], n ths paper, have been used for ths purpose. Demonstraton of the method can be seen n Fgure 1(b) whch s the contour of the btmap mage shown n Fgure 1(a). (a) (b) (c) Fg. 1. Pre-processng Steps: (a) Orgnal Image, (b) Outlne of the mage, (c) Corner ponts acheved. Corners, n dgtal mages, gve mportant clues for the shape representaton and analyss. These are the ponts that partton the boundary nto varous segments. The strategy of gettng these ponts s based on the method proposed n [1]. The demonstraton of the algorthm s made on Fgure ISBN: 978-1-61804-07-8 19

1(b). The corner ponts of the mage are shown n Fgure 1(c). Curve Fttng and Splne The motve of fndng the corner ponts, n Secton, was to dvde the contours nto peces. Each pece contans the data ponts n between two subsequent corners nclusve. Ths means that f there are m corner ponts cp 1, cp,, cp m then there wll be m peces p 1, p,, p m. We treat each pece separately and ft the splne to t. In general, the th pece contans all the data ponts between cp and cp +1 nclusve. After breakng the contour of the mage nto dfferent peces, we ft the splne curve to each pece. To construct the parametrc splne nterpolant on the nterval t, t ], we have [ 0 n m F R, 0,1,..., n, as nterpolaton data, at knots t, 0,1,..., n..1 Lnear Splne The curve ftted by a lnear splne s a canddate of best ft, but t may not be a desred ft. Ths leads to the need of ntroducng some extra treatment n the methodology. Ths secton deals wth a form of lnear splne. It ntroduces parameters t s n the descrpton of lnear splne defned as follows: P t) P (1 ) P 1 (1) ( ( t t ) [ t t t, ( ) ), h 1 t t h 1, and P and P +1 are corner ponts of the th pece.. Conc Splne The curve ftted by a conc splne s a canddate of best ft, but t may not be a desred ft. Ths leads to the need of ntroducng some shape parameters n the descrpton of the conc splne. Ths secton deals wth a form of conc splne. It ntroduces shape parameters u s n the descrpton of conc splne defned as follows: P (1 ) uu (1 ) P 1 P ( t), () (1 ) u (1 ) U V W h D h D1, V P, W P 1 u u. D and D +1 are the correspondng tangents at corner ponts P and P +1 of the th pece. The tangent vectors are calculated as follows: ( P P0 ) D0 ( P1 P0 ) D a ( P P 1 ) (1 a )( P 1 P ), () ( P n Pn ) D ( n Pn Pn 1 ) P 1 P a P P P P. 1 1 Obvously, the parameters u 's, when equal to 1, provde the specal case of quadratc splne. Otherwse, these parameters can be used to lose or tghten the curve. Ths paper proposes an evolutonary technque, namely smulated annealng (SA), to optmze these parameters so that the curve ftted s optmal. For the detals of SA approach, the reader s referred to [9].. Generlzed Cubc Splne The cubc splne s defned as follows: P ( t) (1 ) F (1 ) V (1 ) W F 1 [ t, t1) ( t t ) ( t) h and h D V F, W F (4) 1 h D Equaton (4) can be rewrtten as: 1 P t, t ( t) R0, ( ) 1, ( ), ( ), ( ) 1 t F R t V R t R t F 1 (5) R 0, ( t) (1 t), R1, ( t) t(1 t), (6) R, ( t) t (1 t), R, ( t) t, ISBN: 978-1-61804-07-8 10

The functons R j,, j = 0,1,, are Bernsten Bézer lke bass functons, such that j0 R j, ( t) 1 (7) From the Bernsten-Bézer theory t follows that the curve segment P t, t 1 les n the convex hull of the control ponts {F, V, W, F +1 } and s varaton dmnshng wth respect to the control polygon jonng these ponts. To get the control ponts F, V, W, F 1, we make use of a Bernsten-Bézer representaton we can mpose the Hermte nterpolaton condtons: P( t ) F and P ( t ) D, 0,1,..., n (8) F and F +1 are corner ponts of th pece. D and D +1 are the correspondng tangents at corner ponts. To construct the parametrc C 1 cubc splne m nterpolant on the nterval [ t 0, t n ] we have F R, 0,1,..., n, as nterpolaton data, at knots t, m 0,1,...,n. The dervatves D R can be found out by the mposton of C 1 constrants on the pecewse cubc form. The C 1 constrants can be wrtten as: P ( t ) P( t ). The tangent vectors are calculated as n Eqn. (). The cubc curve ftted s a canddate of best ft, but t may not be a desred ft. Ths leads to the need of ntroducng some shape parameters n the descrpton of the cubc splne. Thus, one needs to deal wth a more generalzed form of cubc splne. Let us ntroduce two parameters v and w n the descrpton of cubc splne defned as follows: P ( t) (1 ) F (1 ) V (1 ) W F 1 V (9) F hv D, F 1 h w D1 W (10) Obvously, the parameters v 's and w 's, when equal to 1/, provde the specal case of cubc splne n Eqn. (5). Otherwse, these parameters can be used to lose or tght the curve. Ths paper proposes an evolutonary technque, namely smulated annealng (SA), to optmze these parameters so that the curve ftted s optmal. 4 Smulated Annealng (SA) Smulated annealng (SA) [6] s a global optmzaton method based on the Monte Carlo method. It works on the analogy of the energy n an n-body system the materal s cooled to lower temperatures gradually to result n a perfect crystal structure. The perfect crystal structure s attaned by havng mnmum energy n the materal. Ths analogy translates to the optmzaton done n smulated annealng n fndng a soluton that has the lowest objectve functon value. The soluton space s all the possble solutons. The current soluton s the present state of the materal. The algorthm teratvely tres to change the state of the materal and check whether t has mproved. The materal s state s changed slghtly to fnd a neghborng state.e. a close soluton value n the soluton space. It s possble that all neghborng states of current states are worse solutons. The algorthm allows gong to a worse state wth a certan probablty. Ths probablty decreases as the algorthm teratons proceed. Fnally, t only allows a change n state f t s strctly better than the current soluton. Detals of SA theory can be found n [5, 9]. A detaled descrpton of the mappng of the SA technque on the proposed problem s gven n the next secton. 5 Proposed Approach for Vectorzaton The proposed approach to the curve problem s descrbed here n detal. It ncludes the phases of problem matchng wth SA usng conc and cubc splnes, descrpton of parameters used for SA, curve fttng, and the overall desgns of algorthms. 5.1 Problem Mappng Ths secton descrbes about the SA formulaton of the current problem n detal. Our nterest s to optmze the values of cubc curve parameters v and w (parameters u n the case of conc curve) such that the defned curve fts as close to the orgnal contour segments as possble. We use SA for the optmzaton of these parameters for the ftted curves. Hence the dmensonalty of the soluton space s for cubc curves and 1 for conc curves. Each state n the SA soluton space represents a par of values for v and w for cubcs (and value of u for concs). ISBN: 978-1-61804-07-8 11

We start wth an ntal state that s a gven par of v and w values for cubcs (and value of u for concs). A startng temperature s also chosen arbtrarly. Ths temperature s an nherent nternal parameter of SA and has no sgnfcance or mappng on our problem. The algorthm mantans a record of the best state ever reached throughout the algorthm run. Ths s the par of v and w values for cubcs (and value of u for concs) that has gven the best curve fttng so far. Ths best soluton gets updated whenever the algorthm fnds a better soluton. The algorthm teratvely looks for neghborng states that may or may not be better than the current one. These neghborng states are v and w values for cubcs (and value of u for concs) that are slghtly dfferent from the current par of v and w values for cubcs (and value of u for concs). The coolng rate n SA s the factor affectng the lkelhood of selectng a neghborng par of v and w values for cubcs (and value of u for concs) that gves a curve fttng worse than the current par of v and w values for cubcs (and value of u for concs). Note that we apply SA ndependently for each segment of a contour that we have dentfed usng corner ponts. SA s appled sequentally on each of the segments, generatng an optmzed ftted curve for each segment. The algorthm s run untl the maxmum allowed tme s reached, or an optmal curve fttng s attaned. 5.1.1 Intalzaton Once we have the btmap mage of a generc shape, the boundary of the mage can be extracted usng the method descrbed n Secton. After the boundary ponts of the mage are found, the next step s to detect corner ponts as explaned n Secton. Ths corner detecton technque assgns a measure of corner strength to each of the ponts on the boundary of the mage. Ths step helps to dvde the boundary of the mage nto n segments. Each of these segments s then approxmated by nterpolatng splnes descrbed n Sectons. and.. The ntal soluton of splne parameters v and w for cubcs (and u for concs) are randomly selected wthn the range [-1, 1]. 5.1. Curve Fttng After an ntal approxmaton for the segment s obtaned, better approxmatons are obtaned through SA to reach the optmal soluton. We experment wth our system by approxmatng each segment of the boundary usng the conc splnes of Secton. and generalzed cubc splnes of Secton.. The conc splne method s a varaton of the quadratc splne. It provdes greater control on the shape of the curve and also effcent to compute. The tangents, n the descrpton of the splne, are computed usng the arthmetc mean method descrbed n Eqn. (). Each boundary segment s approxmated by the splne. The shape parameter u, n the conc splne, provdes greater flexblty over the shape of the curve. These parameters are adjusted usng SA to get the optmal ft. The generalzed cubc splne method, explaned n Sectonn., s a varaton of the well-known Hermte cubc splne. Ths modfed Hermte cubc splne provdes greater control on the shape of the curve and s also effcent to compute. The tangents, n the descrpton of the splne, are computed usng the arthmetc mean method descrbed n Eqn. (). Each boundary segment s approxmated by the splne. The shape parameters. v and w n the cubc splne provde greater flexblty over the shape of the curve. These parameters are adjusted usng SA to get the optmal ft. Snce, the objectve of the paper s to come up wth optmal technques whch can provde decent curve ft to the dgtal data. Therefore, the nterest would be to compute the curve n such a way that the sum square error of the computed curve wth the actual curve (dgtzed contour) s mnmzed. Mathematcally, the sum squared dstance s gven by: S m j1 P u ) P, t t, t, 0,1,..., n 1 (, j, j, j 1, (11) P,j = (x,j, y,j ), j = 1,,,m, (1) are the data ponts of the th segment on the dgtzed contour. The parameterzaton over t's s n accordance wth the chord length parameterzaton. Thus the curve ftted n ths way wll be a canddate of best ft. Once an ntal ft for a partcular segment s obtaned, the parameters of the ftted curve v's and w's for cubcs (u s for concs) are adjusted to get better ft. Here, we try to mnmze the sum squared error of Eqn. (11). Usng SA, we try to obtan the optmal values of the curve parameters. We choose ths technque because t s powerful, yet smple to mplement and as shown n Secton 6, performs well for our purpose. ISBN: 978-1-61804-07-8 1

5.1. Segmentaton usng Intermedate For some segments, the best ft obtaned through teratve mprovement may not be satsfactory. In that case, we subdvde the segment nto smaller segments at ponts the dstance between the boundary and parametrc curve exceeds some predefned threshold. Such ponts are termed as ntermedate ponts. 6 The Algorthms We can summarze all the phases from dgtzaton to optmzaton dscussed n the prevous sectons. The algorthms of the proposed schemes are contaned on varous steps. Algorthm 1 of Secton 6.1 explans the mechansm for the computaton of lnear curve. Curve manpulaton methodology wth concs and cubcs, usng SA, has been lad down n Algorthm of Secton 6.. 6.1 Algorthm 1 for Lnear Interpolant The summary of the algorthm, desgned for optmal curve desgn usng lnear nterpolant, s as follows: Step AG1.1: Input the mage. Step AG1.: Extract the contours from the mage n Step AG1.1. Step AG1.: Compute the corner ponts from the contour ponts n Step AG1. usng the method n Secton. Step AG1.4: Ft the lnear splne curve method of Secton.1 to the corner ponts acheved n Step AG1.. Step AG1.5: IF the curve, acheved n Step AG1.4, s optmal then GO To Step AG1.8, ELSE locate the approprate ntermedate ponts (ponts wth hghest devaton) n the undesred curve peces. Step AG1.6: Enhance and order the lst of corner and ntermedate ponts acheved n Step AG1. and AG1.5. Step AG1.7: GO TO Step AG1.4. Step AG1.8: STOP. 6. Algorthm for Conc (Cubc) Interpolant The summary of the algorthm, desgned for optmal curve desgn usng conc or cubc nterpolants, s as follows: Step AG.1: Input the mage. Step AG.: Extract the contours from the mage n Step AG.1. Step AG.: Compute the corner ponts from the contour ponts n Step AG. usng the method n Secton. for concs (Secton. for cubcs). Step AG.4: Compute the dervatve values at the corner / ntermedate ponts. Step AG.5: Compute the best optmal values of the shape parameters u s for concs (v s and w s for cubcs) usng SA. Step AG.6: Ft the splne curve method of Secton. for concs (of Secton. for Cubcs) to the corner / ntermedate ponts acheved n Step AG.. Step AG.7: IF the curve, acheved n Step AG.6, s optmal then GO To Step AG.10, ELSE locate the approprate ntermedate ponts (ponts wth hghest devaton) n the undesred curve peces. Step AG.8: Enhance and order the lst of the corner / ntermedate ponts acheved n Step AG. and AG.7. Step AG.9: GO TO Step AG.4. Step AG.10: STOP. 6. SA Parameters Used SA requres an ntal guess for the soluton. It s ths startng state parameter that affects the performance of the algorthm. If the startng soluton s very near the optmal soluton, t s more lkely to fnd the optmal soluton readly than f the startng soluton s dstant from the optmal soluton. Another mportant parameter for SA s the temperature. Ths parameter can be started arbtrarly at any value snce the algorthm decreases t gradually untl t reaches ts mnmum value. The rate at whch the temperature decreases durng the runnng of the algorthm s determned by another parameter: the coolng rate. Ths s a constant parameter ntalzed at the begnnng, and s used to update the temperature after a certan nterval of tme. The maxmum tme allowed for the algorthm s a statc parameter set n the begnnng. Snce SA does not termnate unless t exhausts ts allotted tme, care needs to be gven whle settng ths parameter. If t s too hgh, then even f the algorthm reaches an optmal soluton, t wll not return unless the maxmum tme allowed s reached. There s another nternal constant that determnes how long t takes before the temperature s updated. Ths duraton s also varable and s adjusted wth the updaton varable. Table 1 shows the SA parameter settngs that we have used for our curve fttng optmzaton problem. ISBN: 978-1-61804-07-8 1

Table 1. Parameter Settngs for SA. SA parameters Range of nput parameters v and w for cubc (and u for conc) Ftness Functon Optmzaton Target Dmenson of problem (number of nputs to SA) Weght gven to global search vs local search Maxmum number of teratons (epochs) Stoppng relatve error (f dstance from optma s less than ths, the algorthm termnates) Intal Set of Soluton Number of Steps n Local Search Values [-1,1] 0 (functon mnmzaton) for cubc (1 for conc) 0 00 1e-4 Corner-ponts and Md-ponts of soluton space The above mentoned schemes and the algorthms have been mplemented and tested for varous mages. Reasonably qute elegant results have been observed as can be seen n the followng Secton of demonstratons. 7 Demonstraton The proposed curve scheme has been mplemented successfully n ths secton. We evaluate the performance of the system by fttng parametrc curves to dfferent bnary mages. Fgure shows the mplementaton results of the two algorthms for the mage Plane n Fgure 1(a). Fgures (a) and (b) are the results for the lnear scheme, respectvely, wthout and wth nserton of ntermedate ponts. Smlarly, Fgures (c) and (d) are the results for the conc scheme, respectvely, wthout and wth nserton of ntermedate ponts. Cubc Curve Fttng wthout Intermedate and wth Intermedate are shown n Fgures (e) and (f) respectvely. Fgures shows the mplementaton results of an mage of an Arabc Language word Lllah ( ). Fgures (a) and (b) are respectvely ts outlne and outlne together wth the corner ponts detected. Fgures (c) and (d) are the results for the lnear scheme, respectvely, wthout and wth nserton of ntermedate ponts. Smlarly, Fgures (e) and (f) 50 are the results for the conc scheme, respectvely, wthout and wth nserton of ntermedate ponts. Cubc Curve Fttng wthout Intermedate and wth Intermedate are shown n Fgures (g) and (h) respectvely. (a) (c) (e) (b) (d) Fg.. Curve Fttngs on an extracted outlne of a plane (a) Lnear Curve Fttng Wthout Intermedate (b) Lnear Curve Fttng Wth Intermedate (c) Conc Curve Fttng Wthout Intermedate (d) Conc Curve Fttng Wth Intermedate (e) Cubc Curve Fttng Wthout Intermedate (f) Cubc Curve Fttng Wth Intermedate. (f) Table. Test mages, contours and corner pont detals of outlnes. Image Nam e Llla h Plan e # of Contou rs # of Contour # of Intal Corne r [15+161] 14 [1106+61+8 ] 1 ISBN: 978-1-61804-07-8 14

(a) (c) (e) (g) (b) (d) (f) (h) Table. Comparson of number of ntal corner ponts, ntermedate ponts and total tme taken (n seconds) for conc nterpolaton approaches. Image # of Intermedate n Lnear Interpolaton Total Tme Taken For Lnear Interpolaton Wthout Intermedate Wth Intermedate Lllah.bmp 9.87.74 Plane.bmp 4 7.75 8.9 Table 4. Comparson of number of ntal corner ponts, ntermedate ponts and total tme taken (n seconds) for conc nterpolaton approaches. Image # of Intermedate n Conc Interpolaton Total Tme Taken For Conc Interpolaton Wthout Intermedate Wth Intermedate Fg.. Curve Fttngs on an extracted outlne of arabc word Lllah font mage (a) Extracted Outlne (b) Intal Corner (c) Lnear Curve Fttng Wthout Intermedate (d) Lnear Curve Fttng Wth Intermedate (e) Conc Curve Fttng Wthout Intermedate (f) Conc Curve Fttng Wth Intermedate (g) Cubc Curve Fttng Wthout Intermedate (h) Cubc Curve Fttng Wth Intermedate One can see that the approxmaton s not satsfactory when t s acheved over the corner ponts only. Ths s specfcally due to those segments whch are bgger n sze and hghly curvy n nature. Thus, some more treatment s requred for such outlnes. Ths s the reason that the dea to nsert some ntermedate ponts s demonstrated n the algorthms. It provdes excellent results. The dea of how to nsert ntermedate ponts s not explaned here due to lmtaton of space. It wll be explaned n a subsequent paper. Lllah.bmp 14 19.485 48.48 Plane.bmp 1 0.95 49.56 Table 5. Comparson of number of ntal corner ponts, ntermedate ponts and total tme taken (n seconds) for cubc nterpolaton approaches. Image # of Intermedate n Cubc Interpolaton Total Tme Taken For Cubc Interpolaton Wthout Intermedate Wth Intermedate Lllah.bmp 5 08.479 749.511 Plane.bmp 1 179.786 86.0 Tables,, 4 and 5 summarze the expermental results for dfferent btmap mages. These results hghlght varous nformaton ncludng contour detals of mages, corner ponts, ntermedate ponts, total tme taken for lnear, conc nterpolaton approaches. Table demonstrates test mages, ther contour and corner pont detals of outlnes. Tables ISBN: 978-1-61804-07-8 15

, 4 and 5 exhbt comparsons of number of ntal corner ponts, ntermedate ponts and total tme taken (n seconds) for lnear, conc, and cubc nterpolaton approaches respectvely. One can have the followng observatons here: Some of the outlnes of mages need more ntermedate ponts than the others to have satsfactory ft. It happens when ntal (default) outlne ft s too loose and away from ts actual outlne. Or, t happens when ntal (default) outlne ft s much bgger n sze from ts actual outlne. Increase n ntermedate ponts s also proportonally related to the hgher accuracy of the approxmaton of outlne ft. Achevement of hgher accuracy of the approxmaton of outlne ft s also proportonally related to hgh amount of tme consumed for each of the lnear, conc, and cubc approaches. Table 6. Comparson of objectve functon values for lnear, conc and cubc nterpolaton approaches. Imag e Llla h.bm p Plan e.bm p Objectve Functon Values for: Conc Interpolato n Lnear Interpolato n Wthout Intermeda te Wth Intermeda 4 0.4 0.54 14 0.77 78 11 7.18 15 Wthout Intermeda 819.15 57 415.55 6 Wth Intermeda 165 4.45 14 15 0.61 4 Cubc Interpolato n Wthout Intermeda te Wth Intermeda 1808 7.74 40 911.484 1 18 4.47 51 10 5.16 47 Lllah. bmp Plane. bmp 10611 165864 70 506 79 15005 811 5108 Tables 6 and 7 summarze some further expermental results. These results explan comparson of objectve functon values (Table 6) and number of teratons (Table 7). It s convenent to see, n Table 6, that hgher objectve functon values take place when the schemes are mplemented wthout nsertng the ntermedate ponts. Ths also ndcates that the accuracy of approxmaton s not hgh wthout nsertng the ntermedate ponts. Hence, the hgher accuracy of the outlne capture s proportonally related to lower value of objectve functons n each of the lnear, conc, and cubc approaches. Table 7 reflects that the hgher number of functon calls take place when each of the approach s mplemented wth nsertng the ntermedate ponts. Ths also ndcates that when the accuracy of approxmaton s hgh, the number of functon calls s also hgh. Hence, the hgher accuracy of the outlne capture s proportonally related to hgher number of functon calls n each of the lnear, conc, and cubc approaches. One can observe from the Tables -7 that lnear splne ft s computatonally most economcal as compared to ts conc and cubc splne technques. Ths s manly due to the fact that SA methodology s part of the conc and cubc approxmatons, but not the lnear approxmaton. However, t s worth notng that conc and cubc approxmatons are comparatvely smoother than ther lnear nterpolaton counterpart. It s also mentonable that cubc approach, wth or wthout ntermedate ponts, provdes more accurate approxmaton as compared to ts conc counterpart. Table 7. Comparson of number of functon calls taken by SA for conc and cubc nterpolaton approaches wth and wthout ntermedate ponts. Image # of Functon Calls taken by SA for: Conc Conc Cubc Cubc Interpo Interpo Interpo Interpo laton laton laton laton Wthou Wth Wthou Wth t Interme t Interme Interme date Interme date date date 8 Concluson Two optmzaton technques are proposed for the outlne capture of planar mages. Frst technque uses smply a lnear nterpolant and a straght forward method based on dstrbuton of corner and ntermedate ponts. Second technque uses the smulated annealng to optmze a conc splne to the dgtal outlne of planar mages. By startng a search from certan good ponts (ntally detected corner ponts), an mproved convergence result s obtaned. The overall technque has varous phases ncludng extractng outlnes of mages, detectng corner ponts from the detected outlne, curve ISBN: 978-1-61804-07-8 16

fttng, and addton of extra knot ponts f needed. The dea of smulated annealng has been used to optmze the shape parameters n the descrpton of a conc splne ntroduced. The methods ultmately produce optmal results for the approxmate vectorzaton of the dgtal contours obtaned from the generc shapes. The schemes provde optmal fts wth effcent computaton cost as far as curve fttng s concerned. The proposed algorthms are fully automatc and requre no human nterventon. The two proposed approaches of lnear and conc splnes have been compared to the cubc splne whch also uses the dea of smulated annealng to optmze the shape parameters n the descrpton of a cubc splne. A detaled comparatve study and analyss have been developed for the three approaches. As a future study and contnuaton of the problem, the author s also thnkng to apply the proposed methodologes for surface models n D. Ths work s n progress to be publshed as a subsequent work. Acknowledgement The author s thankful for the helpful comments of Referees. Ths work was supported by Kuwat Unversty, Research Grant No. [WI 05/1]. References: [1] D. Chetrkov, S. Zsabo, A Smple and Effcent Algorthm for Detecton of Hgh Curvature n Planar Curves, The Proceedngs of the rd Workshop of the Australan Pattern Recognton Group, 1999, pp. 1751-184. [] M. Sarfraz, Representng Shapes by Fttng Data usng an Evolutonary Approach, Internatonal Journal of Computer-Aded Desgn & Applcatons, Vol. 1(1-4), 004, pp 179-186. [] A. Goshtasby, Groupng and Parameterzng Irregularly Spaced for Curve Fttng, ACM Transactons on Graphcs, 000, pp. 185-0. [4] M. Sarfraz, M. A. Khan, An Automatc Algorthm for Approxmatng Boundary of Btmap Characters, Future Generaton Computer Systems, 004, pp. 17-16. [5] M. Sarfraz, Some Algorthms for Curve Desgn and Automatc Outlne Capturng of Images, Internatonal Journal of Image and Graphcs, 004, pp. 01-4. [6] Z. J. Hou, G.W.We, A New Approach to Edge Detecton, Pattern Recognton, 00, pp. 1559-1570. [7] P. Reche, C. Urdales, A. Bandera, C. Trazegnes, F. Sandoval, Corner Detecton by Means of Contour Local Vectors, Electronc Letters, Vol. 8, No. 14, 00. [8] M. Marj, P. Sv, A New Algorthm for Domnant Detecton and Polygonzaton of Dgtal Curves, Pattern Recognton, 00, pp. 9-51. [9] M. Sarfraz, Desgnng Objects wth a Splne, Internatonal Journal of Computer Mathematcs, Taylor & Francs, Vol. 85, No. 7, 008. [10] Wu-Chh Hu, Multprmtve Segmentaton Based on Meanngful Breakponts for Fttng Dgtal Planar Curves wth Lne Segments and Conc Arcs, Image and Vson Computng, 005, pp. 78-789. [11] H. Kano, H. Nakata, C. F. Martn, Optmal Curve Fttng and Smoothng usng Normalzed Unform B-Splnes: A Tool for Studyng Complex Systems, Appled Mathematcs and Computaton, 005, pp. 96-18. [1] Z. Yang, J. Deng, F. Chen, Fttng Unorganzed Pont Clouds wth Actve Implct B-Splne Curves, Vsual Computer, 005, pp. 81-89. [1] G. Lavoue, F. Dupont, A. Baskurt, A New Subdvson Based Approach for Pecewse Smooth Approxmaton of D Polygonal Curves, Pattern Recognton, 005, pp. 119-1151. [14] H. Yang, W. Wang, J. Sun, Control Pont Adjustment for B-Splne Curve Approxmaton, Computer Aded Desgn, 004, pp. 69-65. [15] X. Yang, Curve Fttng and Farng usng Conc Spnes, Computer Aded Desgn, 004, pp. 461-47. [16] M. Sarfraz, Computer-Aded Reverse Engneerng usng Smulated Evoluton on NURBS, Internatonal Journal of Vrtual & Physcal Prototypng, Vol. 1, No. 4, 006, pp. 4-57. [17] J. H. Horng, An Adaptve Smootng Approach for Fttng Dgtal Planar Curves wth Lne Segments and Crcular Arcs, Pattern Recognton Letters, 00, pp. 565-577. [18] B. Sarkar, L. K. Sngh,, D. Sarkar, Approxmaton of Dgtal Curves wth Lne Segments and Crcular Arcs usng Genetc Algorthms, Pattern Recognton Letters, 00, pp. 585-595. [19] J. C. Carr, R. K. Beatson, J. B. Cherre, T. J. Mtchell, W. R. Frght, B. C. McCallum, T. R. ISBN: 978-1-61804-07-8 17

Evans, Reconstructon and Representaton of D Objects wth Radal Bass Functons, Proceedngs of SIGGRAPH 01, 6776, 001. [0] B. Juttler, A. Fels, A Least Square Fttng of Algebrac Splne Surfaces, Advance Computer Mathematcs, 00, pp. 15-15. [1] B. S. Morse, T. S. Yoo, D. T. Chen, P. Rhengans, K. R. Subramanan, Interpolatng Implct Surfaces from Scattered Surface Data usng Compactly Supported Radal Bass Functons, SMI 01 Proceedngs of the Internatonal Conference on Shape Modelng and Applcatons, 8998, IEEE Computer Socety, Washngton DC, 001. [] X. N. Yang, G. Z. Wang, Planar Pont Set Farng and Fttng by Arc Splnes, Computer Aded Desgn, 001, pp. 5-4. [] M. Sarfraz, M. Ryazuddn, M. H. Bag, Capturng Planar Shapes by Approxmatng ther Outlnes, Internatonal Journal of Computatonal and Appled Mathematcs, Vol. 189, No. 1-, 006, pp. 494 51. [4] M. Sarfraz, A. Rasheed, A Randomzed Knot Inserton Algorthm for Outlne Capture of Planar Images usng Cubc Splne, The Proceedngs of The th ACM Symposum on Appled Computng (ACM SAC-07), Seoul, Korea, 007, pp. 71 75, ACM Press. [5] M. Sarfraz, Outlne Capture of Images by Multlevel Coordnate Search on Cubc Splnes, Lecture Notes n Artfcal Intellgence: Advances n Artfcal Intellgence, A. Ncholson, X. L (Eds.): Vol. 5866, Sprnger-Verlag Berln Hedelberg, 009, pp. 66 645. [6] S. Krkpatrck, C. D. Gelatt Jr., M. P. Vecch, Optmzaton by Smulated Annealng, Scence, Vol. 0(4598), 198, pp. 671-680. [7] H. Freeman, L.S. Davs, A corner fndng algorthm for chan coded curves, IEEE Trans. Computers, Vol. 6, 1977, pp. 97-0. [8] M. Sonka, V. Hlavac, R. Boyle, Image processng, analyss, and machne vson. Brooks/Cole publcaton, 001, pp. 14-14. [9] N. Rchard, T. Glbert, Extracton of Domnant by estmaton of the contour fluctuatons, Pattern Recognton, Vol. (5), 00, pp. 1447-146. [0] W. Huyer, A. Neumaer, Global Optmzaton by Multlevel Coordnate Search, Journal of Global Optmzaton, Vol. 14, 1999, pp. 1-55. [1] Y. Kumar, S. K. Srvastava, A. K. Bajpa, N. Kumar, Development of CAD Algorthms for Bezer Curves/Surfaces Independent of Operatng System, WSEAS Transactons on Computers, Vol. 11, No. 6, 01, pp. 159-169. [] K. Thanushkod, K. Deeba, On Performance Analyss of Hybrd Intellgent Algorthms (Improved PSO wth SA and Improved PSO wth AIS) wth GA, PSO for Multprocessor Job Schedulng, WSEAS Transactons on Computers, Vol. 11, No. 5, 01, pp. 159-169. [] M. Sarfraz, N. Al-Dabbous, Curve Representaton for Outlnes of Planar Images usng Multlevel Coordnate Search, WSEAS Transactons on Computers, Vol. 1(), WSEAS, 01, pp. 6 7. [4] M. Sarfraz, M. Z. Hussan, M. Irshad, Reverse Engneerng of the Dgtal Curve Outlnes usng Genetc Algorthm, Internatonal Journal of Computers, Vol. 7(1), NAUN, 01, pp. 1 10. [5] M. Sarfraz, Generatng Outlnes of Generc Shapes by mnng Feature, Recent Advances n Computer Engneerng Seres, Vol. (16), Sego Lopes. (Eds.), 978-960-474-6-0, WSEAS, 01, pp. 18 190. [6] J. Kennedy, R. Eberhart, Partcle swarm optmzaton, Proc. IEEE Intl. Conf. Neural Networks, 4, Nov/Dec 1995, pp. 194 1948. [7] R. Eberhart and J. Kennedy, A new optmzer usng partcle swarm theory, Proc. the Sxth Intl. Symposum on Mcro Machne and Human Scence, MHS '95, 4-6 Oct 1995, pp. 9-4. [8] Y. Sh, R. Eberhart, A modfed partcle swarm optmzer, The 1998 IEEE Intl. Conf. on Evolutonary Computaton Proc., IEEE World Congress on Computatonal Intellgence, 4-9 May 1998, pp. 69 7. [9] Sarfraz, M., Swat, Z.N.K., (01), Mnng Corner on the Generc Shapes, Open Journal of Appled Scences, Vol. (1B), pp. 10 15. [40] Ner F. (008). "PIRR: a Methodology for Dstrbuted Network Management n Moble Networks". WSEAS Transactons on Informaton Scence and Applcatons, WSEAS Press (Wsconsn, USA), ssue, vol. 5, pp. 06-11. [41] Bojkovc, Z., Ner, F. (01) An ntroducton to the specal ssue on advances on nteractve multmeda systems WSEAS Transactons on Systems, 1 (7), pp. 7-8. [4] M. Sarfraz, Vectorzng Outlnes of Generc Shapes by Cubc Splne usng Smulated Annealng, Internatonal Journal of Computer Mathematcs, Taylor & Francs, Vol. 87(8), 010, pp. 176 1751. ISBN: 978-1-61804-07-8 18

[4] M. Sarfraz, Intellgent Approaches for Vectorzng Image Outlnes, Internatonal Journal of Software Engneerng and Applcatons, Vol. 5(1B), 01, pp. 78 8. ISBN: 978-1-61804-07-8 19