Closed stakkitupp closed 5 years ago
Refer to my old account, sorry for duplicate questions
Sorry, I didn't see this question until now. If this is still an issue, please reopen the ticket and provide your full script.
img.convolute([ [1, 2, 1], [1, 5, 1], [1, 2, 1] ], 1/10); img.binarize(190); img.colorRegions(45, true);
Tried this code for the captcha but seems to small detect
Is this question regarding the same images at the start of this ticket?
Yes I think I am working on the same cpatcha
The first thing to note is that the characters are a different color than the background noise, so a good img.binarize(190)
separates out the colors really well.
There are always 4 characters, so you can use the new exact_characters: 4
option to always split large sections into smaller ones. Note that you'll need to download the latest version of the library to use that since I just added it.
With these settings you should be able to get high accuracy on this one.
var cbl = new CBL({
preprocess: function(img) {
img.debugImage("debugPreprocessed");
img.binarize(190);
img.debugImage("debugPreprocessed");
img.colorRegions(50, false, 1);
img.debugImage("debugPreprocessed");
},
character_set: "0123456789",
exact_characters: 4,
pattern_width: 16,
pattern_height: 16,
blob_min_pixels: 10,
blob_max_pixels: 200,
allow_console_log: true,
blob_console_debug: true,
blob_debug: "debugSegmented"
});
Wow , cool new featureļ¼Helped us a lot
img.binarize(220);
blob_min_pixels: 50, blob_max_pixels: 500, pattern_width: 20, pattern_height: 20,
I tried this one but when it go to segmented the size of each number is wrong .