You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Btw, instead of using complex image recognition algos there's simpler way I've discoverd, Python method:
import base64
from PIL import Image
import io
def readPort(base64str):
tablePort={75:"0",36:"1",48:"2",56:"3",55:"4",58:"5",47:"6",44:"7",62:"8",69:"9"}
pic=base64.b64decode(base64str)
i=Image.open(io.BytesIO(pic))
digits=list()
digit=0
for x in range(0,i.width):
row=0
for y in range(0,i.height):
p=i.getpixel((x,y))
if(p==1):
digit+=p
row=1
if(not row):
if(digit):digits.append(digit)
digit=0
try:
captcha=""
for d in digits:
captcha+=tablePort[d]
return int(captcha)
except:
return digits
Each digit has always the same amount of pixels excluding some noise pixels with values >1
The text was updated successfully, but these errors were encountered:
Cool, thanks for the suggestion. The image recognition I use is Tesseract OCR, and its loaded on my VPS. It takes less a very short amount of time to process such a small image, and also doesn't use up many resources on my vps, but it would still be good to not have it rely on my server staying online.
I never had much experience with image recognition software and the one I've tried to use at fist didn't do a good job solving this "captcha", so it just hit me that chars might have the same amount of pixels if noises are removed :-D
Btw, instead of using complex image recognition algos there's simpler way I've discoverd, Python method:
Each digit has always the same amount of pixels excluding some noise pixels with values >1
The text was updated successfully, but these errors were encountered: