Hi!
I have a problem trying to k-d tree decomposition with 3 dimensional mat. I tried to check the problem, and I found the problem may be for the reason that the matrix's rows are -1. (So, when I tried to execute "myMat.size()", errors occurred).
How can I solve the problem? The situation is...
I made the matrix like... int sz[] = {300,300,300}; cv::Mat myMat(3, sz, CV_32FC1, cv::Scalar::all(0)); and I assigned the values like... myMat.at<int>(x, y, z) = grayMat<int>(r,c);
and to execute kdtree decomposition... cv::flann::KDTreeIndexParams kdparams(64); // to make 64bins... cv::flann::Index kdtreeIndex(myMat, kdparams);
and it makes errors!
Also, I checked the "myMat"'s size std::cout<<" myMat"<<", rows:"<<mymat.rows<<std::endl; and="" it="" returns="" -1="" value.<="" p="">
Please give me any advice. Thanks.