Coder Social home page Coder Social logo

图片预处理 about card-ocr HOT 7 CLOSED

isee15 avatar isee15 commented on July 18, 2024
图片预处理

from card-ocr.

Comments (7)

isee15 avatar isee15 commented on July 18, 2024

目前在图片已经提取出来的情况下,主要用opencv处理的。二值化,腐蚀,膨胀,轮廓检测。http://www.jianshu.com/p/ac4c4536ca3e
如果要从背景里面提取图片,比如手持的身份证,那么可以用深度学习的目标检测的一些方法RCNN->SPP->Fast RCNN->Faster RCNN->YOLO->SSD->YOLO2->Mask RCNN。之前看美团用的简化版的Faster RCNN。但我对RCNN还看不明白,也缺少训练样本。

from card-ocr.

KevinGong2013 avatar KevinGong2013 commented on July 18, 2024

如果身份证整体比较暗,直接二值化很难把身份证的底纹去掉,会大大影响识别率。

from card-ocr.

isee15 avatar isee15 commented on July 18, 2024

当需要适应不同亮度的时候,二值化的阈值可以动态算。比如opencv里面有THRESH_OTSU。
同时opencv里面有些降噪的方法比如fastNlMeansDenoisingColored也能把底纹过滤一些。

from card-ocr.

KevinGong2013 avatar KevinGong2013 commented on July 18, 2024

openCV的体积有点感人~

from card-ocr.

isee15 avatar isee15 commented on July 18, 2024

自己实现对应的算法也行,ostu算法大概100行

from card-ocr.

o70078 avatar o70078 commented on July 18, 2024

不知道图片摆正如何实现?
我之前尝试用opencv 寻找直线 + 透视变换,想把一个斜着拍的卡片摆正,不过效果很差.
楼主有什么好办法吗?

from card-ocr.

KevinGong2013 avatar KevinGong2013 commented on July 18, 2024

我用苹果提供的api 直接进行一次 透视矫正效果就蛮好了。你阔以试试看

from card-ocr.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.