Boundary of an image

조회 수: 1 (최근 30일)
Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran 2012년 7월 27일
Hi, How to mark boundary of an image. My given input image is collection of trees and my work is to count the no. of trees. I found the boundary line for each and every tree.. Boundary drawn looks like star shaped.. But i need it in the form of circle..
one circle per tree.
how to do this.
Regards, Siva
  댓글 수: 1
Yash
Yash 2012년 7월 27일
regionprops will work

댓글을 달려면 로그인하십시오.

답변 (1개)

Ryan
Ryan 2012년 7월 27일
편집: Ryan 2012년 7월 27일
Utilize the matlab function regionprops(...,'MajorAxisLength'). This will return the diameter of a circle needed to enclose a region. You could also utilize regionprops(...,'BoundingBox') and use the maximum of the height/width as the diameter of the circle. You could then use the center of the 'BoundingBox' or 'centroid' to place the circles accurately for visualization puproses.

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by