Borrar filtros
Borrar filtros

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 visualización (últimos 30 días)
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

Respuestas (1)

Image Analyst
Image Analyst el 3 de Abr. de 2013
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.

Categorías

Más información sobre Display and Exploration en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by