Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

How to update the value of next pixel in chain code?

1 visualizzazione (ultimi 30 giorni)
Ekta Sharma
Ekta Sharma il 4 Mar 2016
Chiuso: MATLAB Answer Bot il 20 Ago 2021
I am getting first non zero pixel and its chain code but then i need to go to next pixel depending upon that direction.How I can proceed further? Thanks in advance.
  2 Commenti
Walter Roberson
Walter Roberson il 4 Mar 2016
There is code for Freeman chain in the File Exchange
Ekta Sharma
Ekta Sharma il 6 Mar 2016
Yes Sir...You are right.Code is available but I am unable to understand it.How to provide input to the function?

Risposte (1)

Walter Roberson
Walter Roberson il 6 Mar 2016
Use bwboundaries to extract boundaries. The first output of it will be a cell array, one entry for each region found. Pass the contents of each entry in the cell array to the chaincode routine at http://www.mathworks.com/matlabcentral/fileexchange/29518-freeman-chain-code
B = bwboundaries(YourImage);
numregions = length(B);
chains = cell(numregions,1);
for blobnum = 1 : numregions
chains{blobnum} = chaincode(B{blobnum});
end

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by