I am trying to cluster features using the flann hierarchicalClustering function. The features' dimension is 48 and I have around 100 features. I don't understand why the clustering crashes ? (seg fault). Below is a sample code of what I am doing :
//samples cv::Mat1f descriptorsSamples = cv::Mat1f::zeros(nSamples, 48);
//here I fill descriptorsSamples with float values (48 dim descriptors)
unsigned int branching = 32; // 32 unsigned int niterations = 10; // 100 int nClusters = 0;
cvflann::KMeansIndexParams kmean_params;
unsigned int initiNCenters = 10; cv::Mat1f centers(initiNCenters, 3);
nClusters = cv::flann::hierarchicalClustering< cv::flann::L2<float> >((const cv::Mat &) descriptorsSamples, (cv::Mat &) centers, (const::cvflann::KMeansIndexParams &) kmean_params);
IMPORTANT : I am using OpenCV 2.4.8 (this version is imposed)