SyB3R - Synthetic Benchmark for 3D Reconstruction
|
Stores an image with arbitrary, usually float based, pixel values. More...
#include <libs/Common/source/syb3r/tools/FloatImage.h>
Public Member Functions | |
void | resize (unsigned w, unsigned h) |
Allocate memory for w times h pixels. More... | |
unsigned | getHeight () const |
Returns number or rows in the image. | |
unsigned | getWidth () const |
Returns number of columns in the image. | |
Type & | operator[] (unsigned idx) |
Direct access to the row major data. | |
const Type & | operator[] (unsigned idx) const |
Direct access to the row major data. | |
Type & | operator() (unsigned x, unsigned y) |
Access to a single pixel. | |
const Type & | operator() (unsigned x, unsigned y) const |
Access to a single pixel. | |
template<typename OtherType , class BinaryOp > | |
const FloatImage< Type > & | performBinaryOp (const FloatImage< OtherType > &rhs, BinaryOp op) |
Helper function for binary operations. | |
template<class UnaryOp > | |
const FloatImage< Type > & | performUnaryOp (UnaryOp op) |
Helper function for unary operations. | |
template<typename OtherType > | |
const FloatImage< Type > & | operator-= (const FloatImage< OtherType > &rhs) |
template<typename OtherType > | |
const FloatImage< Type > & | operator+= (const FloatImage< OtherType > &rhs) |
template<typename OtherType > | |
const FloatImage< Type > & | operator*= (const FloatImage< OtherType > &rhs) |
template<typename OtherType > | |
const FloatImage< Type > & | operator/= (const FloatImage< OtherType > &rhs) |
template<typename OtherType > | |
const FloatImage< Type > & | operator*= (const OtherType &factor) |
template<typename OtherType > | |
const FloatImage< Type > & | operator+= (const OtherType &factor) |
void | subsample (const FloatImage< Type > &other, unsigned stride) |
Copys every n-th row and every n-th column. More... | |
Type | sampleLinear (float x, float y) const |
Samples from a float coordinate, using bilinear interpolation. More... | |
template<typename scalarType > | |
scalarType | sampleLinearChannel (float x, float y, unsigned channel) const |
Samples a single channel from a float coordinate, using bilinear interpolation. More... | |
void | swap (FloatImage< Type > &other) |
Protected Attributes | |
unsigned | m_width = 0 |
unsigned | m_height = 0 |
std::vector< Type > | m_data |
Stores an image with arbitrary, usually float based, pixel values.
If instantiated with Eigen::Vector3f, this class features the most basic tools for manipulating RGB32F images.
|
inline |
Allocate memory for w times h pixels.
The content does not get rescaled.
|
inline |
Samples from a float coordinate, using bilinear interpolation.
|
inline |
Samples a single channel from a float coordinate, using bilinear interpolation.
|
inline |
Copys every n-th row and every n-th column.
No box filtering or anything, just sub sampling.