Solve segmentation fault. Was due to wrong definition of histograms 'NumberOfMatchedClusters'.