Contour Center

조회 수: 14 (최근 30일)
Sumeeth
Sumeeth 2012년 3월 12일
Given that [C,h]=contour(...) returns ellipsoidal contours, is it possible to find the center of these contours?

답변 (2개)

Dayong
Dayong 2013년 1월 8일
What center would you like to find? For an arbitrary shape, the mass center( actually, I don't know the English word of this center in physics) is available. A shape can be treated as an plain object with uniform density. So the position of mass center(point) is the average value of coordinates of all the points.

Image Analyst
Image Analyst 2013년 1월 8일
I don't why you say it finds ellipsoidal contours. Why do you think they have to be ellipses? You don't even need contour to find centroids. Just threshold and pass into regionprops to get centroids and weighted centroids (weighted by gray level):
measurements = regionprops(grayImage>threshold, 'Centroid', 'WeightedCentroid');
  댓글 수: 1
Image Analyst
Image Analyst 2013년 1월 8일
Oh, I just realized how old this post is. Not sure why everyone, including me, missed it 10 months ago.

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

카테고리

Help CenterFile Exchange에서 Contour Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by