Chain code feature generation for image processing:
Chain codes are used for finding directionality in shape boundaries. They are one of the most useful shape descriptors.
By studying the segments with the same direction, length features for each direction can be extracted. Also by studying consecutive chain codes, direction changes, flat, convex or concave structures can be found.
This code implements an 8 connected chain code generator.
There is also a test script to demonstrate a typical use case.
References:
- S. Theodaridis, K. Koutroumbas "Pattern Recognition 4th Edition", (2009), Ch.7 Sec. 3.2 Chain codes
- H. Freeman "Computer processing of line drawing images",Comput. Surveys 6 (1) (1974) 57-97