Open mmoohammed opened 4 years ago
Since the system only uses numbers, you can set character_set: "0123456789"
, and since there are exactly 6 digits in each image, you can set exact_characters: 6
. You can also crop off the border and somewhat bypass segmentation by just brute forcing the exact character split (which was recently added and fixed, so please download the latest version of the library).
I'd play around with these settings and see what you can get.
var cbl = new CBL({
preprocess: function(img) {
img.debugImage("debugPreprocessed");
img.binarize(150);
img.debugImage("debugPreprocessed");
img.cropRelative(35, 2, 35, 2);
img.debugImage("debugPreprocessed");
},
character_set: "0123456789",
exact_characters: 6,
exact_characters_width: 17,
exact_characters_play: 10,
blob_min_pixels: 20,
blob_max_pixels: 1000000,
pattern_width: 40,
pattern_height: 30,
allow_console_log: true,
blob_console_debug: true,
perceptive_colorspace: true,
blob_debug: "debugSegmented"
});
It's not perfect, but it's a start.
Can you please help to solve this kind of Captcha it is 6 numbers with line (Thank you so much for your examples and your efforts) I just modified the index in the elvincth example as follow : var cbl = new CBL({ preprocess: function(img) { img.debugImage("debugPreprocessed"); img.binarize(168); img.debugImage("debugPreprocessed"); img.convolute([ [1, 0, 1], [0, 1, 0], [1, 0, 1] ], 0.44); img.debugImage("debugPreprocessed"); img.blur(); img.debugImage("debugPreprocessed"); img.binarize(75); img.debugImage("debugPreprocessed"); img.colorRegions(40, true); img.debugImage("debugPreprocessed"); }, character_set: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", blob_min_pixels: 20, blob_max_pixels: 800, pattern_width: 40, pattern_height: 30, allow_console_log: true, blob_debug: "debugSegmented" }); I got this
after
![test4-4](https://user-images.githubusercontent.com/3620374/66327450-8544e700-e933-11e9-9736-eb04b29e3fc6.jpg)
please help with this - thank you