how to find the midpoint in between end point and branch point

1 回表示 (過去 30 日間)
Raghu Rao
Raghu Rao 2017 年 3 月 24 日
コメント済み: Image Analyst 2019 年 12 月 12 日
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 件のコメント
Raghu Rao
Raghu Rao 2017 年 3 月 24 日
編集済み: Raghu Rao 2017 年 3 月 24 日
this is my output image, i already find out the end points and branch points but my problems is i want to add a node in between two end points and branch points
Raghu Rao
Raghu Rao 2017 年 3 月 24 日
i want to represent that word in this form.

サインインしてコメントする。

採用された回答

Image Analyst
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 件のコメント
Nehal Ahmad
Nehal Ahmad 2019 年 12 月 12 日
Could you please share the code part of this branching points?
Image Analyst
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 件)

カテゴリ

Help Center および File ExchangeImages についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by