Skip to content

Instantly share code, notes, and snippets.

@samirfor
Created August 14, 2018 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samirfor/5cd01da241d4a4b1f4fec4c41a82d388 to your computer and use it in GitHub Desktop.
Save samirfor/5cd01da241d4a4b1f4fec4c41a82d388 to your computer and use it in GitHub Desktop.
PJe Captcha Decoder
#!/bin/sh
# Dependencies: convert=ImageMagick and Tesseract
INPUT=$1
convert $1 -scale 200% -negate -morphology erode octagon:2 -negate -threshold 80% out.png
tesseract -psm 8 -c tessedit_char_whitelist=0123456789 out.png -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment