• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2010, Vol. 32 ›› Issue (8): 64-66.doi: 10.3969/j.issn.1007130X.2010.

• 论文 • 上一篇    下一篇

一种光栅图像SVG矢量化表示的方法

胡卫军1,刘昕2,陆永亮1,何昆1   

  1. (1.华中科技大学计算机科学与技术学院,湖北 武汉 430074;2.华中电网有限公司,湖北 武汉 430074)
  • 收稿日期:2009-06-15 修回日期:2009-09-28 出版日期:2010-07-25 发布日期:2010-07-28
  • 作者简介:胡卫军(1973),男,湖北武汉人,博士,讲师,CCF会员(E200006252M),研究方向为图像处理和计算机图形学。
  • 基金资助:

    国家863计划资助项目(2006AA04Z211)

A New Approach to the SVG Vectorization Representation of Raster Images

HU Weijun1,LIU Xin2,LU Yongliang1,HE Kun1   

  1. (1.School of Computer Science and Technology,Huazhong University of Science and Technology,Wuhan 430074;2.Central China Grid Company Limited,Wuhan 430074,China)
  • Received:2009-06-15 Revised:2009-09-28 Online:2010-07-25 Published:2010-07-28

摘要:

本文借助于多边形图像区域表示,提出了一种将光栅图像转换为SVG表示的矢量图形方法。该方法借鉴种子生长法将光栅图像划分为若干等大小的正方形图像原子块,在原子块中寻找主块,并从主块开始利用块间的邻域关系和种子生长准则,将与主块颜色特征相近的块合并到主块所在的集合,再从这个集合中抽取能覆盖这个集合所有元素的多边形。然后对分割得到的多边形区域提取边界顶点,并对边界顶点进行优化。最后根据多边形区域的形状和颜色使用相应的SVG代码描述光栅图像。该方法采用矢量图形描述光栅图像,具有存储空间比较小、放大无锯齿、不易变形等特点。

关键词: 光栅图像, 多边形表示, SVG, 矢量化

Abstract:

Based on the image representation with polygons,a new approach to the SVG vectorization representation of raster images is proposed. First, the original raster image is segmented into a number of polygon areas based on color, and each polygon is combined by several equal size element blocks of the similar color. Then, the border vertex of the polygon is optimized. Finally, the SVG code is used to describe the raster image based on the shape and color of polygons. The approach that uses vector graphics to describe raster images proved to be good with a relatively small storage space, zooming without serrated edges, and little deformation.

Key words: raster image;polygon representation;scalable vector graphics;vectorization