5 ms·
An OpenCV-based document scanner in Python
- tomcam 10y agoWhat a resource! Just check out the link for a visual representation of what it does, which is to take a potato-quality, poorly-angled picture of a receipt and convert it to text, all in about 120 lines of very well documented code.
- lisper 10y agoIt doesn't go down to text, and I think the image quality is probably not good enough to do reliable OCR. Still great for archiving though.
- sforzando 10y agoI really enjoyed your step-by-step explanation of the pipeline: http://vipulsharma20.blogspot.in/2016/01/document-scanner-using-python-opencv.html http://vipulsharma20.blogspot.in/2016/01/document-scanner-us... Great job! Computer vision is a really exciting field, and there are many exciting things you can do with it.
- rawnlq 10y agoSimilar: http://www.pyimagesearch.com/2014/09/01/build-kick-ass-mobile-document-scanner-just-5-minutes/ http://www.pyimagesearch.com/2014/09/01/build-kick-ass-mobil...
- shekkizh 10y agoToo similar :/
- jdiez17 10y agoLooks like OP literally plagiarized the code in that article (and changed one or two variable names) without giving credit. Really bad form...
- vipul20 10y agoYes, I totally understand the concern. I obviously referred the blog post and there was no intention of mine to plagiarize the content and take sole credit. I am deeply indebted to the open source community and to all the people sharing their knowledge on the internet. Its because of people like them, I am able to learn and grow throughout. I'll do the needful and add credits to the article wherever possible. Thanks.
- gingerlime 10y agoAgree, and I have to say the note he later added to his blog (not even on GH) doesn't sound too convincing. I think he did a great job demonstrating this, and also the discussion on HN brought the original pyimagesearch.com blog post to people's attention. That's a net positive. I'm wondering about the code license though. The code posted on Github is licensed as MIT, but the pyimagesearch code doesn't seem to indicate any license (I downloaded it by registering my email address).
- jdiez17 10y agoIf there is no explicit license that comes with the code, copyright applies by default and you can't reproduce the code without permission from the author (at least in theory).
- frozenport 10y agoWould be nice if a mod could change the link.
- zionsrogue 10y agoAdrian, the author of the PyImageSearch blog here. Thank you for linking to the original article, I appreciate it.
- smcl 10y agoThis is an excellent article, definitely will be checking this blog more frequently
- Jack000 10y agois canny edge detection better than adaptivethreshold for pre-filtering the image? The AR tag implementations I've looked at all seem to use adaptivethreshold.
- eikaramba 10y agoco-founder of fileee.com here(we do that for a living :) ). I can tell you that in general adaptivethreshold is better, because it is less error prone against low contrast situations and missing edges. That said there are also cases where canny performs better. That's why we actually decided to use a machine learning approach to decide when to use what. There are even more things one can do to improve the detection(e.g. hough tranform to find edges or use variance or fft to assest whether possible "document" candidates are just garbage rectangles or real documents.)
- mendeza 10y agoI am interested in learning more about using variance and fft to finding boundary in documents? Can you elaborate or link any good resources to learn more about this, I'm very interested in learning :)
- nojvek 10y agocanny and adaptive threshold can go hand in hand. i.e you can threshold an image and then apply canny. Adaptive threshold turns the image into binary (either white or black) and it works great when there are big shadows. e.g http://www.aforgenet.com/framework/docs/html/img/imaging/sample20.png http://www.aforgenet.com/framework/docs/html/img/imaging/sam... -> http://www.aforgenet.com/framework/docs/html/img/imaging/bradley_local_thresholding.png http://www.aforgenet.com/framework/docs/html/img/imaging/bra...
- rasz_pl 10y ago>Resolve issue regarding the use of scaled down image run your pipeline on scaled down picture, reapply clipping and transform on full size one
- jeena 10y agoVery nice writeup, I did something simmilar but not as usefull https://jeena.net/catdog https://jeena.net/catdog "The goal of this project was to give a computer a drawing of either a cat's or a dog's face and let it recognize with high probability whether a cat or a dog is shown."
- criddell 10y agoOne thing that Evernote has always done very well for me, is make scanned documents searchable. How much of a stretch would it be to take something like this, find the areas containing text, and do OCR?
- walkalone 10y agoIf document have handwriting on it, so how can get them after scanning document.
- smcl 10y agoWhy is this flagged!?