Closed BillRizer closed 6 years ago
The blob segmentation step creates a separate character for each distinct color in the image, so in the last step of preprocessing you need to give each character a different color with colorRegions(). Without that step it tries to create a single character out of everything black and then resize it to 24x24.
Another trick I use when dealing with CAPTCHAs with lines in them is to remove the lines (as you already did) then blur them to rejoin the sections of each letter back together, then re-binarize and colorize. It actually works quite well.
preprocess: function(img) {
img.binarize(32);
img.debugImage("debugPreprocessed");
img.blur(1);
img.debugImage("debugPreprocessed");
img.binarize(255);
img.debugImage("debugPreprocessed");
img.colorRegions(40, true);
img.debugImage("debugPreprocessed");
}
Hope that helps!
Hi, Thank you very much, it worked very well. your project is excellent, it helped me a lot. You are a ninja.. ⚔️
Hello, I'm trying to solve the captcha: https://image.ibb.co/ePUrBH/3.jpg
but I'm not getting it, it does not seem to identify all the characters
After using the filter apparently the captcha is well cleaned, what am I doing wrong? https://image.ibb.co/jztCJx/ccc.png 😄