Hi all
Who i can find these four points?
Note: the extention of this image in matlab is logical
b.jpg

回答 (1 件)

Matt J
Matt J 2019 年 4 月 14 日
編集済み: Matt J 2019 年 4 月 14 日

0 投票

[I,J] = find(binaryimg<max(binaryimg(:))/2);
IJ = [I,J];
[~,idx] = min(IJ*[1 1; -1 1; 1 -1; -1 -1].');
Corners = IJ(idx,:);
For some elaboration on why this works, see this thread,

6 件のコメント

mohammed alany
mohammed alany 2019 年 4 月 15 日
But this code gave me the cornner of the image?? i would calcuylate the vertix
mohammed alany
mohammed alany 2019 年 4 月 15 日
Now, if i have this figure, how i can get the 7 branching points?
b.jpg
Matt J
Matt J 2019 年 4 月 15 日
編集済み: Matt J 2019 年 4 月 15 日
That is a different question. Basically, though, I would use bwpropfilt to remove the black rectangle in the middle. Then I would use houghlines to find all sides of the remaining polygon and their end points.
mohammed alany
mohammed alany 2019 年 4 月 15 日
can you please write me a code to find these point?
Matt J
Matt J 2019 年 4 月 15 日
That wouldn't leave any fun for you ;)
mohammed alany
mohammed alany 2019 年 4 月 15 日
ok, can you give more help about what you say above? "Then I would use houghlines to find all sides of the remaining polygon and their end points"
because i dono't have engough information in matlab,
Thank you

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

カテゴリ

ヘルプ センター および File Exchange で Computer Vision Toolbox についてさらに検索

質問済み:

2019 年 4 月 14 日

コメント済み:

2019 年 4 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by