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 次查看(过去 30 天)
[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 个)

类别

Help CenterFile Exchange 中查找有关 Convert Image Type 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by