How to detect the Hexagon in imageprocessing?
11 ビュー (過去 30 日間)
古いコメントを表示
I don't know how to find the hexagon shape in image. please anyone help
0 件のコメント
採用された回答
Image Analyst
2013 年 12 月 27 日
Get the boundary of the object with bwboundaries(). Then find out if there are 6 kinks in the boundaries with the FAQ. Then see if the lengths of the sides are similar enough to be considered a hexagon rather than just some arbitrary 6-sided polygon. Also make sure it's convex by checking that the solidity is really close to 1.
2 件のコメント
Image Analyst
2013 年 12 月 31 日
From the code the FAQ directs you to, it would be length(xStar). The distance is just the simple Pythagorean theorem, so use diff() and sqrt().
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!