필터 지우기
필터 지우기

Transform Non Concentric circles into rectangle

조회 수: 3 (최근 30일)
Lanceric Tse
Lanceric Tse 2018년 8월 29일
댓글: Image Analyst 2018년 8월 30일
Hi, I have a non concentric circles that looks like this:
I have the center coordinates and radius of the circles (x1,y2,r1),(x2,y2,r2). What is the best way to transform it into a rectangle?

답변 (1개)

Image Analyst
Image Analyst 2018년 8월 30일
To get the x and y of the dashed rectangle you show, the obvious way is simply:
x1r = min(x1, x2);
x2r = max(x1, x2);
y1r = min(y1, y2);
y2r = max(y1, y2);
Of course the radii have nothing to do with that rectangle. They only matter if you want the bounding box of both circles, in which case you'd do this:
x1r = min(x1-r1, x2-r2);
x2r = max(x1+r1, x2+r2);
y1r = min(y1-r1, y2-r2);
y2r = max(y1+r1, y2+r2);
But that's so obvious I'm sure you've already thought about that, so that must not be what you mean. Please describe EXACTLY what "transform" means to you? Like a series of images where the circles gradually morph into rectangles or whatever.
  댓글 수: 2
Lanceric Tse
Lanceric Tse 2018년 8월 30일
I need to apply this transform on an iris image, where I transform the iris into a rectangle image like this
<<
>>
Image Analyst
Image Analyst 2018년 8월 30일
Please describe EXACTLY what "transform" means to you.
Your last comment didn't even come close.

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by