23 comments

[ 4.6 ms ] story [ 60.1 ms ] thread
What 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.
It 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.
Too similar :/
Looks like OP literally plagiarized the code in that article (and changed one or two variable names) without giving credit. Really bad form...
Yes, 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.

Agree, 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).

If 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).
Would be nice if a mod could change the link.
Especially as this submission continues to be upvoted.
I don't understand why more people haven't flagged this story.
Adrian, the author of the PyImageSearch blog here. Thank you for linking to the original article, I appreciate it.
This is an excellent article, definitely will be checking this blog more frequently
is canny edge detection better than adaptivethreshold for pre-filtering the image? The AR tag implementations I've looked at all seem to use adaptivethreshold.
co-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.)
I 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 :)
>Resolve issue regarding the use of scaled down image

run your pipeline on scaled down picture, reapply clipping and transform on full size one

Very nice writeup, I did something simmilar but not as usefull 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."

One 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?
If document have handwriting on it, so how can get them after scanning document.
Why is this flagged!?