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.
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.