![](bg5.png)
5.4 2D Hair Strand Connection and
Spline Representation
For each manual stroke image block in Figure 6,
there are several edge points (start points and end
points on the spline). We calculate the Euclidean
distance between the each edge point of current
block and edge points of adjacent 8-neigbor blocks.
We choose the pair of points that has the minimum
distance. In addition, we compare this minimum
distance with a predefined threshold. Base on the
size of the manual stroke template images and the
distribution features of the manual strokes, we set
the threshold to be 5 in our system. If the minimum
distance is smaller than the threshold, we define
those two points should be connected and those two
manual strokes belong to one hair strand. Otherwise,
those two manual strokes do not belong to the same
hair strand. Furthermore, we apply the line tracking
algorithm to obtain relative long hair. The procedure
of the hair strands tracking algorithm is:
Start from point x as the current pixel;
Consider its eight neighbours (in a 3x3
window);
Check which of its neighbour pixel is of value
zero (black). Define this pixel as “N1”;
Change the current pixel to be “N1”;
Repeat the same procedure for “N1” and the
following pixel until reach the border of the
hair or there is no further connection
available.
By applying the hair strands tracking algorithm,
we can obtain the length information of each hair
strands as well as all the coordinates of the hair
strands’ points. Knowing the length of each hair
strand can help us to remove relative short hair
strands. In addition, we can use the coordinates of
the hair strands’ points to generate more smooth hair
stands based on spline presentation. The 2D hair
strands connection result and refined results are
shown in Figure 8. The image in the first row is the
2D hair strands connection results based on spline
representation. The second image shows the details
of our 2D hair strands connection results. The last
image shows the refinement of the connection result
based on our hair strands tracking algorithm and
spline representation. The yellow 2D hair strands are
smoother than the previous ones.
Figure 8: 2D hair strands connection and refined result.
6 CONCLUSION AND FUTURE
WORK
We present a 2D hair strands generation method
based on template matching. The introduced method
does not need a complex system configuration or
any user assistant. We focus on the orientation
information of hairstyle. Instead of using the
orientation information of every pixel directly, we
use the orientation histogram of local area to
represent the geometry of the hair strands. We
simplify the hair strands extraction procedure by
apply template matching based on the orientation
histograms. We also apply spline presentation to
obtain smooth the hair strands. The experimental
results show that our method is feasible.
In the future, we need to improve our template
matching algorithm in order to obtain more accurate
hair strands geometry. We also need to improve our
hair strands connection and spline representation
methods to generate more smooth 2D hair strands.
Based on the refined 2D hair strands, we can
combine the depth information from the Kinect in
our system to obtain 3D model of real hairstyle.
REFERENCES
Magnenat-Thalmann, N., Hadap, S., 2000. State of the art
in hair simulation. Proceedings of International
Workshop Human Modelling and Animation. 3-9.
Ward, K., Bertails, F., Kim, T., Y., Marschner, S., R.,
2007. A survey on hair modelling: styling, simulation,
and rendering. IEEE Trans. on Visualization and
Computer Graphics. 13:2, 213-234.
Paris, S., Chang, W., Kozhushnyan, O., I., Jarosz, W.,
2008. Hair photobooth: geometric and photometric
2DHairStrandsGenerationBasedonTemplateMatching
265