Skip to content

How to use "Use Masks"?

1. What is Masks? Is that the shape of a char, then CB try to rotate to fit the captcha? and don't need OCR1~OCR3?
2. CB will first apply "use image filter", then apply "use masks", is that right? so mage filter is the most important, right?
3. When I clicked "Calculate"(1700 captcha), CB pops up "Same Mask for different Char! E vs H", how to solve this problem?


  • SvenSven

    1. Yes, but it does not rotate the char (not yet) as it would take too much time. You have to use segment-rotate as last filter if you want all chars to be rotated in the correct way.

    2. It will apply filters first and use the segmentation filter (required) to produce the masks for each char. It can however still solve by image filters only if the mask method didn't give a good reply.

    3. It usually highlights the entry in the list + the image it found it for. You can than see where this was input  wrong

  • OzzOzz
    edited August 2013
    3. one thing which has driven me crazy for a while was to find the bad apple as when the wrong captcha was calculated first then it showed the problem for the correct solved one.
    you can find the bad apple when changing the sorting of your captchas from z-a or a-z. then CB will calculate the good one first and show you the bad one instead. you need to click "clear" before each new calculation obviously then.

    this error message also appear if the characters are not segmented the right way. this happens when two characters are glued together for instance. i normally delete all captchas with "glued characters" first before doing the calculation. then you might notice that it segment a character like "i" into "|" and "."

    example: image
  • edited August 2013
    2. Then how to optimize image filter for "use masks"?
    I found it's a different story to optimize image filter for OCR and masks. I use the same image filter, but get very different results as follows,


    4. So the most important part for "use masks" is to use the image filter to segment the char, then generate the mask. right?  but how can I judge which filter is right for Masks?

  • OzzOzz
    edited August 2013
    without knowing which captcha this is i would suggest to try the "keep color" filter multiple times until you got all "character colors". if you are lucky then it will only kept the letters without the circles and background noise. then it is easy to get 100% with the "use masks" method.
  • @Ozz  Thank you! I think I have known more about masks now.
    I think "brute force" is useless in using mask. We have to manually choose the right filter.

  • OzzOzz
    edited August 2013
    Just saw that this is for the chinese Discuz! BBS.

    Based on the captchas from this URLs I suggest to download and install my definition and go from there:

    Just add some of your captchas and do the calculation. Afterwards add some "uncalculated" captchas to the list to see if they are working as expected. To me it seems like a 100%er but I also saw some modifications of this captchas on some of the sites I checked :)

    When you are done upload the definition to the user database so Sven can add that to the next release of CB.

  • OzzOzz
    edited August 2013
    @bluescharp: brute force is not entirely useless. sometimes it helps to get a clean image which can be used for the "Use Masks" method.

    for this case it was pretty simple though as they "shadowed" the characters in black. i just kept the black color, thickened it a bit with "Minimum" and seperated the chars with the "SegmentV" filter (which is an awesome filter that Sven coded). but i guess i have the most experience of the SDK along with Sven of course since i'm using it since the first open beta release. most things i do are just based on my experience i got through trial and error.
  • SvenSven
    @Ozz that definition you made can be improved and than used for hash method. Much faster and 100% correct. Will try to work on that.
  • edited August 2013
    1. "hash values" is only for static chars, why can we use it in this situation?
    2. how to improve? any thought or steps for improving?
    3. how to upload to user share area?
  • @Ozz, you are genius :D   
    I don't want just solve this captcha, but to learn how to use CB and these filters really mean. :-j  
  • I find a filter named "Use Image as Mask", how does it work? Can i generate a mask myself as follow, in photoshop etc?

  • if you are good at photoshop you can use the "use image as mask" filter. however, i think that the best practice for this filter is to download the captcha from the developer site of the engine and watch out for captcha backgrounds in that file. then you are able to use those backgrounds as masks to clean the captcha.
Sign In or Register to comment.