A buffer that computes running window median of the data inserted. More...
#include <pcl/io/buffers.h>
Public Member Functions | |
MedianBuffer (std::size_t size, unsigned char window_size) | |
Construct a buffer of given size with given running window size. More... |
|
~MedianBuffer () | |
T | operator[] (std::size_t idx) const override |
Access an element at a given index. More... |
|
void | push (std::vector< T > &data) override |
Insert a new chunk of data into the buffer. More... |
|
Public Member Functions inherited from pcl::io::Buffer< T > | |
virtual | ~Buffer () |
std::size_t | size () const |
Get the size of the buffer. More... |
|
Additional Inherited Members | |
Public Types inherited from pcl::io::Buffer< T > | |
using | value_type = T |
Protected Member Functions inherited from pcl::io::Buffer< T > | |
Buffer (std::size_t size) | |
Protected Attributes inherited from pcl::io::Buffer< T > | |
const std::size_t | size_ |
A buffer that computes running window median of the data inserted.
The buffer and window sizes are specified at construction time. The buffer size defines the number of elements in each data chunk that is inserted in the buffer. The window size is the number of last data chunks that are considered for median computation. The median is computed separately for 1st, 2nd, etc. element in data chunks.
The data can contain invalid elements. For integral types zeros are assumed to be invalid elements, whereas for floating-point types it is quiet NaN. Invalid elements are ignored when computing median.
The buffer is thread-safe.
pcl::io::MedianBuffer< T >::MedianBuffer | ( | std::size_t | size, |
unsigned char | window_size | ||
) |
Construct a buffer of given size with given running window size.
[in] | size | buffer size |
[in] | window_size | running window size over which the median value should be computed (0..255) |
Definition at line 114 of file buffers.hpp.
References pcl::io::Buffer< T >::size_.
pcl::io::MedianBuffer< T >::~MedianBuffer |
Definition at line 140 of file buffers.hpp.
| overridevirtual |
Access an element at a given index.
This operation is constant time.
Implements pcl::io::Buffer< T >.
Definition at line 145 of file buffers.hpp.
| overridevirtual |
Insert a new chunk of data into the buffer.
This operation is linear in buffer size and window size.
[in] | data | input data chunk, the memory will be "stolen" |
Implements pcl::io::Buffer< T >.
Definition at line 153 of file buffers.hpp.
References buffer_traits< T >::is_invalid().
© 2009–2012, Willow Garage, Inc.
© 2012–, Open Perception, Inc.
Licensed under the BSD License.
https://pointclouds.org/documentation/classpcl_1_1io_1_1_median_buffer.html