Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with this example with circles and different colors #50

Open
dsalcedo opened this issue Feb 25, 2020 · 1 comment
Open

Help with this example with circles and different colors #50

dsalcedo opened this issue Feb 25, 2020 · 1 comment
Labels

Comments

@dsalcedo
Copy link

dsalcedo commented Feb 25, 2020

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 🤔

@skotz
Copy link
Owner

skotz commented Feb 26, 2020

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 skotz added the question label Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants