Ocean
|
This class is the base class for all mappings. More...
Public Member Functions | |
unsigned int | width () const |
Returns the width of this mapping object. More... | |
unsigned int | height () const |
Returns the height of this mapping object. More... | |
virtual void | applyMapping (Frame &frame, const Frame &mask, const unsigned int xStart, const unsigned int xWidth, const unsigned int yStart, const unsigned int yHeight, Worker *worker=nullptr) const =0 |
Applies the current mapping for one given frame. More... | |
operator bool () const | |
Returns whether this mapping object is not empty. More... | |
template<unsigned int tChannels> | |
unsigned int | appearanceCostNormalization () const |
Calculates the normalization term for the appearance cost in accordance to the frame dimension of this mapping. More... | |
template<unsigned int tChannels> | |
unsigned int | spatialCostNormalization () const |
Calculates the normalization term for the spatial cost in accordance to the frame dimension of this mapping. More... | |
template<> | |
unsigned int | appearanceCostNormalization () const |
template<> | |
unsigned int | appearanceCostNormalization () const |
template<> | |
unsigned int | appearanceCostNormalization () const |
template<> | |
unsigned int | appearanceCostNormalization () const |
template<> | |
unsigned int | spatialCostNormalization () const |
template<> | |
unsigned int | spatialCostNormalization () const |
template<> | |
unsigned int | spatialCostNormalization () const |
template<> | |
unsigned int | spatialCostNormalization () const |
Protected Member Functions | |
Mapping ()=default | |
Creates a new mapping object. More... | |
Mapping (const Mapping &pixelMapping) | |
Copies a mapping from a given mapping object. More... | |
Mapping (Mapping &&pixelMapping) noexcept | |
Moves constructor. More... | |
Mapping (const unsigned int width, const unsigned int height) | |
Creates a new mapping object. More... | |
virtual | ~Mapping () |
Destructs a mapping object. More... | |
template<unsigned int tChannels> | |
unsigned int | calculateSpatialCostNormalization (const unsigned int width, const unsigned int height) |
Calculates the normalization term for the spatial cost in accordance to a specified frame dimension. More... | |
Mapping & | operator= (const Mapping &mapping) |
Assign operator. More... | |
Mapping & | operator= (Mapping &&mapping) noexcept |
Move operator. More... | |
Static Protected Member Functions | |
template<unsigned int tChannels> | |
static unsigned int | calculateAppearanceCostNormalization (const unsigned int width, const unsigned int height) |
Calculates the normalization term for the appearance cost in accordance to a specified frame dimension. More... | |
Protected Attributes | |
unsigned int | width_ = 0u |
Width of this pixel mapping object in pixel. More... | |
unsigned int | height_ = 0u |
Height of this pixel mapping object in pixel. More... | |
unsigned int | appearanceCostNormalizationInt8_ = 0u |
Appearance cost normalization factor for 1 channel 8 bit frames. More... | |
unsigned int | appearanceCostNormalizationInt16_ = 0u |
Appearance cost normalization factor for 2 channel 16 bit frames. More... | |
unsigned int | appearanceCostNormalizationInt24_ = 0u |
Appearance cost normalization factor for 3 channel 24 bit frames. More... | |
unsigned int | appearanceCostNormalizationInt32_ = 0u |
Appearance cost normalization factor for 4 channel 32 bit frames. More... | |
unsigned int | sapatialCostNormalizationInt8_ = 0u |
Spatial cost normalization factor for 1 channel 8 bit frames. More... | |
unsigned int | spatialCostNormalizationInt16_ = 0u |
Spatial cost normalization factor for 2 channel 16 bit frames. More... | |
unsigned int | spatialCostNormalizationInt24_ = 0u |
Spatial cost normalization factor for 3 channel 24 bit frames. More... | |
unsigned int | spatialCostNormalizationInt32_ = 0u |
Spatial cost normalization factor for 4 channel 32 bit frames. More... | |
This class is the base class for all mappings.
A mapping object stores source pixel locations for every target pixel (every pixel) of the work area.
|
protecteddefault |
Creates a new mapping object.
|
inlineprotected |
Copies a mapping from a given mapping object.
pixelMapping | Pixel mapping to be copied |
|
inlineprotectednoexcept |
Moves constructor.
pixelMapping | Pixel mapping to be moved |
|
inlineprotected |
Creates a new mapping object.
|
inlineprotectedvirtual |
Destructs a mapping object.
|
inline |
Calculates the normalization term for the appearance cost in accordance to the frame dimension of this mapping.
|
inline |
|
inline |
|
inline |
|
inline |
|
pure virtual |
Applies the current mapping for one given frame.
Only mask pixels will be updated in the frame while the specification of a bounding box in which the mapping will be applied is used to improve the performance of the execution.
frame | The frame holding source and target area, with frame dimension identical to width() x height() |
mask | The 8 bit mask defining source and target area with 0xFF defining a non-mask pixel, with same frame dimension and pixel origin as the provided frame |
xStart | Horizontal start position of the update area in pixel, with range [0, width()) |
xWidth | Width of the update area in pixel, with range [1, width() - xStart] |
yStart | Vertical start position of the update area in pixel, with range [0, height()) |
yHeight | Height of the update area in pixel, with range [1, height() - yStart] |
worker | Optional worker object to distribute the computation |
Implemented in Ocean::CV::Synthesis::MappingI1, and Ocean::CV::Synthesis::MappingF1.
|
inlinestaticprotected |
Calculates the normalization term for the appearance cost in accordance to a specified frame dimension.
width | The width of the frame in pixel, with range [0, infinity) |
height | The height of the frame in pixel, with range [0, infinity) |
|
inlineprotected |
Calculates the normalization term for the spatial cost in accordance to a specified frame dimension.
width | The width of the frame in pixel, with range [0, infinity) |
height | The height of the frame in pixel, with range [0, infinity) |
|
inline |
Returns the height of this mapping object.
|
inlineexplicit |
Returns whether this mapping object is not empty.
Assign operator.
mapping | The mapping object to be copied |
Move operator.
mapping | The mapping object to be moved |
|
inline |
Calculates the normalization term for the spatial cost in accordance to the frame dimension of this mapping.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns the width of this mapping object.
|
protected |
Appearance cost normalization factor for 2 channel 16 bit frames.
|
protected |
Appearance cost normalization factor for 3 channel 24 bit frames.
|
protected |
Appearance cost normalization factor for 4 channel 32 bit frames.
|
protected |
Appearance cost normalization factor for 1 channel 8 bit frames.
|
protected |
Height of this pixel mapping object in pixel.
|
protected |
Spatial cost normalization factor for 1 channel 8 bit frames.
|
protected |
Spatial cost normalization factor for 2 channel 16 bit frames.
|
protected |
Spatial cost normalization factor for 3 channel 24 bit frames.
|
protected |
Spatial cost normalization factor for 4 channel 32 bit frames.
|
protected |
Width of this pixel mapping object in pixel.