skotz / cbl-js

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

What about this kind? #69

Open iHamex opened 2 years ago

iHamex commented 2 years ago

I have tried all your examples but none of them helps. CAPTCHA images are: captcha captcha1 captcha2 captcha3

So far I did:

var cbl = new CBL({
    preprocess: function(img) {
        img.invert();
        img.removeLight(50);
        img.binarize(255);
        //img.sharpen();
        img.invert();
        img.debugImage("debugPreprocessed");

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

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

        img.removeLight(10);
        img.binarize(50);
        img.debugImage("debugPreprocessed");

        img.binarize(220);
        img.colorRegions(50, false, 6);
    },
    character_set: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
    exact_characters: 6,
    exact_characters_width: 30,
    exact_characters_play: 10,
    blob_min_pixels: 1,
    blob_max_pixels: 2200,
    pattern_width: 40,
    pattern_height: 40,
    allow_console_log: true,
    blob_console_debug: true,
    perceptive_colorspace: true,
    blob_debug: "debugSegmented"
});

current result:

res

Any advice?

skotz commented 2 years ago

You could try to play off the fact that the lines are slightly darker than the letters, but with the distortion and large character set it'll probably be difficult to get good results on this one.