Go to the documentation of this file.00001 #ifndef OPENTISSUE_UTILITY_IMAGE_ANALYSIS_IMAGE_ANALYSIS_FEATURE_SPACE_PCA_H
00002 #define OPENTISSUE_UTILITY_IMAGE_ANALYSIS_IMAGE_ANALYSIS_FEATURE_SPACE_PCA_H
00003
00004
00005
00006
00007
00008
00009
00010 #include <OpenTissue/configuration.h>
00011
00012 #include <OpenTissue/core/math/math_covariance.h>
00013
00014 namespace OpenTissue
00015 {
00016 namespace image_analysis
00017 {
00026 template< typename feature_grid_type, typename vector3_type, typename matrix3x3_type>
00027 void feature_space_pca(feature_grid_type const & feature_grid, vector3_type & mean, matrix3x3_type & C )
00028 {
00029 using OpenTissue::math::covariance;
00030
00031 covariance(feature_grid.begin(),feature_grid.end(),mean,C);
00032 }
00033
00034 }
00035
00036 }
00037
00038
00039 #endif