how to find the midpoint in between end point and branch point
조회 수: 1 (최근 30일)
이전 댓글 표시
i am working on hand written word images, i want to represent the word image in the form of graph. i want to find the mid points in between two key points and two branch points
댓글 수: 3
채택된 답변
Image Analyst
2017년 3월 24일
I'd think taking the average of the x and y values for each endpoint would do it:
xMiddle = (x1+x2)/2;
yMiddle = (y1+y2)/2;
or am I overlooking something?
댓글 수: 3
Image Analyst
2019년 12월 12일
Look at bwmorph()
epImage = bwmorph(skeletonImage, 'EndPoints');
bpImage = bwmorph(skeletonImage, 'BranchPoints');
[epRows, epColumns] = find(epImage); % Get location of end points.
hold on;
plot(epColumns, epRows, 'r.', 'MarkerSize', 30);
[bpRows, bpColumns] = find(bpImage); % Get location of branch points.
plot(bpColumns, bpRows, 'ro', 'MarkerSize', 40);
추가 답변 (0개)
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!