android ndk矢量语法错误?

时间:2012-11-30 04:35:58

标签: android opencv vector android-ndk java-native-interface

我正在使用opencv | ndk | cd在android中,eclipse Juno Release。我将项目路径设置如下。

${NDK}\sources\cxx-stl\gnu-libstdc++\4.6\include
${NDK}\sources\cxx-stl\gnu-libstdc++\4.6\libs\armeabi-v7a\include
${NDK}/platforms/android-14/arch-arm/usr/include

但是当我使用矢量时,它会显示一些错误。如下面的代码所示,矢量对象匹配,不能使用某些方法,e.x。 matches.at(0)或甚至匹配[0]都是错误。 但方法matches.empty()或matches.push_back()运行良好。很困惑。

cpp源代码:

vector< DMatch > matches;
matcher.match( descriptors_object, descriptors_scene, matches );

double max_dist = 0; double min_dist = 100;

//-- Quick calculation of max and min distances between keypoints
for(vector<DMatch>::iterator it = matches.begin(), it < matches.end(), it ++){

}

for( int i = 0; i < descriptors_object.rows; i++ )
{
    double dist = matches[i].distance;
    if( dist < min_dist ) min_dist = dist;
    if( dist > max_dist ) max_dist = dist;
}

另外,上面的代码:

//-- Quick calculation of max and min distances between keypoints
for(vector<DMatch>::iterator it = matches.begin(), it < matches.end(), it ++){

}

当按F3去定义矢量时,eclipse显示矢量语法错误!让我选择要去的位置。

任何建议将不胜感激。 THX

0 个答案:

没有答案