skotz / cbl-js

JavaScript CAPTCHA solving library
MIT License
155 stars 47 forks source link

Any way with this one? #31

Open yaneony opened 5 years ago

yaneony commented 5 years ago

Hello! I'm trying to solve following Captcha.

1 2 3 4 5

I found out, that following settings are the best, but may be you have any suggestion how to improve the result?

                img.convolute([[0, -1, 0], [-1, 4.9, -1], [0, -1, 0]]);
                img.debugImage("debugPreprocessed");

                img.binarize(120);
                img.debugImage("debugPreprocessed");

                img.blur(1);
                img.debugImage("debugPreprocessed");

                img.binarize(120);
                img.debugImage("debugPreprocessed");

                img.colorRegions(50);
                img.debugImage("debugPreprocessed");

Thanks for this library! :D

skotz commented 5 years ago

You could try playing around with the pixelJump parameter of the colorRegions method. When color filling blobs it will group adjacent blobs together if they are pixelJump pixels away from each other or closer.

So if your segmentation results in a single character being split into multiple blobs like this:

image

Then with the pixelJump you could get something more like this:

image

img.colorRegions(50, false, 4);