Need to setup opencv environment first.
Global variable usage:
-
change the integer variable SIZE to size of data set. Size of data set needs to divide 2 if data type is line instead of point.
-
DISTANCE is nearest neighbor distance, only points smaller than this distance will be counted.
-
sigma is used when calculating c.
-
tolerance is for preventing dividing 0, if two points are too close to each other.
Things below need to be changed first:
Change path of iofstream
If it is line segments dataset, enable input x2, y2, z2.
Change the type of matrix K accordingly.