I don't know how to find the hexagon shape in image. please anyone help

 채택된 답변

Image Analyst
Image Analyst 2013년 12월 27일

0 개 추천

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

How to find out the number of kinks? I searched in FAQ, but i didn't find anything regarding. So please tell me about how to find the number of kinks and how to measure the length of side
Image Analyst
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개)

카테고리

도움말 센터File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

질문:

2013년 12월 27일

댓글:

2013년 12월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by