Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

SparseMat::ptr<> yields "invalid overload of 'ptr'"

This is in static analysis with Eclipse. The compiler also recognizes the instantiation as being in error. Specifically, the line: if (sparseLocL.ptr< cv::Vec6f >(y_R_idx,x_C_idx, false) != NULL){ yields the following error: error: expected primary-expression before ‘>’ token I do not see an extraneous '>' and I don't see a problem with the previous line or two. This link uses the same syntax as my line: http://stackoverflow.com/questions/15762174/opencv-how-to-check-if-element-exists-in-sparsemat

It is happy with: NewLocValL_H = sparseLocL.ref< cv::Vec6f >(y_R_idx,x_C_idx)[H]; and that is immediately after the if statement.

I'm running Ubuntu 12.04 with gcc 4.7 native compile on an AMD-64 processor. The version of Eclipse that I am using is Luna modified to be TI's Code Composer Studio 6.1.

I declare sparsLocL as: SparseMat sparseLocL( 2, sparseSize, CV_32FC(6)); //only 5 are used

I tried declaring as: SparseMat *sparseLocL( 2, sparseSize, CV_32FC(6)); //only 5 are used and it made no difference.

Any ideas on where to look for the root cause?