Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

SparseMat::ptr is not a template function

typedef Vec<float, 5=""> cv::Vec5f; // if you only need 5,

int sz[] = {3,3}; SparseMat sparseLocL( 2, sz, CV_32FC(5)); if (sparseLocL.ptr(2,2, false) != NULL) cerr << "filled"; else cerr << "empty";

SparseMat::ptr is not a template function , but just returns a uchar *

typedef Vec<float, 5=""> 5> cv::Vec5f; // if you only need take 5, 

...

int sz[] = {3,3}; SparseMat sparseLocL( 2, sparseLocL(2, sz, CV_32FC(5)); if (sparseLocL.ptr(2,2, false) != NULL) cerr << "filled"; Vec5f elm = sparseLocL.ref(2,2); else cerr << "empty";

"empty";