SyB3R - Synthetic Benchmark for 3D Reconstruction
ImagePP_SensorNoise.h
1 /*
2  * Syb3r - A framework for the creation and use of synthetic benchmark datasets for SfM/MVS with Blender and Cycles.
3  * Copyright (C) 2016 Andreas Ley <mail@andreas-ley.com>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  */
19 
20 
21 #ifndef IMAGEPP_SENSORNOISE_H
22 #define IMAGEPP_SENSORNOISE_H
23 
24 #include "ImagePostprocessorStep.h"
25 
26 #include <mutex>
27 #include <random>
28 
29 namespace syb3r {
30 namespace synthesis {
31 
33 {
34  public:
35  ImagePP_SensorNoise(float sigmaNormalNoise, float sigmaLognormalNoise);
36 
37  virtual void process(tools::FloatImage<Eigen::Vector3f> &output, const tools::FloatImage<Eigen::Vector3f> &input, ImageProperties &properties) const override;
38  protected:
39  float m_sigmaNormalNoise;
40  float m_sigmaLognormalNoise;
41 
42  mutable std::mutex m_rngMutex;
43  mutable std::mt19937 m_rng;
44 };
45 
46 }
47 }
48 
49 #endif // IMAGEPP_SENSORNOISE_H
Definition: CameraPathEvaluation.cpp:10
Definition: ImagePostprocessorStep.h:33
virtual void process(tools::FloatImage< Eigen::Vector3f > &output, const tools::FloatImage< Eigen::Vector3f > &input, ImageProperties &properties) const override
Definition: ImagePP_SensorNoise.cpp:34
Stores basic information in key/value pairs.
Definition: ImagePostprocessor.h:25
Stores an image with arbitrary, usually float based, pixel values.
Definition: FloatImage.h:35
Definition: ImagePP_SensorNoise.h:32