Open Nipis opened 3 years ago
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.
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.
Thanks!
Now I have this error when I click on Solve
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.
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">
Sorry, this was the error:
img.debugImage("debugPreprocessed");
It's solved.
Thanks!!
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" });