Guest User

Untitled

a guest
Oct 19th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1.  // calculate distances and sort them
  2.          std::vector<Clustering::ClusterDistance>   distances;
  3.          distances.resize(previousClusters.size()*currentClusters.size());
  4.          for (int i=0; i< previousClusters.size(); i++)
  5.          {
  6.  
  7.              for(int j=0; j < currentClusters.size(); j++)
  8.              {
  9.                  int index = j + i * currentClusters.size();
  10.                  distances[index] = Clustering::ClusterDistance( cv::norm(previousClusters[i].m_Properties.m_Center - currentClusters[j].m_Properties.m_Center), previousClusters[i], currentClusters[j] );
  11.              }
  12.          }
Add Comment
Please, Sign In to add comment