[vtkusers] Difference between two surfaces.

Andrew Maclean a.maclean at acfr.usyd.edu.au
Mon Jan 15 18:01:17 EST 2001


If you have the time, please post your vtksbHausdorffDistanceToTarget class.
I think that that is the type of class that I am looking for!
Thankyou for the comments, they are very useful and I will look at the
vtksbIterativeClosestPointTransform because that is the other aspect of this
problem that is worrying me in this project.

You have been most helpful.

Thanks again

Andrew

-----Original Message-----
From: Sebastien BARRE [mailto:seb-ml-vtk at barre.nom.fr]
Sent: Tuesday, 16 January 2001 06:21
To: a.maclean at acfr.usyd.edu.au
Cc: vtkusers at public.kitware.com
Subject: Re: [vtkusers] Difference between two surfaces.

At 15/01/2001 15:57, Andrew Maclean wrote:



If I have a surface A, and a surface B, is it possible to generate a
difference map showing how much surface B differs from A.

I envisage A to be a reference map of some terrain and B to the actual map
of the terrain (say scanned by radar or laser). So I want to calculate a
height map showing the difference of B from A. I cannot just subtract the
height in A from B because it is unlikely that the coordinates in A will
match those sampled in B.

Well, provided that both surfaces do not have the same topology, a naive
approach would be :

a) Use some algorithm to first match both surfaces position and orientation
(if needed)
b) then compute the Hausdorff distance between both.

With VTK :

a) I've posted a vtksbIterativeClosestPointTransform some weeks ago, check
the archive :) Use it to register/match both surfaces.

b) If I find some time, I'll post my vtksbHausdorffDistanceToTarget class,
but it's actually very easy to implement (do not forget to use a
vtkPointLocator otherwise it takes forever).

Hum, actually It might not be very satisfying because it computes distance
between points. So I guess you might also browse each point P of the surface
A, then find the intersection between the line L starting from that point P
toward the height direction, and the surface B. Do it also in the reverse
direction. It (vtkCellLocator) will return a coordinate on B that does not
have to be a point. Use that coordinate to compute the difference as a
measure of the distance between A and B.

Good luck :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20010116/c16a6a43/attachment.htm>


More information about the vtkusers mailing list