Commit 5f86eb8d authored by Jason Newton's avatar Jason Newton

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

parent 1eae455a
...@@ -75,9 +75,9 @@ namespace cv{ ...@@ -75,9 +75,9 @@ namespace cv{
} }
inline inline
void init(int nlabels){ 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(); 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(); centroidsv = _mcentroidsv->getMat();
for(int l = 0; l < (int) nlabels; ++l){ for(int l = 0; l < (int) nlabels; ++l){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment