[lug] Off-topic: Contour line in image problem

D. Stimits stimits at idcomm.com
Thu Dec 6 13:55:04 MST 2001


Glenn Murray wrote:
> 
> Thanks all for the suggestions. so far.  There seems to be some
> confusion about what I am trying to calculate.  I am not trying to
> calculate the two-dimensional area visible in the image, but I am
> trying to calculate the area of the three-dimensonal surface seen in
> profile in the 2D image.  That's the easy part for me, once I can draw
> and find the length of the contour described below.
> 
> The hard part for me, and the one I'm asking for help on, is to draw a
> countour line through an image and find its length, that's all.
> 
> Ralf Mattes asked why jpeg---good question!  The images are
> compressed because they are being sent down from the space shuttle,
> and my user and program has to cycle through them quickly.
> 
> I looked at GRASS but am a little overwhelmed at the size of the
> thing---it would probably take a month to find out if it can be bent
> to do something it wasn't designed to do.
> 
> The Gimp may be the way to go, following Ralf's suggestion.  Has
> Michael J. Hammel (hint, hint) or anyone else seen anything like this?
> 
> Glenn Murray
> www.mines.edu/~gmurray/public_html/Welcome.html
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug

Sorry, I missed your original, was thinking you wanted the line length
of the outline.

If you make an assumption that the image is symmetric, this are
simplified. Finding the line integral of half of the profile, and then
rotating it about the vertical axis, you'd end up with the surface
integral. There is another way, but I find it hard to explain without
drawing. Rotation about an axis sweeps by angle, you can also sweep by
moving the outline towards the viewer or away, and scaling the X
component such that it's widest point matches the radius of a circle
centered on the flame. To sweep by rotation, you'd use half of an
outline, to sweep by translation and scale, you'd use the full outline
(only the width of the outline would be scaled). Although I don't happen
to know off hand the integral for particular splines (which includes
Bezier), they are generally easy, they are just the summation of basis
functions which are themselves reasonably simple. It is very very likely
that there are all kinds of graphics websites out there that show how to
find the surface area of a spline surface, or the line length of a
spline line.

D. Stimits, stimits at idcomm.com



More information about the LUG mailing list