A new chain code applied to various types of boundary grids was proposed. This chain code relied on counting the independent edge number of each boundary grid, called Edge Chain Code (ECC). ECC for hexagonal grids was exactly the independent edge number sequence. ECC for rectangular grids could be obtained by recording the independent edge numbers of each boundary grid and distinguishing two different contour moving directions with "0". ECC for triangular grids used "0"~"3" and "4"~"7" to express four conditions with edge number of 1 or 2 separately. Moreover, among all these chain codes, meaningless combinations were used to express the special cases and reduce the coding redundancy. ECC was invariant to start point, rotation and mirroring, which could also detect straight line segments and count boundary perimeter. Finally, ECC was compared with four classical chain codes on encoding efficiencies and storage memories. Results show that ECC can be applied to express all kinds of grid boundaries, the total coding numbers of ECC for hexagonal grids and triangular grids are separately 50% and 78% of VCC, and the compression ratio of ECC for rectangular grids can reach 0.827 5.
Received: 01 December 2017
Published: 20 September 2018
WEI Xiao-feng, CHENG Cheng-qi, CHEN Bo, WANG Hai-yan. Chain code based on independent edge number. JOURNAL OF ZHEJIANG UNIVERSITY (ENGINEERING SCIENCE), 2018, 52(9): 1686-1693.
[1] JAIN J, SAHOO S K, PRASANNA S M, et al. Modified chain code histogram feature for handwritten character recognition[C]//Advances in Computer Science and Information Technology, Networks and Communications. Berlin Heidelberg:Springer, 2012:611-619.
[2] RACHMAWATI E, IPING S, MASAYU L K. Bag-of-shapes descriptor using shape association based on freeman chain code[J]. Journal of Theoretical and Applied Information Technology, 2017, 95(5):1142-1153.
[3] LEE D, KIM S J. Modified chain-code-based object recognition[J]. Electronics Letters, 2015, 51(24):1996-1997.
[4] KARCZMAREK P, KIERSZTYN A, PEDRYCZ W, et al. An application of chain code-based local descriptor and its extension to face recognition[J]. Pattern Recognition, 2017, 65:26-34.
[5] YUHANDRI, MADENDA S, PRASETYO E. Object feature extraction of songket image using chain code algorithm[J]. International Journal on Advanced Science, Engineering and Information Technology, 2017, 7(1):235-241.
[6] TAWFIQ A, ASADI A, JODA F A. Removing spatial redundancy from image by using variable vertex chain code[J]. European Academic Research, 2014, 2(1):179-192.
[7] REN M, KARIMI H A. A chain-code-based map matching algorithm for wheelchair navigation, Trans[J]. Transactions in GIS, 2009, 13(2):197-214.
[8] FREEMAN H. On the encoding of arbitrary geometric configurations[J]. IRE Transactions on Electronic Computers, 1961, 10(2):260-268.
[9] BRIBIESCA E. A new chain code[J]. Pattern Recognition, 1999, 32:235-251.
[10] SANCHEZ H C, DAGNINO R M. Compressing bi-level images by means of a 3-bit chain code[J]. SPIE Optical Eng, 2005, 44(9):1-8.
[11] SANCHEZ H C, BRIBIESCA E, DAGNINO R M. Efficiency of chain codes to represent binary objects[J]. Pattern Recognition, 2007, 40(6):1660-1674.
[12] BORUT Z, MONGUS D, LIU Y K, et al. Unsigned Manhattan chain code[J]. Journal of Visual Communication and Image Representation, 2016, 38:186-194.
[13] LIU Y K, ZALIK B. An efficient chain code with Huffman coding[J]. Pattern Recognition, 2005, 38(4):553-557.
[14] CRUZ H S. Proposing a new code by considering pieces of discrete straight lines in contour shapes[J]. Journal of Visual Communication and Image Representation, 2010, 21(4):311-324.
[15] ZALIK B, MONGUS D, ZALIK K R et al. Chain code compression using string transformation techniques[J]. Digital Signal Processing, 2016, 53(6):1-10.