链码是一种以较少的数据存储表示线条、曲线和区域边界的编码技术。为进一步提高链码的压缩效率,提出了一种新的压缩顶点链码:改进的正交3方向顶点链码(IO3DVCC)。IO3DVCC将顶点链码(VCC)的统计特征与正交3方向链码(3OT)的方向特征相结合,共设5个码值。码值1将VCC中的1、3组合和3、1组合归并表示,码值2与VCC的对应码值表达相同,码值3与3OT中的码值2表达相同,码值4和码值5分别对应2个连续的新链码码值1和8个连续的VCC码值2。新链码基于Huffman编码,为不定长编码。针对100幅图像的轮廓边界,统计并计算了IO3DVCC与改进的相对8方向Freeman链码(ERD8FCC)、基于算数编码的变长相对四方向Freeman链码(AVRF4)、基于算数编码的正交3方向链码(Arith_3OT)、压缩VCC(CVCC)和改进的CVCC(ICVCC)6种链码各码值出现的概率、平均码值表达能力、平均码长和链码效率。实验结果表明,IO3DVCC效率最高。针对随机选择的20幅轮廓边界图像,统计并计算了IO3DVCC、Arith_3OT和ICVCC3种链码表达的总码数、二进制总位数,以及相对于8方向Freeman链码的压缩比率。实验结果表明,IO3DVCC的压缩效果最好。
Chain code is one kind of coding technology, which can represent the line, curve and region boundary with small data storage. In order to improve the compression efficiency of chain code, a new compression vertex chain code named Improved Orthogonal 3-Direction Vertex Chain Code (IO3DVCC) was proposed. The statistical characteristic of the Vertex Chain Code (VCC) and the directional characteristic of the OrThogonal 3-direction chain code (3OT) were combined in the proposed new chain code, 5 code values were totally set. The combination of 1, 3 and the combination of 3, 1 in VCC were merged and expressed by code 1. The expression of the code 2 was the same with the corresponding code value of VCC. The expression of code 3 was the same as the code value 2 of 3OT. Code 4 and code 5 corresponded to the two continuous code value 1 of IO3DVCC and eight continuous code values 2 of VCC respectively. Based on Huffman coding, the new chain code was the indefinite length coding. The code value probability, average expression ability, average length and efficiency of IO3DVCC, Enhanced Relative 8-Direction Freeman Chain Code (ERD8FCC), Arithmetic encoding Variable-length Relative 4-direction Freeman chain code (AVRF4), Arithmetic coding applied to 3OT chain code (Arith_3OT), Compressed VCC (CVCC), and Improved CVCC (ICVCC) were calculated aiming at the contour boundary of 100 images. The experimental results show that the efficiency of I3ODVCC is the highest. The total code number, total binary bit number, and compression ratio relative to the 8-Direction Freeman Chain Code (8DFCC) of three kinds of chain codes including IO3DVCC, Arith_3OT, and ICVCC were calculated aiming at the contour boundary of 20 randomly selected images. The experimental results demonstrate that the compression effect of IO3DVCC is the best.