Ask Your Question

Cat's profile - activity

2014-02-18 03:14:21 -0600 commented question Got Error Use of undeclared identifier 'ERStat' in XCode.

@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

2014-02-17 04:52:56 -0600 received badge  Supporter (source)
2014-02-17 03:39:52 -0600 asked a question 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.