Skip to content
Snippets Groups Projects

Add full 3D MLS and carving

Merged Nicolas Pope requested to merge exp/rendcheck into master
2 files
+ 45
15
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -7,24 +7,52 @@
@@ -7,24 +7,52 @@
namespace ftl {
namespace ftl {
namespace cuda {
namespace cuda {
 
/**
 
* Basic Moving Least Squares smoothing on a single depth map. Outputs boths
 
* normals and depth values. This is a single iteration of an algorithm that
 
* should iterate 2-3 times. Normals can use some basic estimation as initial
 
* input since they are smoothed by MLS.
 
*
 
* @param normals_in 4 channel 16-bit float (half).
 
* @param normals_out 4 channel 16-bit float (half).
 
* @param depth_in 1 channel 32-bit float
 
* @param depth_out 1 channel 32-bit float
 
* @param smoothing Gaussian radius in depth units
 
* @param radius Window radius for smoothing
 
* @param camera Camera intrinsics
 
* @param stream Optional CUDA stream
 
*/
void mls_smooth(
void mls_smooth(
const cv::cuda::GpuMat &normals_in,
const cv::cuda::GpuMat &normals_in,
cv::cuda::GpuMat &normals_out,
cv::cuda::GpuMat &normals_out,
const cv::cuda::GpuMat &depth_in,
const cv::cuda::GpuMat &depth_in,
cv::cuda::GpuMat &depth_out,
cv::cuda::GpuMat &depth_out,
float smoothing,
float smoothing,
int radius,
int radius,
const ftl::rgbd::Camera &camera,
const ftl::rgbd::Camera &camera,
cudaStream_t stream);
cudaStream_t stream);
 
/**
 
* Basic Moving Least Squares smoothing on a single depth map. Outputs just the
 
* smoothed normals. This is a single iteration of an algorithm that should
 
* iterate 2-3 times.
 
*
 
* @param normals_in 4 channel 16-bit float (half).
 
* @param normals_out 4 channel 16-bit float (half).
 
* @param depth_in 1 channel 32-bit float
 
* @param smoothing Gaussian radius in depth units
 
* @param radius Window radius for smoothing
 
* @param camera Camera intrinsics
 
* @param stream Optional CUDA stream
 
*/
void mls_smooth(
void mls_smooth(
const cv::cuda::GpuMat &normals_in,
const cv::cuda::GpuMat &normals_in,
cv::cuda::GpuMat &normals_out,
cv::cuda::GpuMat &normals_out,
const cv::cuda::GpuMat &depth_in,
const cv::cuda::GpuMat &depth_in,
float smoothing,
float smoothing,
int radius,
int radius,
const ftl::rgbd::Camera &camera,
const ftl::rgbd::Camera &camera,
cudaStream_t stream);
cudaStream_t stream);
}
}
}
}
Loading