cbl-js icon indicating copy to clipboard operation
cbl-js copied to clipboard

Help with this example with circles and different colors

Open dsalcedo opened this issue 5 years ago • 1 comments

sat1

sat2

sat3

sat4

sat5

img.removeGray(5);
img.binarize(150);
img.colorRegions(300, true);
Captura de Pantalla 2020-02-25 a la(s) 5 07 33 p  m

But not solved 🤔

dsalcedo avatar Feb 25 '20 23:02 dsalcedo

You could try removing the binarization step completely and directly re-coloring each blob. The idea would be to extract the circles outlining the letters instead of the letters themselves. The weakness of this CAPTCHA is that each letter is a different color, so you don't want to flatten the image to just black and white and lose that extra information.

var cbl = new CBL({
    preprocess: function(img)
    {
        img.debugImage("debugPreprocessed");
        img.colorRegions(5, true, 5);
        img.debugImage("debugPreprocessed");
    },
    exact_characters: 6,
    character_set: "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
    blob_min_pixels: 100,
    blob_max_pixels: 10000,
    pattern_width: 25,
    pattern_height: 25,
    perceptive_colorspace: true,
    allow_console_log: true,
    blob_console_debug: true,
    blob_debug: "debugSegmented"
});

image

Another option plays on the observation that there are always 6 characters and they're always in the same locations... You can mark the fixed character locations like this example.

skotz avatar Feb 26 '20 01:02 skotz