eos 1.4.0
Loading...
Searching...
No Matches
Classes | Functions
eos::video Namespace Reference

Video keyframe extraction and fusion. More...

Classes

struct  Keyframe
 A keyframe selected by the fitting algorithm. More...
 
struct  PoseBinningKeyframeSelector
 A keyframe selection that selects keyframes according to yaw pose and score. More...
 

Functions

cv::Mat merge_weighted_mean (const std::vector< Keyframe< cv::Mat > > &keyframes, const morphablemodel::MorphableModel &morphable_model, const std::vector< morphablemodel::Blendshape > &blendshapes)
 Extracts texture from each keyframe and merges them using a weighted mean.
 
double variance_of_laplacian (const cv::Mat &image)
 Computes the variance of laplacian of the given image or patch.
 

Detailed Description

Video keyframe extraction and fusion.

Function Documentation

◆ merge_weighted_mean()

cv::Mat eos::video::merge_weighted_mean ( const std::vector< Keyframe< cv::Mat > > &  keyframes,
const morphablemodel::MorphableModel morphable_model,
const std::vector< morphablemodel::Blendshape > &  blendshapes 
)
inline

Extracts texture from each keyframe and merges them using a weighted mean.

Uses the view angle as weighting.

Note 1: Would be nice to eventually return a 4-channel texture map, with a sensible weight in the 4th channel (i.e. the max of all weights for a given pixel).

Note 2: On each call to this, it generates all isomaps. This is quite time-consuming (and we could compute the weighted mean incrementally). But caching them is not trivial (maybe with a hashing or comparing the cv::Mat frame data* member?). On the other hand, for the more complex merging techniques (super-res, involving ceres, or a median cost-func?), there might be no caching possible anyway and we will recompute the merged isomap from scratch each time anyway, but not by first extracting all isomaps - instead we would just do a lookup of the required pixel value(s) in the original image.

// struct KeyframeMerger {};

Parameters
[in]keyframesThe keyframes that will be merged.
[in]morphable_modelThe Morphable Model with which the keyframes have been fitted.
[in]blendshapesThe blendshapes with which the keyframes have been fitted.
Returns
Merged texture map (isomap), 3-channel uchar.

◆ variance_of_laplacian()

double eos::video::variance_of_laplacian ( const cv::Mat &  image)
inline

Computes the variance of laplacian of the given image or patch.

This should compute the variance of the laplacian of a given image or patch, according to the 'LAPV' algorithm of Pech 2000. It is used as a focus or blurriness measure, i.e. to assess the quality of the given patch.

Parameters
[in]imageInput image or patch.
Returns
The computed variance of laplacian score.