首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >TesserAct和OpenCV

TesserAct和OpenCV
EN

Stack Overflow用户
提问于 2014-03-03 22:27:13
回答 2查看 1.4K关注 0票数 0

我刚刚下载并设法在两个不同的项目中分别运行了tesseract ocr和openCV。(新的opencv和tesseract兼容iOS 7)

我想把它们包含在一个单独的项目(目标)中。

问题是OpenCV需要使用libc++作为C++标准库。而TesserAct需要使用编译器默认作为C++标准库。

有没有办法同时设置它们,并告诉Xcode在opencv上使用libc++,在tesseract上使用编译器的默认值?

EN

回答 2

Stack Overflow用户

发布于 2014-03-05 18:39:55

你可以试试this example。我在这个项目中尝试了OpenCV的图像增强功能,我认为它相当不错。

票数 0
EN

Stack Overflow用户

发布于 2014-09-03 13:05:22

你可能是这样说的。我将分享我的经验,当我将完全成功OCR :)

代码语言:javascript
复制
cv::vector<cv::Mat> produceThresholds(const cv::Mat img_gray) {
const int THRESHOLD_COUNT = 4;
// Mat img_equalized = equalizeBrightness(img_gray);

cv::vector<cv::Mat> thresholds;

for (int i = 0; i < THRESHOLD_COUNT; i++)
    thresholds.push_back(cv::Mat(img_gray.size(), CV_8U));

int i = 0;

// Adaptive
// adaptiveThreshold(img_gray, thresholds[i++], 255, ADAPTIVE_THRESH_MEAN_C,
// THRESH_BINARY_INV , 7, 3);
// adaptiveThreshold(img_gray, thresholds[i++], 255, ADAPTIVE_THRESH_MEAN_C,
// THRESH_BINARY_INV , 13, 3);
// adaptiveThreshold(img_gray, thresholds[i++], 255, ADAPTIVE_THRESH_MEAN_C,
// THRESH_BINARY_INV , 17, 3);

// Wolf
int k = 0, win = 18;
// NiblackSauvolaWolfJolion (img_gray, thresholds[i++], WOLFJOLION, win, win,
// 0.05 + (k * 0.35));
// bitwise_not(thresholds[i-1], thresholds[i-1]);
NiblackSauvolaWolfJolion(img_gray, thresholds[i++], WOLFJOLION, win, win,
                         0.05 + (k * 0.35));
//bitwise_not(thresholds[i - 1], thresholds[i - 1]);

k = 1;
win = 22;
NiblackSauvolaWolfJolion(img_gray, thresholds[i++], WOLFJOLION, win, win,
                         0.05 + (k * 0.35));
//bitwise_not(thresholds[i - 1], thresholds[i - 1]);
// NiblackSauvolaWolfJolion (img_gray, thresholds[i++], WOLFJOLION, win, win,
// 0.05 + (k * 0.35));
// bitwise_not(thresholds[i-1], thresholds[i-1]);

// Sauvola
k = 1;
NiblackSauvolaWolfJolion(img_gray, thresholds[i++], SAUVOLA, 12, 12,
                         0.18 * k);
bitwise_not(thresholds[i - 1], thresholds[i - 1]);
k = 2;
NiblackSauvolaWolfJolion(img_gray, thresholds[i++], SAUVOLA, 12, 12,
                         0.18 * k);
//bitwise_not(thresholds[i - 1], thresholds[i - 1]);

return thresholds;
// threshold(img_equalized, img_threshold, 100, 255, THRESH_BINARY);
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22149272

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档