How to calculate chain code and how to get the boundary as an np-by-2 array (it's required for the chain code)?
1 次查看(过去 30 天)
显示 更早的评论
I am trying to determine chain code for an image. I have tried Freeman chain code ( http://www.mathworks.com/matlabcentral/fileexchange/29518-freeman-chain-code) and also a code from Gonzalez book. I have two problems.
1. For the chain code, how do i get the boundary as np-by-2 array from my image?
2. In the code grom Gonzalez book, i see this error, "the input curve is broken... ... ..."
Any help would be appreciated. Thanx
0 个评论
回答(1 个)
Image Analyst
2013-4-3
Why not use bwboundaries() to get an ordered list of the boundary coordinates. If you really need the chain code, you could get it from the list of x,y boundary coordinates.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Display and Exploration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!