Advertisement
Guest User

Untitled

a guest
Jul 1st, 2010
1,320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.57 KB | None | 0 0
  1. #!/bin/bash
  2. ffmpeg -i "$1" -r 2 -f image2 frames%05d.png &> /dev/null
  3. for f in frames*.png; do
  4.     convert $f -matte -fuzz 30% -transparent red -channel A -negate +channel -background white -flatten ${f}-result.png
  5.     convert ${f}-result.png ${f}-result.pbm
  6.     convert ${f}-result.pbm ${f}-result.tif
  7.     #gocr ${f}-result.pbm >> lst.txt
  8.     tesseract ${f}-result.tif ${f}-result &> /dev/null
  9. done
  10. grep -Pioh '^[a-z0-9]+$' *.txt|sort|uniq -c| sort -nr
  11.  
  12. ---
  13. $ ~/l337/captcha.sh /tmp/FlashCUVj3l
  14.       4 GWZ
  15.       2 GNL
  16.       1 M2
  17.       1 JZ
  18.       1 GW
  19. ---
  20.  
  21. yes, GWZ is correct :P
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement