Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
icl::filter::WeightChannelsOp Class Reference

Weight pixel values of all image channels. More...

#include <WeightChannelsOp.h>

Inheritance diagram for icl::filter::WeightChannelsOp:
icl::filter::UnaryOp icl::utils::Configurable

List of all members.

Public Member Functions

 WeightChannelsOp ()
 creates a new WeightChannelsOp object
 WeightChannelsOp (const std::vector< icl64f > &weights)
 creates an new WeightChannelsOp object with a given weights vector
void apply (const core::ImgBase *poSrc, core::ImgBase **ppoDst)
 applies this operation on the source image
const std::vector< icl64f > & getWeights () const
 returns the current weight vector
void setWeights (const std::vector< icl64f > &weights)
 sets up the current weights vector

Private Attributes

std::vector< icl64fm_vecWeights
 internal storage for the channel weights

Detailed Description

Weight pixel values of all image channels.

Pixels of all channels in source image are weighted by a channel-wise weight:

\[ D(x,y,c) = S(x,y,c)*w(c) \]

where $D$ is the destination image, $S$ is the source image, $w$ is the weight vector and $C$ is the source images channel count.

Performance: 1000x1000 image with 10 channels averaged over 100 runs (1,83 GHz Core Duo)

Performance: 1000x1000 image with 3 channels averaged over 100 runs (1,83 GHz Core Duo)


Constructor & Destructor Documentation

creates a new WeightChannelsOp object

icl::filter::WeightChannelsOp::WeightChannelsOp ( const std::vector< icl64f > &  weights) [inline]

creates an new WeightChannelsOp object with a given weights vector

Parameters:
weightschannel weights vector

Member Function Documentation

void icl::filter::WeightChannelsOp::apply ( const core::ImgBase poSrc,
core::ImgBase **  ppoDst 
) [virtual]

applies this operation on the source image

Parameters:
poSrcsource image
ppoDstdestination image (adapted to icl32f by default, if the source image has depth64f, ppoDst is adapted to icl64f too.

Implements icl::filter::UnaryOp.

const std::vector<icl64f>& icl::filter::WeightChannelsOp::getWeights ( ) const [inline]

returns the current weight vector

Returns:
reference to the current weight vector
void icl::filter::WeightChannelsOp::setWeights ( const std::vector< icl64f > &  weights) [inline]

sets up the current weights vector

Parameters:
weightsnew weight vector

Member Data Documentation

internal storage for the channel weights


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines