计算机工程与应用 ›› 2009, Vol. 45 ›› Issue (12): 229-232.DOI: 10.3778/j.issn.1002-8331.2009.12.073

• 工程与应用 • 上一篇    下一篇

复杂矢量图中矩形域填充的快速定位方法

陈玉国1,李治隆2,刘秀平2,王丰敏2   

  1. 1.辽东学院 继续教育学院 计算机系,辽宁 丹东 118003
    2.大连理工大学 应用数学系,辽宁 大连 116023
  • 收稿日期:2008-07-21 修回日期:2008-10-20 出版日期:2009-04-21 发布日期:2009-04-21
  • 通讯作者: 陈玉国

Automatic placement of rectangle region in complex vector-graphs

CHEN Yu-guo1,LI Zhi-long2,LIU Xiu-ping2,WANG Feng-min2   

  1. 1.Department of Computer Science,Adult Education of Liaodong University,Dandong,Liaoning 118003,China
    2.Department of Mathematics,Dalian University of Technology,Dalian,Liaoning 116023,China
  • Received:2008-07-21 Revised:2008-10-20 Online:2009-04-21 Published:2009-04-21
  • Contact: CHEN Yu-guo

摘要: 工业生产中经常需要在已有的图纸上面添加文本信息。对于常用的矢量图纸,添加文本标注自动定位的工艺可以归结为近似封闭的矢量图形中矩形块填充的位置定位问题。针对矢量图形,首先基于多尺度进行光栅化处理,然后用Freeman链码进行象素标记,并结合光栅图形的最佳选择方向方法来解决此问题。实际应用表明,该方法快速、准确,可充分满足工业设计中实际问题的需要。

关键词: Freeman编码, 区域填充, 矢量图, 光栅化

Abstract: In CAM,it is usually needed to place some labels in the work-pieces described in the form of vector graphs for example DXF documents.The label-placement problem can be considered as a problem of placing a special rectangle in the approximately multiply connected domain.A method is proposed to solve the label-placement problem.The vector graph is rasterized in multiple-dimension,and the boundary pixels are marked by the Freeman chain-code.Then,combined with the computation of the main direction of the multiple connected domain,the labels are arranged in the work-pieces.The software system works well in application,which proves that the method proposed in this paper is fast and accurate.

Key words: Freeman chain-code, region filling, vector graph, rasterizer