|
Developer Documentation |
|
Centre for Vision, Speech & Signal Processing |
Comments:
-------------------------------------------------------
Name : NNC.hh
Library : vecsetC
Description: Nearest Neighbour Vector Set Pair
Dependancies: Vector3dC, VectorSetC
Modified :
Created : 13.2.95
Author : Adrian Hilton
-------------------------------------------------------
========================================================
INLINE
================== VECTOR SET PAIR =============================
Nearest Neighbours correspondence between a pair of sets of vectors
Nearest Neighbour for each vector in source to vectors in target
Parent Classes:
Variables:
- VectorSetC set;
-
- VectorSetC otherset;
-
- SArray1dC corres1toM;
-
store correspondence between sets
- SArray1dC corres1to1;
-
- IntT n_1toM;
-
store nvector used for corresp.
- IntT n_1to1;
-
- IntT update_1toM;
-
update flags
- IntT update_1to1;
-
GRID
- IntT grid_nslot[];
-
grid nn num of slots
- Vector3dC grid_lim[];
-
data limits
- Vector3dC grid_size;
-
HASH
- Vector3dC hash_size;
-
dimensions of voxels in hash table
- IntT type;
-
computation: direct(0) grid(1) hash(2)
Methods:
- NNC(VectorSetC & source,VectorSetC & target)
-
- ~NNC()
-
destruct
Setup Internal Data Structure - Default = Direct Search
--------------------------------------------------------
- void SetupGrid(IntT nx,IntT ny,IntT nz)
-
Grid of voxels nx,ny,nz are no of grid slots in x,y,z
- void SetupGrid(RealT dx,RealT dy,RealT dz)
-
Grid of voxels of width in x,y,z directions
- void SetupHash(const RealT & size)
-
Hash table with uniform spatial subdivision using voxels of size vsize
- void SetupHash(const Vector3dC & vsize)
-
Hash table with spatial subdivision with voxels of size vsize(X,Y,Z)
Operations
------------
- IntT Corres1toM(IntT n)
-
Nearest correspondence for each point in source to nearest in target
- IntT Corres1to1(IntT n)
-
Nearest correspondence for nearest point in source to nearest in target
- Vector3dC Dist1toM(IntT n)
-
Euclidean Distance for each point in source to nearest in target
- Vector3dC Dist1to1(IntT n)
-
Euclidean Distance for nearest point in source to nearest in target
Access
-------
- IntT Num1toM()
-
Number of points in correspondence
for each point in source to nearest in target
- IntT Num1to1()
-
Number of points in correspondence
for nearest point in source to nearest in target
- VectorSetC & Set()
-
return source vector set
- VectorSetC & OtherSet()
-
return target vector set
Output
-------
- void Print1toM()
-
Print 1toMany correspondence
- void Print1to1()
-
Print 1to1 correspondence
- void Print()
-
Print 1toMany and 1to1 correspondence
- void NN1toM()
-
Nearest Neighbours set:otherset
- void NN1to1()
-
|
Programmer:Adrian Hilton, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001
|