Moved to Las-Vegas-Reconstruction-Toolkit (Surface Reconstruction from PointClouds). Link: https://github.com/uos/lvr2.
Improvements:
- Bugfixes
- Improved Cuda implementation
- OpenCl port
LVR2 builds the executables lvr2_cuda_normals
and lvr2_cl_normals
which use normal the estimation on GPU in minimal form.
- CUDA (Minimum 8.0) (https://developer.nvidia.com/cuda-toolkit)
- CMake (Minimum 2.8.8)
- Boost Library for the example main.cpp
This Toolkit includes a class for normal calculation on big pointclouds. It was researched during the "Parallel computing"-course of the University Osnabrück (Lecturer: Juan Carlos Saborio Morales). The software generates a left-balanced array-based kd-tree on a pointcloud. The k-nearest neighbor search and the normal calculation is computed highly parallel on the GPU with the CUDA-Toolkit.
![alt tag](https://github.com/aock/kNNcuda/blob/master/res/workflow_normals_cuda.png)Add your code to the example CMakeLists.txt:
##### ADD YOUR CODE HERE ##### add_executable(your_program path/to/your/code.cpp)
target_link_libraries(your_program normalsCuda )
Header:
include/calcNormalsCuda.h
- Pointcloud (as struct "PointArray" defined in calcNormalsCuda.h)constructs the kd-tree
- setK(int): set the k of the kNN search. Default: 50 - setFlippoint(float x, float y, float z): set the normal orientation point for flipping. Default: (100000.0, 100000.0, 100000.0). - setMethod(const char* method): set method for normal calculation. "RANSAC"/"PCA". Default: "PCA". - start() - getNormals(PointArray& normals): mallocs and fills the resulting normal array.Struct PointArray:
struct PointArray {
int width;
int dim;
float* elements;
};
Reading a File with the Stanford Triangle Format (.ply) to a PointArray
Executing the CUDA normal calculation
Writing PointArray of points and PointArray of normals to destination file