opencvでEMしたあとは、getメソッドで平均や共分散を受け取れる。4つのgaussian mixtureを指定した場合、
// データのクラスタリング
em_model.train( samples, 0, params, labels );
for(int i=0; i<100; i++){
cout << "(int)*1.val[0]) is " << (int)*2.val[0]) << "\n";//それぞれの点のラベルを表示
}
const CvMat *means = em_model.get_means();
cout << cvGet2D(means, 0, 0).val[0] << "hooley\n";
cout << cvGet2D(means, 0, 1).val[0] << "hooley\n";
cout << cvGet2D(means, 1, 0).val[0] << "hooley\n";
cout << cvGet2D(means, 1, 1).val[0] << "hooley\n";
cout << cvGet2D(means, 2, 0).val[0] << "hooley\n";
cout << cvGet2D(means, 2, 1).val[0] << "hooley\n";
cout << cvGet2D(means, 3, 0).val[0] << "hooley\n";
cout << cvGet2D(means, 3, 1).val[0] << "hooley\n";
//cout << cvGet2D(means, 4, 0).val[0] << "hooley\n";入っていない
//cout << cvGet2D(means, 4, 1).val[0] << "hooley\n";
getch();