weired compiler error warning "Can't compare structures"

asked 2018-04-07 11:54:45 -0600

open_ranger gravatar image

This line of code in my Android Studio project JNI function gives error message

for(size_t i=0;i<lines.rows;i++){
     if (lines.at<Vec3d>(i)!=Vec3d(0,0,0))
        lines_temp.push_back(lines.at<Vec3d>(i));
}

lines is a N x 1 3 Channels 64bit double Mat. image description But the code complies and runs fine. How do I get this out of the way?

edit retag flag offensive close merge delete

Comments

try to add the namespace, like in c++, you have to use cv::vec3d

Kenny Karnama gravatar imageKenny Karnama ( 2018-04-08 02:12:17 -0600 )edit

already declared namespace cv

open_ranger gravatar imageopen_ranger ( 2018-04-08 02:59:52 -0600 )edit

one part of your IDE (wrongly) thinks, it is C, not C++.

maybe renaimg the file to .cpp or such helps

berak gravatar imageberak ( 2018-04-08 04:54:02 -0600 )edit