Public Types | |
Public Member Functions | |
virtual modalities::Modality * | clone () const |
Creates an additional copy of this class instance. | |
ColourHist2D (const ColourHist2D &c) | |
Copy Constructor (deep copy). | |
ColourHist2D (opentl::modelprojection::Warp *warp, int camIdx, opentl::modelprojection::GLRenderer *renderer=NULL) | |
Constructor. | |
virtual int | copyMTrack2MDetect (const TargetPtrVector *targets) |
Copy the on-line histogram (Mtrack) into the off-line one (Mdetect). | |
void | getRotatedImageOfLink (const boost::shared_ptr< opentl::core::State > &state, const boost::shared_ptr< models::ObjModel > &objModel, double &x, double &y, double &width, double &height, int linkIdx) |
Compute the rotated bounding box of one or more faces, and fills a binary mask (white inside the rotated box, black outside) NOTE: the mask image is processed only within the bounding region of the projected face, while the rest is left unchanged. | |
opentl::core::cvdata::Image & | getSegmentationImage (std::size_t targetId) |
virtual void | init () |
Initialization function. | |
virtual int | matchFeatLevel (const TargetPtrVector &targets, T_MEAS_FEATPtrVector &outputMeas, std::size_t partitionIdx) |
Match model and image color histograms, under a given pose hypothesis. | |
virtual int | matchPixLevel (const TargetPtrVector &targets, T_MEAS_PIXPtrVector &outputMeas, std::size_t partitionIdx) |
Matching on pixel level
| |
virtual int | preProcess (const opentl::core::cvdata::Image &image, const std::vector< std::vector< int > > &preProcessROIs) |
Converts a given Image into the specified color space To specify the destination color space, please use the param construct. | |
virtual int | sampleModelFeatures (const TargetPtrVector &targets) |
Sample color histogram from shape and appearance model, at given pose. | |
virtual int | updateModelFeatures (const TargetPtrVector &targets) |
Update on-line color histogram from pre-processed image, at given pose. | |
virtual | ~ColourHist2D () |
Destructor. | |
Static Public Attributes | |
static std::vector < std::vector< std::vector < opentl::core::cvdata::ColourHist2d > > > | mColourHist2DFeatures_z |
Storage for _temp._ image color histogram First camera index, 2nd target id, 3rd face index. | |
static std::vector < std::vector< std::vector < opentl::core::cvdata::ColourHist2d > > > | mColourHist2DMdetect |
Storage for reference color histogram (off-line, from SampleModelFeatures) One histogram per: target and patch The first index specifies the camera index, the second index specifies the targetid, 3rd index faceid. | |
static std::vector < std::vector< std::vector < opentl::core::cvdata::ColourHist2d > > > | mColourHist2DMtrack |
Storage for reference color histogram (on-line, from UpdateModelFeatures) One histogram per: target and patch The first index specifies the camera index, the second index specifies the targetid, 3rd index faceid. | |
static std::vector < boost::shared_ptr < opentl::core::cvdata::Image > > | mColourHist2DStaticDataImage |
static std::vector < boost::shared_ptr < cvprocess::ColorHistShader > > | mHistoShaders |
Shader for computing the color histogram on the GPU. | |
static std::vector < boost::shared_ptr < cvprocess::ColorHistSum > > | mHistoSumShaders |
Shader for summing up partial color histograms on the GPU. | |
static std::vector < boost::shared_ptr < opentl::core::cvdata::TextureGpu > > | mInputTextures |
Texture to copy the input image on the GPU. | |
static std::vector < boost::shared_ptr < opentl::core::cvdata::TextureGpu > > | mShadowTextures |
Texture for the object shadow (mask) GPU. | |
Protected Member Functions | |
virtual void | getImageHistogram (const boost::shared_ptr< opentl::core::State > &state, const boost::shared_ptr< models::ObjModel > &objModel, std::vector< opentl::core::cvdata::ColourHist2d > &MDestination) |
Sample color histogram from image pixels, using either CPU- or GPU-based implementation, for a given shadow type. |
Parameters for visual processing in this class.
Reimplemented from opentl::modalities::Modality.
Reimplemented from opentl::modalities::Modality.
opentl::modalities::ColourHist2D::ColourHist2D | ( | opentl::modelprojection::Warp * | warp, | |
int | camIdx, | |||
opentl::modelprojection::GLRenderer * | renderer = NULL | |||
) |
Constructor.
warp | Warp instance | |
camIdx | Camera index | |
Pointer | to the GLRenderer instance, if the full object shadow is used while sampling the histogram |
opentl::modalities::ColourHist2D::ColourHist2D | ( | const ColourHist2D & | c | ) |
Copy Constructor (deep copy).
virtual opentl::modalities::ColourHist2D::~ColourHist2D | ( | ) | [virtual] |
Destructor.
virtual modalities::Modality* opentl::modalities::ColourHist2D::clone | ( | ) | const [virtual] |
virtual int opentl::modalities::ColourHist2D::copyMTrack2MDetect | ( | const TargetPtrVector * | targets | ) | [virtual] |
Copy the on-line histogram (Mtrack) into the off-line one (Mdetect).
targets | Vector of targets |
virtual void opentl::modalities::ColourHist2D::getImageHistogram | ( | const boost::shared_ptr< opentl::core::State > & | state, | |
const boost::shared_ptr< models::ObjModel > & | objModel, | |||
std::vector< opentl::core::cvdata::ColourHist2d > & | MDestination | |||
) | [protected, virtual] |
Sample color histogram from image pixels, using either CPU- or GPU-based implementation, for a given shadow type.
state | Object state (single-target) | |
objModel | Object model | |
MDestination | Destination histogram | |
bSetModelPoints | Whether to set model points inside the Warp, before calling getScreenBoundingLimits |
void opentl::modalities::ColourHist2D::getRotatedImageOfLink | ( | const boost::shared_ptr< opentl::core::State > & | state, | |
const boost::shared_ptr< models::ObjModel > & | objModel, | |||
double & | x, | |||
double & | y, | |||
double & | width, | |||
double & | height, | |||
int | linkIdx | |||
) |
Compute the rotated bounding box of one or more faces, and fills a binary mask (white inside the rotated box, black outside) NOTE: the mask image is processed only within the bounding region of the projected face, while the rest is left unchanged.
state | State hypothesis | |
objModel | Object model | |
(x,y,width,height) | Output coordinates of the upright bounding box | |
linkIdx | Link Id | |
bSetModelPoints | Whether to set model points inside the Warp, before calling getScreenBoundingLimits |
opentl::core::cvdata::Image& opentl::modalities::ColourHist2D::getSegmentationImage | ( | std::size_t | targetId | ) |
virtual void opentl::modalities::ColourHist2D::init | ( | ) | [virtual] |
virtual int opentl::modalities::ColourHist2D::matchFeatLevel | ( | const TargetPtrVector & | targets, | |
T_MEAS_FEATPtrVector & | outputMeas, | |||
std::size_t | partitionIdx | |||
) | [virtual] |
Match model and image color histograms, under a given pose hypothesis.
targets | Vector of targets | |
outputMeas | Each one is a set of Bhattacharyya distances (residuals) between model and image histograms, for all patches |
Reimplemented from opentl::modalities::Modality.
virtual int opentl::modalities::ColourHist2D::matchPixLevel | ( | const TargetPtrVector & | targets, | |
T_MEAS_PIXPtrVector & | outputMeas, | |||
std::size_t | partitionIdx | |||
) | [virtual] |
Matching on pixel level
targets | Vector of targets | |
outputMeas | Pixel-space measurement (can be a pixel map of residuals, or a unique residual value) |
Reimplemented from opentl::modalities::Modality.
virtual int opentl::modalities::ColourHist2D::preProcess | ( | const opentl::core::cvdata::Image & | image, | |
const std::vector< std::vector< int > > & | preProcessROIs | |||
) | [virtual] |
Converts a given Image into the specified color space To specify the destination color space, please use the param construct.
image | Input sensor data (e.g. camera image in RGB) | |
preProcessROIs | Regions of interest (x0,y0,width,height), per target |
Reimplemented from opentl::modalities::Modality.
virtual int opentl::modalities::ColourHist2D::sampleModelFeatures | ( | const TargetPtrVector & | targets | ) | [virtual] |
Sample color histogram from shape and appearance model, at given pose.
targets | Vector of targets |
Reimplemented from opentl::modalities::Modality.
virtual int opentl::modalities::ColourHist2D::updateModelFeatures | ( | const TargetPtrVector & | targets | ) | [virtual] |
Update on-line color histogram from pre-processed image, at given pose.
targets | Vector of targets |
Reimplemented from opentl::modalities::Modality.
std::vector<std::vector<std::vector<opentl::core::cvdata::ColourHist2d> > > opentl::modalities::ColourHist2D::mColourHist2DFeatures_z [static] |
Storage for _temp._ image color histogram First camera index, 2nd target id, 3rd face index.
std::vector<std::vector<std::vector<opentl::core::cvdata::ColourHist2d> > > opentl::modalities::ColourHist2D::mColourHist2DMdetect [static] |
Storage for reference color histogram (off-line, from SampleModelFeatures) One histogram per: target and patch The first index specifies the camera index, the second index specifies the targetid, 3rd index faceid.
std::vector<std::vector<std::vector<opentl::core::cvdata::ColourHist2d> > > opentl::modalities::ColourHist2D::mColourHist2DMtrack [static] |
Storage for reference color histogram (on-line, from UpdateModelFeatures) One histogram per: target and patch The first index specifies the camera index, the second index specifies the targetid, 3rd index faceid.
std::vector<boost::shared_ptr<opentl::core::cvdata::Image> > opentl::modalities::ColourHist2D::mColourHist2DStaticDataImage [static] |
std::vector<boost::shared_ptr<cvprocess::ColorHistShader> > opentl::modalities::ColourHist2D::mHistoShaders [static] |
Shader for computing the color histogram on the GPU.
std::vector<boost::shared_ptr<cvprocess::ColorHistSum> > opentl::modalities::ColourHist2D::mHistoSumShaders [static] |
Shader for summing up partial color histograms on the GPU.
std::vector<boost::shared_ptr<opentl::core::cvdata::TextureGpu> > opentl::modalities::ColourHist2D::mInputTextures [static] |
Texture to copy the input image on the GPU.
std::vector<boost::shared_ptr<opentl::core::cvdata::TextureGpu> > opentl::modalities::ColourHist2D::mShadowTextures [static] |
Texture for the object shadow (mask) GPU.