![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <ImageIO.h>
Public Member Functions | |
| DepthNoiseSimulator (const std::string &noise_model_path) | |
| Constructor. More... | |
| geometry::Image | Simulate (const geometry::Image &im_src, float depth_scale=1000.0) |
| Apply noise model to a depth image. More... | |
| core::Tensor | GetNoiseModel () const |
| Return the noise model. More... | |
| void | EnableDeterministicDebugMode () |
| Enable deterministic debug mode. All normally distributed noise will be replaced by 0. More... | |
Simulate depth image noise from a given noise distortion model. The distortion model is based on Teichman et. al. "Unsupervised intrinsic calibration of depth sensors via SLAM" RSS 2009. Also see Redwood dataset
|
explicit |
Constructor.
| noise_model | Path to the noise model file. See http://redwood-data.org/indoor/dataset.html for the format. Or, you may use one of our example datasets, e.g., RedwoodIndoorLivingRoom1. |
Definition at line 99 of file ImageIO.cpp.
References cloudViewer::core::Float32, LogError, cloudViewer::utility::filesystem::CFile::Open(), cloudViewer::utility::filesystem::CFile::ReadLine(), and cloudViewer::core::Tensor::Zeros().
|
inline |
|
inline |
| geometry::Image cloudViewer::t::io::DepthNoiseSimulator::Simulate | ( | const geometry::Image & | im_src, |
| float | depth_scale = 1000.0 |
||
| ) |
Apply noise model to a depth image.
| im_src | Source depth image, must be with dtype UInt16 or Float32, channels==1. |
| depth_scale | Scale factor to the depth image. As a sanity check, if the dtype is Float32, the depth_scale must be 1.0. If the dtype is is UInt16, the depth_scale is typically larger than 1.0, e.g. it can be 1000.0. |
im_src. Definition at line 158 of file ImageIO.cpp.
References cloudViewer::t::geometry::Image::AsTensor(), cloudViewer::core::Tensor::Clone(), CLOUDVIEWER_DEVICE, cloudViewer::core::Tensor::Contiguous(), cloudViewer::core::Float32, cloudViewer::t::geometry::Image::GetChannels(), cloudViewer::t::geometry::Image::GetCols(), cloudViewer::t::geometry::kernel::TArrayIndexer< index_t >::GetDataPtr(), cloudViewer::core::Tensor::GetDevice(), cloudViewer::core::Tensor::GetDtype(), cloudViewer::t::geometry::Image::GetDtype(), cloudViewer::t::geometry::Image::GetRows(), height, LogError, LogWarning, max(), min(), cloudViewer::core::ParallelFor(), cloudViewer::t::geometry::kernel::image::To(), cloudViewer::core::Tensor::To(), cloudViewer::core::Dtype::ToString(), cloudViewer::core::UInt16, width, and cloudViewer::t::geometry::kernel::TArrayIndexer< index_t >::WorkloadToCoord().