How do I identify the branch points between topmost and bottom most endpoints on the shortest path? Please help.
5 views (last 30 days)
Show older comments
%Code for topmost and bottom most endpoints
endpoints = bwmorph(clnKonkal, 'endpoints');
[node_y, node_x] = find(endpoints==1); %getting the x and y coordinates of the endpoints in node_x and node_y respectively
[yTopRow, index] = min(node_y); % Get top row which is the smallest y value
xTopRow = node_x(index);
[yBottomRow, index] = max(node_y); % Get bottom row which is the largest y value
xBottomRow = node_x(index);
%finding the branchpoints
forkpts = bwmorph(clnKonkal, 'branchpoints');
%Now, how do I find those particular branch points between topmost and bottom most end points
0 Comments
Answers (1)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!