Got Error Use of undeclared identifier 'ERStat' in XCode.
I'm trying to run textdetection in Xcode. First: I added opencv2.framework 2.4.8 to project. And added file textdetection.mm to my project.
https://github.com/Itseez/opencv/blob/685eceb68ade4b579cdce7cb41e9888e274a7093/samples/cpp/textdetection.cpp
After a few editting, my header changed to this:
#import "ImageProcessor.h"
#include "opencv2/opencv.hpp"
#include <opencv2/objdetect/objdetect.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <vector>
#include <iostream>
#include <iomanip>
using namespace std;
using namespace cv;
void show_help_and_exit(const char *cmd);
void groups_draw(cv::Mat &src, vector<cv::Rect> &groups);
void er_show(vector<cv::Mat> &channels, vector<vector<ERStat> > ®ions);
But I got error:
/*/textdetection.mm:50:19: Use of undeclared identifier 'ERStat'
/*/textdetection.mm:39:5: Use of undeclared identifier 'computeNMChannels'
/*/textdetection.mm:47:9: Unknown type name 'ERFilter'; did you mean 'CIFilter'?
/*/textdetection.mm:47:50: Use of undeclared identifier 'loadClassifierNM1'
/*/textdetection.mm:48:50: Use of undeclared identifier 'loadClassifierNM2'
I've tried to change ERStat to cv::ERStat, but it still got error. Could you show me what am I missing? Thank you.
that sample is from the 3.0(master) branch, you're on 2.4.8. i don't think you can use it.
@berak: I got it. Thank you. Do you know if there is a way to add all temporary OpenCV source to Project? I've asked in stackoverflow but I'm still stuck with this: http://stackoverflow.com/questions/21846773/how-to-add-opencv-source-not-stable-built-framework-to-xcode-project
bear with me for not knowing anything about apple, but the only way to get 3.0 is , get the src from github, run cmake, build it.
and afaik, the 2.4 and the 3.0 branch are not binary compatible, so 'cherry-picking' some features from 3.0 into your 2.4 version will not work.
I tried to compile this sample, but the same ERFilter include problem persists under Ubuntu. The installed 3.0 branch does not seem to contain this header file (although in the downloaded branch the header does exist). Beside manual include, any suggestion to overcome this compilation problem would be appreciated.
This file seems to be missing from Github now. Was it removed from the project?
https://github.com/Itseez/opencv/tree...