c++ - Opencv 3.0 features2d.hpp error : unknown AlgorithmInfo -


i'm developing project using opencv3.0 module found in opencv_contrib github. im using xcode 7.0, yosemite 10.10. have done setting in xcode

header search path : /users/kimloonghew/documents/opencv/opencv-3.0.0/build/include /usr/local/cellar/libiomp/20150401/include/libiomp/omp.h /usr/local/include

library search path : /users/kimloonghew/documents/opencv/opencv-3.0.0/build/lib /usr/local/lib

other linker flag : -lopencv_calib3d -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lopencv_ml -lopencv_objdetect -lopencv_photo -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videoio -lopencv_videostab -lopencv_nonfree -lopencv_ml -lopencv_xfeatures2d

here code below:

#include <stdio.h> #include <stdlib.h>  #include <iostream> #include <fstream> #include <dirent.h> #include <string> #include <unistd.h> #include <sys/stat.h> #include <sys/types.h>  #include <opencv2/core.hpp> #include <opencv2/opencv.hpp> #include <opencv2/features2d/features2d.hpp> #include <opencv2/nonfree/nonfree.hpp> #include <opencv2/xfeatures2d.hpp> #include <opencv2/nonfree/features2d.hpp> #include <opencv2/ml/ml.hpp>  using namespace std; using namespace cv;  int main(int argc, const char * argv[]) {     int minhessin = 400;      string dir = "/users/dyklhew/documents/food_proj/mit/foodcamimages/train", filepath;     dir *dp;     struct dirent *dirp;     struct stat filestat;      dp = opendir(dir.c_str());      surffeaturedetector detector(minhessin);     //ptr<xfeatures2d::surf> detector = xfeatures2d::surf::create(minhessin);     vector<keypoint> keypoints, keypoints_scene;      mat descriptors_object, descriptor_scene;     mat img;      cout << "------- build vocabulary ---------\n";      cout << "extract descriptors.."<<endl;      int count = 0;      while (count++ < 15 && (dirp = readdir(dp))) {         filepath = dir + "/" + dirp->d_name;          if(stat( filepath.c_str(), &filestat )) continue;         if(s_isdir(filestat.st_mode))           continue;          img = imread(filepath);          detector.detect(img, keypoints);           cout << ".";     }     cout << endl;     closedir(dp);      cout << "total descriptors : " << count << endl;      //bowkmeanstrainer bowtrainer(150);       return 0; } 

when run file, build fail errors detected in featuares2d.hpp files. errors below 1) unknown type name 'algorigthminfo'; did mean 'algorigthm'? 2) no template named 'vector'; did mean 'std::vector?'

anything did wrong when setup or installing opencv? or linkpath have define? appreciated, advice. thanks

issues solved:

xcode compiler smart , able predict solutions match current machine configuration. if follow suggestion given xcode compiler, issues solve.

system not recognise algorigthminfo, may change algorigthm vector std::vector.

now working opencv in machine.

hope, others if facing same issues.


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -