Matbasis_rows=morphable_model.getShapeModel().getNormalisedPcaBasis(vertex_ids[i]);// In the paper, the not-normalised basis might be used? I'm not sure, check it. It's even a mess in the paper. PH 26.5.2014: I think the normalised basis is fine/better.
Matbasis_rows=morphable_model.get_shape_model().get_normalised_pca_basis(vertex_ids[i]);// In the paper, the not-normalised basis might be used? I'm not sure, check it. It's even a mess in the paper. PH 26.5.2014: I think the normalised basis is fine/better.
* @return An mesh instance of the mean of the Morphable Model.
*/
render::MeshgetMean()const
render::Meshget_mean()const
{
assert(shapeModel.getDataDimension()==colorModel.getDataDimension());// The number of vertices (= model.getDataDimension() / 3) has to be equal for both models.
assert(shape_model.get_data_dimension()==color_model.get_data_dimension());// The number of vertices (= model.getDataDimension() / 3) has to be equal for both models.
assert(shapeModel.getDataDimension()==colorModel.getDataDimension());// The number of vertices (= model.getDataDimension() / 3) has to be equal for both models.
assert(shape_model.get_data_dimension()==color_model.get_data_dimension());// The number of vertices (= model.getDataDimension() / 3) has to be equal for both models.
assert(shapeModel.getDataDimension()==colorModel.getDataDimension());// The number of vertices (= model.getDataDimension() / 3) has to be equal for both models.
assert(shape_model.get_data_dimension()==color_model.get_data_dimension());// The number of vertices (= model.getDataDimension() / 3) has to be equal for both models.
* @param[in] index The index of the eigenvalue to return.
* @return The eigenvalue.
*/
floatgetEigenvalue(intindex)const
floatget_eigenvalue(intindex)const
{
returneigenvalues.at<float>(index);
};
...
...
@@ -245,11 +245,11 @@ private:
std::mt19937engine;///< Random number engine used to draw random coefficients.
cv::Matmean;///< A 3m x 1 col-vector (xyzxyz...)', where m is the number of model-vertices.
cv::MatnormalisedPcaBasis;///< The normalised PCA basis matrix. m x n (rows x cols) = numShapeDims x numShapePcaCoeffs, (=eigenvector matrix V). Each column is an eigenvector.
cv::MatunnormalisedPcaBasis;///< The unnormalised PCA basis matrix. m x n (rows x cols) = numShapeDims x numShapePcaCoeffs, (=eigenvector matrix V). Each column is an eigenvector.
cv::Matnormalised_pca_basis;///< The normalised PCA basis matrix. m x n (rows x cols) = numShapeDims x numShapePcaCoeffs, (=eigenvector matrix V). Each column is an eigenvector.
cv::Matunnormalised_pca_basis;///< The unnormalised PCA basis matrix. m x n (rows x cols) = numShapeDims x numShapePcaCoeffs, (=eigenvector matrix V). Each column is an eigenvector.
cv::Mateigenvalues;///< A col-vector of the eigenvalues (variances in the PCA space).
std::vector<std::array<int,3>>triangleList;///< List of triangles that make up the mesh of the model.
std::vector<std::array<int,3>>triangle_list;///< List of triangles that make up the mesh of the model.
};
...
...
@@ -263,7 +263,7 @@ private:
* @param[in] eigenvalues A row or column vector of eigenvalues.