Non Example-based Automatic Detection of

Material for Master’s Thesis Recital
Department of Multimedia Engineering, Graduate School of Information Science and Technology, Osaka University
2009/2/13
Non Example-based Automatic Detection of Stroke Correspondences in 2D Drawings
2 次元スケッチにおける例示によらない自動ストローク対応付け
Ngo Thi Tu Trung (Human Interface Engineering Lab.)
1
Introduction
Sketch is an easy and fast way to express one’s thought.
In recent years, extensive efforts related to sketch have been
developed such as sketch inbetweening and Chinese character recognition. These researches require a technique called
stroke correspondence detection. This is a process to find
correspondence between strokes which make up the drawings. However, most conventional methods are based on existed examples with properly defined structures or drawing
order and stroke’s connection relations (mutual adjoined
strokes). This limits users’ freedom and contradicts with
the intrinsic ambiguous and messy nature of sketch.
We propose a non example-based method to automatically detect stroke correspondences of two drawings without considering strokes’ input order and connection relations. The method is composed of two stages: drawings’
normalization and stroke correspondence detection.
2
Non Example-based Automatic Stroke
Correspondence Detection
2.1 Objective Drawings’ Normalization
Before applying the main correspondence detection algorithm, two input drawings such as the ones in Figure 1 are
normalized. First, we find stroke’s two principal axes using
statistical principal component analysis method. Stroke’s
center is the center of the rectangle surrounding each stroke
which is found based on two principal axes. Similarly,
drawing’s center is found based on composed strokes’ centers. Next, drawing’s center is translated to coordinate
system’s origin and all contained strokes’ centers are translated together with it. Then scaling is conducted to fit the
drawing and all strokes’ centers to the unit square.
2.2 Finding Stroke Correspondences
In this stage, we first calculate three kinds of similarity
based on 2D coordinates of centers of strokes and drawing:
Euclidean distance, angle and mix feature similarity which
is the sum of two former similarities. We then apply stable marriage algorithm for each of the similarity and find
matching results for each of them. Stable marriage algorithm is a method to find a stable matching - a matching
in which both elements of one pair cannot find other element which prefers them over their present match. These
results are compared and same point pairs are extracted.
The loop of similarity calculation, stable marriage algorithm and comparision is repeated until there is no point
left.
3
Evaluation
An experiment is performed to evaluate efficiency of our
stroke correspondence detection method.
3.1 Experiment
We used a databse of 60 drawings with different stroke
number. We showed each of 20 drawings randomly to a
participant. We have 6 participants use mouse to draw
drawings with same stroke number and same structure with
the ones they are shown. Figure 1(a) shows an example
in database and (b) shows a subject-drawn one. After
drawing, corresponded strokes are displayed in same colors. Each participant is asked to count strokes which are
corresponded differently from their intuition. Participants
are students with average age of 25 and more than 5 years
of computer experience. Most of them have little experience with doodles.
(a) Database’s drawing
(b) User’s drawing
Figure 1: Experiment’s example
3.2 Results and Discussion
Data collected from participants is calculated to find
average correct correspondence rate for each stroke number. We plotted a graph to show the relation of stroke
number and correct correspondence rate (Figure 2). From
the result, drawings with stroke number from 3 to 6 have
higher correct correspondence rate. When stroke number
increases, correct correspondence rate decreases but still
oscillates between 0.7 and 0.94. Our algorithm’s accuracy
falls when the drawing has many strokes which distribute
densely like the legs in Figure 3. Because our algorithm
bases largely on a position of strokes’ center in the drawing, the more stroke number is, distances between strokes’
centers have almost same values and this causes inaccuracy.
In 14 and 22 cases, the rate suddenly decreases. Based on
users’ comments, we consider small sample number (comparing to other cases) and messy drawings are the reasons.
Figure 2: Relation of stroke
number and correct correspondence rate
4
Figure 3: Case
with low correspondence rate
Conclusion
We propose a method to automatically detect stroke correspondence in 2D drawings in relatively real time. The
method allows users to draw relatively freely with accuracy rate ranges from 0.7∼1. In the future, we plan to
employ stroke’s size, stroke’s merging and splitting.