[vtkusers] Curve growing

Dominik Szczerba domi at vision.ee.ethz.ch
Thu Feb 1 18:55:25 EST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Have a go at active contours, distance/curvature energy minimization
etc. Sethian/Osher, level sets and derivatives. (if I am not mistaken
ITK has most of these wonders)
- --ds

Anja Ende wrote:
> Hi everyone,
> 
> This is not a VTK question per se, but I am hoping some algorithm
> experts can help me here.
> 
> I am a curve defined by a set of floating point numbers. So each x, y
> pair descrives a curve and the curve is created by simple joining these
> point pairs.
> 
> Now, my probem is that the curve should snap to each pixel that it touches.
> 
> So, if we consider the x part of the coordinates... then the points
> lying on the "left side" of the curve should round off to the lower
> value...
> 
> So, if you have x value like 63.5 on the lft side, it should becomne 63.0.
> 
> and if you have points on the "right side" of the curve, it should round
> off to the upper value...
> 
> So, if you have value like 130.5 on the right side, it should become 131.0
> 
> Similar logic should follow for the y values.
> 
> My initial idea was to increment/decrement the values by 1.0 and see if
> that pixel lies in my region. If the pixel to the right lies in thr
> region, then I take the floow of the value, else I take the ceiling.
> 
> This worked for most of ther curves but every now and then I come across
> curves that act not int he way I want.
> 
> I was wondering if there is an algorithm for growing a curve so that it
> snaps to the touched pixel...
> 
> Thanks for any help you might give me here. I would really appreciate it.
> 
> 
> Cheers,
> 
> Anja
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFwn3t/EBMh9bUuzIRAkdjAJ45VNnbza8PRJy+9CgRohpVLssSagCfTaz3
s0fsxEI3IIlIEOdJ4VTxY0c=
=G/ES
-----END PGP SIGNATURE-----



More information about the vtkusers mailing list