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

I can't make a trainer #60

Open
Nipis opened this issue Nov 23, 2020 · 5 comments
Open

I can't make a trainer #60

Nipis opened this issue Nov 23, 2020 · 5 comments
Labels

Comments

@Nipis
Copy link

Nipis commented Nov 23, 2020

46BH
DGPC
M7FN
MFMM
N6YJ
RTAJ
Y2TP

var cbl = new CBL({
preprocess: function(img) {
img.debugImage("debugPreprocessed");
img.removeLight(230);
img.debugImage("debugPreprocessed");
},
character_set: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",
exact_characters_width: 26,
exact_characters_play: 4,
exact_characters: 4,
blob_min_pixels: 300,
blob_max_pixels: 10000,
blob_max_width: 80,
pattern_width: 50,
pattern_height: 50,
allow_console_log: true,
blob_console_debug: true,
perceptive_colorspace: false,
blob_debug: "debugSegmented"
});

@Nipis Nipis added the question label Nov 23, 2020
@skotz
Copy link
Owner

skotz commented Nov 24, 2020

This one might be difficult due to the noise, colors, and potentially overlapping letters. I think what you want to play around with is the pixel jump setting (third parameter of colorRegions) to hopefully connect all of the darker grey pixels into single characters.

Here's a good example.

Basically that'll consider pixels to be part of the same blob even if they're n pixels away from each other.

Seems like the other settings you have are heading in the right direction.

@Nipis
Copy link
Author

Nipis commented Nov 25, 2020

Thanks!

Now I have this error when I click on Solve

image

@skotz
Copy link
Owner

skotz commented Nov 25, 2020

Without seeing all the code, I'd guess there's probably a reference to a div id that doesn't exist. So if you have blob_debug: "debugSegmented" then you need a <div id="debugSegmented"></div> somewhere. Same for img.debugImage("debugPreprocessed") and cbl.visualizeModel("visualizeModel") and anything else that references a div id.

@skotz
Copy link
Owner

skotz commented Nov 25, 2020

And if it's when you click solve then it's probably missing one of these:

cbl.solve("captcha").done(function (solution) {
    document.getElementById('solution').value = solution;
});
<img id="captcha" src="someimage.png" />
<input type="text" id="solution">

@Nipis
Copy link
Author

Nipis commented Nov 25, 2020

Sorry, this was the error:
img.debugImage("debugPreprocessed");
It's solved.

Thanks!!

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