代码效果测试

ROBUST TEXT DETECTION IN NATURAL IMAGES WITH EDGE ENHANCED MAXIMALLY STABLE EXTREMAL REGIONS

代码地址:https://github.com/akab/TextDetection

基本步骤:

1)将原图转为灰度图;

2)使用OpenCV的canny函数进行边缘检测;

3)使用OpenCV的MSER检测文字区域;

4)将2)和3)结果的交集认为是文字区域;

5)使用OpenCV的morphologyEX函数在保留轮廓的情况下突出4)中结果的边缘。

测试效果: 

原图1

代码效果测试_第1张图片

 灰度图

 边缘检测

代码效果测试_第2张图片

 MSER+canny

代码效果测试_第3张图片

 enhancedEdges

代码效果测试_第4张图片

原图2

 灰度图

 边缘检测

代码效果测试_第5张图片

 MSER+canny

代码效果测试_第6张图片

 enhancedEdges

代码效果测试_第7张图片

第二篇

代码地址:GitHub - yunjuanwang/OCR-character-detection: This is part of the project. The goal is to process the image, using edge detection, grayscale image, noise reduction, layout analysis to split the text into each single characterThis is part of the project. The goal is to process the image, using edge detection, grayscale image, noise reduction, layout analysis to split the text into each single character - GitHub - yunjuanwang/OCR-character-detection: This is part of the project. The goal is to process the image, using edge detection, grayscale image, noise reduction, layout analysis to split the text into each single characterhttps://github.com/yunjuanwang/OCR-character-detection

测试效果:

原图1

代码效果测试_第8张图片

 灰度图

代码效果测试_第9张图片

 加噪模糊

代码效果测试_第10张图片

滤波

代码效果测试_第11张图片

 

 边缘检测

代码效果测试_第12张图片

 结果

代码效果测试_第13张图片

 没有矫正,干扰边界太多

原图2

 灰度图

代码效果测试_第14张图片

加噪模糊

代码效果测试_第15张图片

滤波

代码效果测试_第16张图片

边缘检测

代码效果测试_第17张图片

结果

 

你可能感兴趣的:(OCR,opencv)