proper dimensions from cv::Size in output stats/centroid

This commit is contained in:
Jason Newton
2012-12-16 00:44:32 -08:00
parent 1eae455acb
commit 5f86eb8d63

View File

@@ -75,9 +75,9 @@ namespace cv{
}
inline
void init(int nlabels){
_mstatsv->create(cv::Size(nlabels, CC_STAT_MAX), cv::DataType<int>::type);
_mstatsv->create(cv::Size(CC_STAT_MAX, nlabels), cv::DataType<int>::type);
statsv = _mstatsv->getMat();
_mcentroidsv->create(cv::Size(nlabels, 2), cv::DataType<double>::type);
_mcentroidsv->create(cv::Size(2, nlabels), cv::DataType<double>::type);
centroidsv = _mcentroidsv->getMat();
for(int l = 0; l < (int) nlabels; ++l){