MATLAB: Generate chain code

chain code

hi sir, is that matlab function that can be used to generate a 3 by 3 logical matrix using chain code..?for example the code is useful in shape representation.pls advice.cud u explain how to used the chain code in matlab

Best Answer

you mean freeman chain codes? use bwboundaries() to get the boundary coordinates and the assuming 8 directions (1,1)(1,0),(0,1),(1,-1)(-1,-1),(0,-1) etc.. for (∆x,∆y).. generate the code in string format..