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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!