30 T* data =
reinterpret_cast<T*
>(image_data);
33 switch (_hole_filling_mode)
46 <<
"Unsupported hole filling mode: " << _hole_filling_mode <<
" is out of range.");
52 inline void holes_fill_left(T* image_data,
size_t width,
size_t height,
size_t stride)
54 std::function<bool(T*)> fp_oper = [](T* ptr) {
return !*((
int *)ptr); };
55 std::function<bool(T*)> uint_oper = [](T* ptr) {
return !(*ptr); };
60 for (
int j = 0; j < height; ++j)
63 for (
int i = 1; i < width; ++i)
75 std::function<bool(T*)> fp_oper = [](T* ptr) {
return !*((
int *)ptr); };
76 std::function<bool(T*)> uint_oper = [](T* ptr) {
return !(*ptr); };
80 T * p = image_data + width;
82 for (
int j = 1; j < height - 1; ++j)
85 for (
int i = 1; i < width; ++i)
118 std::function<bool(T*)> fp_oper = [](T* ptr) {
return !*((
int *)ptr); };
119 std::function<bool(T*)> uint_oper = [](T* ptr) {
return !(*ptr); };
123 T * p = image_data + width;
125 for (
int j = 1; j < height - 1; ++j)
128 for (
int i = 1; i < width; ++i)
135 if (!empty(q) && (*q < tmp))
139 if (!empty(q) && (*q < tmp))
143 if (!empty(q) && (*q < tmp))
147 if (!empty(q) && (*q < tmp))
160 size_t _width, _height, _stride;
163 size_t _current_frm_size_pixels;
166 uint8_t _hole_filling_mode;
Definition: hole-filling-filter.h:16
Definition: rs_frame.hpp:21
Definition: rs_frame.hpp:202
Definition: synthetic-stream.h:41
Definition: hole-filling-filter.h:12
void update_configuration(const rs2::frame &f)
void holes_fill_nearest(T *image_data, size_t width, size_t height, size_t stride)
Definition: hole-filling-filter.h:116
Definition: rs_processing.hpp:13
Definition: hole-filling-filter.h:11
void holes_fill_farest(T *image_data, size_t width, size_t height, size_t stride)
Definition: hole-filling-filter.h:73
rs2::frame prepare_target_frame(const rs2::frame &f, const rs2::frame_source &source)
rs2_extension
Specifies advanced interfaces (capabilities) objects may implement.
Definition: rs_types.h:94
void apply_hole_filling(void *image_data)
Definition: hole-filling-filter.h:27
holes_filling_types
Definition: hole-filling-filter.h:8
Definition: hole-filling-filter.h:10
Definition: hole-filling-filter.h:13
void holes_fill_left(T *image_data, size_t width, size_t height, size_t stride)
Definition: hole-filling-filter.h:52