[lug] Off-topic: Contour line in image problem
rm at fabula.de
rm at fabula.de
Thu Dec 6 10:27:14 MST 2001
On Thu, Dec 06, 2001 at 09:33:47AM -0700, Glenn Murray wrote:
> This is off-topic, but I know there are a lot of people in the
> graphics and scientific communities who follow this list and may find
> this problem interesting.
>
> I have a scientific computing problem and I suspect there is software
> out there that does what I am trying to do. More or less I have to
> draw a contour line in an image and find its length.
>
> More specifically, I have black and white jpeg images of a flame, in
> profile, in a tube. I need to know the area of the flame front. To
> find this I (am thinking I) need to draw a line along some (constant)
> intensity around the edge of the flame; a line dividing light from
> dark, as it were, from the top of the image to the bottom. Then I
> need to know the line's length (from that I could calculate an
> estimate of the area).
>
> Ideally the computer would draw this line or I could with a mouse, and
> I could mark start and end points. The line may not reach to the tube
> edge, so I may need to extrapolate it.
>
> Do you know of any software to do this sort of thing? I may end up
> writing it myself. Any help would be greatly appreciated.
Gimp would be a good starting point iff you need/want to try it
yourself. There are allrerady filters/plugins that can find contours
in an image as well as conversion of a selection to a path (if you get
this far you can just export the path - this will yield a text file
with a list of points 'TYPE: 2 X: 437 Y: 243'. This and a good reference
on bezier splines should be enough to calculate the length).
Since gimp is fully scriptable in Scheme you can write a little batch
script to do all the work.
BTW: is there any reason the files are in jpg-format. Since jpg uses
lossy compression and creates artefacts that actually _enhance_ and
distort changes in contrast it seems a strage format for your task.
I'm in a hurry right now, send me an email if you need more help/input ...
Ralf Mattes
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
More information about the LUG
mailing list