Login  Register

Re: Set of tangents to a selection

Posted by Gabriel Landini on Mar 31, 2008; 11:02am
URL: http://imagej.273.s1.nabble.com/Set-of-tangents-to-a-selection-tp3696741p3696742.html

On Monday 31 March 2008 11:40:39 Michael Doube wrote:
> I want to simulate calliper measurement of an ROI, which is the distance
> between two parallel tangents to the ROI.

What you want is called "rotating calipers algorithm".
One only needs to test this for the points in the convex hull.
The reference is this:

http://cgm.cs.mcgill.ca/~orm/rotcal.frame.html

This applet (that does not run in my browser) has some source code:

http://cgm.cs.mcgill.ca/~orm/RCS.frame.html

The minimum area enclosing rectangle of a polygon is calculated with this
algorithm too.

Cheers,

Gabriel