roipoly

Hi,
I would like to know if it is possible to create a ROI on a current figure.
x=[1 2 3 4 5 6];
y=[7 8 9 10 11 12];
plot(x,y)
Now i would like to define a ROI, is it possible to use roipoly
I='Figure 1'
r=[-20 20]
c=[-20 20]
BW=roipoly(I,r,c)
cheers
nicolas

답변 (1개)

Image Analyst
Image Analyst 2012년 1월 12일

0 개 추천

No. I has to be an image, not a string. And r and c must have at least three points - that would be a triangle. As you have it, r and c define a line, not a polygon.

댓글 수: 9

Nicolas
Nicolas 2012년 1월 12일
sorry, i wrote something quick.
actually my polygon is 13 points.
I'm looking for creating a ROI, because I want to analyze that particular ROI using voronoi rather than the whole figure or image. And I haven't found so much information on the subject.
Image Analyst
Image Analyst 2012년 1월 12일
I don't know what that means. How can you analyze a region using a Voronoi diagram?
Nicolas
Nicolas 2012년 1월 12일
I don't know neither. My idea was to calculate the area of the polygon generated using voronoi within a defined area. It seems I missed something in the understanding of how voronoi works.
Walter Roberson
Walter Roberson 2012년 1월 12일
Voronoi diagrams... aren't they the ones that go to infinity at the edges?
Image Analyst
Image Analyst 2012년 1월 13일
Why don't you just post your image to tinypic.com and tell us what you want to measure it it, rather than think up some random algorithm and see how it might be applied to your image?
Nicolas
Nicolas 2012년 1월 13일
in exemple 2 of the help for "voronoi", the figure shows that not all the lines are infinite... i'm confused.
Image Analyst
Image Analyst 2012년 1월 13일
No, not all are infinite. But those that intersect the edges would go to infinity if they didn't get clipped by the edges of the diagram. Anyway, what do you think you want to do with the voronoi? Or better yet, what do want to do in your ROI?
Nicolas
Nicolas 2012년 1월 13일
in my ROI, I have a population of points that increase with time, for each new point i want to recalculate the Voronoi and study the evolution of the polygon areas for each point.
Walter Roberson
Walter Roberson 2012년 1월 13일
It sounds to me like you should be working in the dual space from voronoi, namely the delaunay triangulation.

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

카테고리

도움말 센터File Exchange에서 Voronoi Diagram에 대해 자세히 알아보기

태그

질문:

2012년 1월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by