代码效果测试

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

 灰度图

 边缘检测

 MSER+canny

 enhancedEdges

原图2

 灰度图

 边缘检测

 MSER+canny

 enhancedEdges

第二篇

代码地址: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

 灰度图

 加噪模糊

滤波

 边缘检测

 结果

 没有矫正,干扰边界太多

原图2

 灰度图

加噪模糊

滤波

边缘检测

结果

猜你喜欢

转载自blog.csdn.net/qq_40206924/article/details/128250809
今日推荐