Looks much better than the original photos. On a slightly related note, camscanner, an app for android (and IOS?) does something similar, but can also correct for the angle at which the photo was taken (I think it has to detect squares/rectangles in the photo). Does anyone know if this is possible using the command line too?
Show HN: Digitizing photos of whiteboards using the command line
21–30 of 37 posts
Re: Show HN: Digitizing photos of whiteboards using the command line
#22I'm having the same issue as magus: https://gist.github.com/lelandbatey/8677901#comment-1204432
@molven, @vibragiel: Wow, I feel more than a bit ridiculous after looking into this. Turns out, those original examples I made using GIMP (same basic process, tuned the parameters to make it look nice). I'd originally put this gist together several months ago, and I hadn't done a thorough enough check before submitting to HN.
HOWEVER, I've since created new examples actually using the bash script, and the gist has been updated accordingly.
You can get these images here:
> Input1 - http://i.imgur.com/27aDJ6b.jpg
> Input2 - http://i.imgur.com/LaRWFT4.jpg
> Output1 - http://i.imgur.com/xMxM8P2.png
> Output2 - http://i.imgur.com/E3XoM3e.png
Re: Show HN: Digitizing photos of whiteboards using the command line
#23Nice idea, would it be possible to do some OCR at the end?
Input image - http://i.imgur.com/6o5FwxG.jpg
Output image - http://i.imgur.com/7OIOxfO.png
I tried to use vanilla Tesseract on it, but I had no luck getting anything usable out of it.
Re: Show HN: Digitizing photos of whiteboards using the command line
#24Re: Show HN: Digitizing photos of whiteboards using the command line
#25On a side note. I don't like gists. I didn't want to stray off topic so I put my complaints about gists here: https://news.ycombinator.com/item?id=7521600
Re: Show HN: Digitizing photos of whiteboards using the command line
#26#!/bin/bash
convert "$1" -morphology ...
Re: Show HN: Digitizing photos of whiteboards using the command line
#27Re: Show HN: Digitizing photos of whiteboards using the command line
#28Re: Show HN: Digitizing photos of whiteboards using the command line
#29If you want to handle input file names including spaces, just wrap the $1 into parens: #!/bin/bash convert "$1" -morphology ...
Re: Show HN: Digitizing photos of whiteboards using the command line
#30I had to sacrifice some quality in order to be able to do this with realtime video, but still, I should probably work out exactly what processing that command actually does and see if I can improve quality while still meeting the realtime requirement.
Thanks for sharing.