reflectivity.h
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2020 Intel Corporation. All Rights Reserved.
3 
4 #pragma once
5 
6 #include <deque>
7 #include <atomic>
8 #include <stddef.h>
9 
10 namespace rs2
11 {
12  // This class calculate the IR pixel reflectivity.
13  // It uses depth value history, current IR value , maximum usable depth range and noise estimation.
14  // Note: This class is not thread safe
15  class reflectivity
16  {
17  public:
18  reflectivity();
19 
20  // Implement algorithm requirement [RS5-8358]
21  // Calculate pixel reflectivity based on current IR value and previous depth values STD
22  float get_reflectivity(float raw_noise_estimation, float max_usable_range, float ir_val) const;
23 
24  // Add pixel depth value to the history queue
25  void add_depth_sample(float depth_val, int x_in_image, int y_in_image);
26 
27  // Reset depth samples history (queue history will reset only if needed (if add_depth_sample was called since last reset/construction)
28  void reset_history();
29 
30  // Return the samples history ratio size / capacity [0-1]
31  float get_samples_ratio() const;
32 
33  // Return true if the history queue is full
34  bool is_history_full() const;
35 
36  // Return the history queue capacity
37  size_t history_capacity() const;
38 
39  // Return the history queue current size
40  size_t history_size() const;
41 
42  private:
43  // Implement a cyclic queue for depth samples
44  std::deque<float> _dist_queue;
45 
46  // Holds the current history size
47  size_t _history_size;
48  };
49 }
bool is_history_full() const
float get_reflectivity(float raw_noise_estimation, float max_usable_range, float ir_val) const
Definition: cah-model.h:10
std::deque< float > _dist_queue
Definition: reflectivity.h:44
float get_samples_ratio() const
size_t history_size() const
void add_depth_sample(float depth_val, int x_in_image, int y_in_image)
size_t history_capacity() const


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:39