Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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> > &regions);

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.

click to hide/show revision 2
retagged

updated 2014-02-17 03:57:33 -0600

berak gravatar image

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> > &regions);

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.