i am getting the cordinates of these all boundaries but i cannot understand how to store greeen boundaries in separate cell array with coresponding parent boundary number e.g( parant,cild 1 boundary) .my c0de is attached here
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
[B,L,N,A] = bwboundaries(BW);
% figure; imshow(BW); hold on;
% % Loop through object boundaries
% for k = 1:N
% % Boundary k is the parent of a hole if the k-th column
% % of the adjacency matrix A contains a non-zero element
% if (nnz(A(:,k)) > 0)
% boundary = B{k};
% plot(boundary(:,2),...
% boundary(:,1),'r','LineWidth',2);
% % Loop through the children of boundary k
% for l = find(A(:,k))'
% boundary = B{l};
% plot(boundary(:,2),...
% boundary(:,1),'g','LineWidth',2);
% end
% enclosed_boundaries = find(A(:,k));
% end
%end
%enclosing_boundary = find(A(m,:));
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Convert Image Type dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!