Esempio n. 1
0
  std::vector<GMM>
    operator() (const arma::mat & data, const arma::urowvec & labels) {
      const unsigned int numLabels = (unsigned int) arma::as_scalar(arma::max(labels)) + 1;
      std::vector<GMM> BModels;

      for (unsigned int i = 0; i < numLabels; ++i){
        arma::uvec indices = arma::find(labels == i);
        if (indices.n_elem > 0) {
          BModels.push_back(GMM(data.cols(indices), kmin_, kmax_));
        }
      }
      return BModels;
    }
Esempio n. 2
0
Finger_filter::Finger_filter()
{

    // Load a gmm for each finger. The Gmm represents the workspace (rechable area) of the extent of a finger

    std::string path_to_load_parameters = "/home/guillaume/MatlabWorkSpace/joint_blabeling/parameters/";
    std::string path_to_gmm;
    FINGERS f;
    for(int i = INDEX; i != Last;i++){
        f = static_cast<FINGERS>(i);
        path_to_gmm = path_to_load_parameters + f_enum2str.at(f) + "/";
        gmm[f] = GMM(path_to_gmm,f_enum2str.at(f) );
    }

}