Show Notes: Episode 94


  • Breaking CAPTCHA using Human Activity Recognition
    Assistant Prof., Vision & Media Lab, SFU

    A CAPTCHA is a program that can generate and grade tests that:

    * Most humans can pass, BUT
    * Current computer programs can’t pass

    CAPTCHA stands for “Completely Automated Public Turing test to Tell Computers and Humans Apart”. The concept of a CAPTCHA is motivated by real-world problems faced by internet companies such as Yahoo! and Hotmail. These companies offer free email accounts, intended for use by humans. However, they found that many online vendors were using “bots”, computer programs that would sign up for thousands of email accounts, from which they could send out masses of junk email. By requiring the user to solve a CAPTCHA, in the case of Yahoo the word-based one called EZ-GIMPY shown above, the “bots” could be screened out.

    We have developed an algorithm that can break EZ-Gimpy and Gimpy, examples of word-based CAPTCHAs. There are two reasons for performing this work.

    For computer vision researchers, CAPTCHAs provide useful challenge problems. If we are able to solve CAPTCHAs, it will mean that we have made progress towards solving useful problems such as performing optical character recognition (OCR) on old books where letters and words have been distorted or smudged.

    The fundamental ideas behind our approach to solving Gimpy are the same as those we are using to solve generic object recognition problems. Our solution to the Gimpy CAPTCHA is just an application of a general framework that we have used to compare images of everyday objects and even find and track people in video sequences. The essences of these problems are similar. Finding the letters “T”, “A”, “M”, “E” in an image and connecting them to read the word “TAME” is akin to finding hands, feet, elbows, and faces and connecting them up to find a human. Real images of people and objects contain large amounts of clutter. Learning to deal with the adversarial clutter present in Gimpy has helped us in understanding generic object recognition problems.

    The second reason is to demonstrate the lack of effectiveness in certain variants of CAPTCHAs as “security” mechanisms. The term “security through obscurity” refers to keeping secret defense mechanisms, in this case those against spammers. Arguments can be made that this is not an advantageous type of security, that it is better to know how secure a mechanisms such as a CAPTCHA is. This way, one can know how much to rely on CAPTCHAs versus other security approaches such as IP-blocking. In addition, we have used the knowledge gained from breaking the first generation of CAPTCHAs (such as EZ-Gimpy) to help companies design more effective ones which are quite difficult to break.

    RELATED WEBSITE LINKS

    Breaking a Visual CAPTCHA
    http://www.cs.sfu.ca/~mori/research/gimpy/

    My personal website:
    http://www.cs.sfu.ca/~mori/

    SFU Vision and Media Lab website:
    http://www.cs.sfu.ca/research/groups/VML/index.html


  • Scary Stuff: Zombies and Vampires in Photoshop
    www.MacMerc.com

    Intro
    Almost every Halloween party I’ve ever attended has had most of the same components: stale candy from a bulk bag, a rotting pumpkin that was carved too early in the season, that cardboard skeleton cutout with the posable limbs and the one guy who didn’t bother to come up with a costume and showed up in his regular street clothes. The reason that guy seems to be at every Halloween party I attend is that, nine times out of ten, he’s me.

    After the party’s over, the pictures start to circulate and I get to be embarrassed all over again. In this tutorial, I’m going to show you how you can use Photoshop to transform pictures of ordinary people into pictures of the living dead—either vampires or zombies—and maybe then I can edit those party pictures so that I don’t look like such a party pooper.

    Zombie
    I have chosen to “zombify” this picture of Sean Carruthers from The Lab’s Flickr gallery:If you can choose a photo where the eyes of your subject are open and their teeth are visible, that is preferable…1 out of 2 ain’t bad. It also helps if your subject has a surprised expression on their face and I’ll show you why in a little bit.
    The zombie effect is going to be applied in 5 adjustment layers. Here they are:

    1) Ghastly pallor
    Under the Layer menu choose New Adjustment Layer>Hue/Saturation…
    When the Hue/Saturation dialog comes up, crank the Saturation to +50 and the Lightness to +10
    Now adjust the Hue slider until your subjects skin is green, blue or purple.
    Then you can drop the Saturation down to −80. We only cranked it up so that you could choose a skin color easily.
    Click OK.
    When you come out of the Hue/Saturation dialog box, you’ll have the mask of your new adjustment layer selected. Select All (Crtl-A on the PC, Command-A on the Mac) and Delete.
    Now with a brush, carefully paint in the skin tone of your subject.

    2) Lifeless eyes
    Under the Layer menu again choose New Adjustment Layer>Hue/Saturation…
    In the Hue/Saturation dialog, drop the Saturation down to −75 and raise the Lightness until you can barely see the subject’s irises (+70 was enough for this picture of Sean)
    Click OK.
    As before, when you come out of the Hue/Saturation dialog box, you’ll have the mask of your new adjustment layer selected. Select All (Crtl-A on the PC, Command-A on the Mac) and Delete.
    Now with a brush, carefully paint in the eyes of your subject.

    3) Shadows
    For the zombie’s pallor to really be effective, if has to have something to contrast it—shadows.
    Under the Layer menu again choose New Adjustment Layer>Curves…
    When the Curves dialog comes up, click a point on the diagonal line running from the top right to the bottom left of the chart and plug a value of 90 into the Output field and 150 into the Input field and click OK.

    As with the other two adjustment layers, when you come out of the Curves dialog box, you’ll have the mask selected. Select All (Crtl-A on the PC, Command-A on the Mac) and Delete.
    With a soft-edged brush, paint over the shadows and details of your subject’s face including the nose, lips, around the eyes, ears, hollows of the cheeks, and around the circumference of the face.
    You should really start to see your zombie coming together…or…falling apart…or, whatever.
    In the Layers palette, you probably have the Shadows (Curves) adjustment layer still highlighted. Just Ctrl-click (PC) or Command-click (Mac) the Lifeless Eyes adjustment layer to highlight it as well and then go up to the Layers menu and choose Create Clipping Mask to restrict the coverage of these two adjustment layers to the coverage of the Ghastly pallor layer.

    4) Blood
    Under the Layer menu choose New Adjustment Layer>Hue/Saturation…
    When the Hue/Saturation dialog comes up, set the Hue slider to 0 and the Lightness slider to −70. Leave the Saturation as is and click OK.
    You should be ahead of me here already: When you come out of the Hue/Saturation dialog box, you’ll have the mask of your new adjustment layer selected. Select All (Crtl-A on the PC, Command-A on the Mac) and Delete.
    Now with a brush, paint in some blood. You could add blood dribbling out of the mouth, blood around the eyes and maybe a nasty head wound where someone might have hit your zombie in the head with a cricket bat.

    I said there would be 5 adjustment layers, but the fifth one affects your subject’s teeth and, in this picture of Sean, he’s not bearing his. So I’ll switch at this point to a picture I got from iStockphoto.com:

    5) Death breath
    Get another Curves adjustment layer going at the top of the Layers palette…you should be pretty familiar with where this is found by now.
    When the Curves comes up, choose Red from the Channels pulldown menu, click the diagonal line near the middle to create a node and drag that node up and to the left

    Next, choose Blue from the Channels pulldown menu, click the diagonal line near the middle to create a node and drag that node down and to the right

    Are you following me so far? Here’s where it gets a bit tricky:
    Going from the top right, click the node you see there in the top corner. Enter in values of 255 for the Output and 230 for the Input.
    Click below that node on the black curve to create a new node and enter in values of 195 for the Output and 220 for the Input.
    Click below that node on the black curve to create a new node and enter in values of 60 for the Output and 160 for the Input.
    Finally, create a new node below that last one and enter in values of 35 for the Output and 75 for the Input.

    Click OK.
    You’ll have the mask of your new adjustment layer selected. Go ahead and Select All (Crtl-A on the PC, Command-A on the Mac) and Delete.
    Now with a brush, paint in the mouth of your subject…teeth, tongue, gums and all.

    Okay so those are the adjustment layers. Now we move on to disfiguring our zombie…

    Select All again (Crtl-A on the PC, Command-A on the Mac) but don’t Delete (you might have deleted instinctively after all the previous conditioning ;) ). Go Edit>Copy Merged (Shift-Crtl-C on the PC, Shift-Command-C on the Mac). And then Paste (Crtl-V on the PC, Command-V on the Mac) to create a new layer on top of all the others that consists of a merged-down version of the zombie thus far.

    Go Layer>Liquify (Shift-Crtl-X on the PC, Shift-Command-X on the Mac).

    You will now be able to manipulate your image in weird and wonderful ways.

    Use the Forward Warp Tool (the pointing finger in the top position of the Liquify tools) to carefully smoosh your zombie’s face into the contorted expression of the undead.

    Vampire
    For the Vampire tutorial I have chosen……Sean again!
    Here’s the picture (also from The Lab Flickr gallery):

    This tutorial is somewhat similar to the Zombie Effect, but I want to show you how there are different ways of going about thing in Photoshop. In this case, instead of applying all the adjustment layers before distorting the image, we’re going to distort it first.
    Let’s get going…
    Duplicate your image on a new layer by going Select All (Crtl-A on the PC, Command-A on the Mac) and then Layer>New>Layer Via Copy (Crtl-J on the PC, Command-J on the Mac).
    Go Layer>Liquify (Shift-Crtl-X on the PC, Shift-Command-X on the Mac).

    Grab the Freeze Mask Tool. We’re going to mask off some areas of Sean’s forehead so that I can bring down the middle of his hairline into a “widow’s peak” without affecting any other areas of his face. Use the tool to paint the areas you want to protect. If you make a mistake, use the Thaw Mask Tool (they work just like the paintbrush and eraser tools elsewhere in Photoshop, so you can be using one of the tools and temporarily switch to the other by holding down the Alt key on the PC or the Option key on a Mac).

    I know it looks like Sean has a really bad sunburn on his forehead (and as a vampire, that wouldn’t take much), but bear with me. Grab the Foreword Warp Tool and use it to smear the hairline into the area you’ve cordoned off with the Freeze Mask Tool.

    When you’re done with the widow’s peak, you can click the None button in the Mask Options to remove the masking you’ve done. Grab the Freeze Mask Tool again and this time paint a mask in the subject’s mouth leaving room for vampire teeth. Make sure you don’t mask where you want the teeth to be, but rather around the outside of that area.

    Now, grab the Foreword Warp Tool and warp the existing teeth into scary fangs!!

    Click that None button in the Mask Options area of the Liquify window again.

    Now I want you to play and be a bit creative. Use the the Foreword Warp Tool (with or without the Freeze Mask Tool) to give you vampire other scary features: pointed ears, arched eyebrows, pointed fingernails, a forked tongue, etc. When you’re done, click OK

    ow all you need are the adjustment layers…

    1) Ghastly pallor

    Under the Layer menu choose New Adjustment Layer>Hue/Saturation…
    When the Hue/Saturation dialog comes up, set the Hue to −150, The Saturation to −90, and the Lightness to +10. Click OK.
    When you come out of the Hue/Saturation dialog box, you’ll have the mask of your new adjustment layer selected. Select All (Crtl-A on the PC, Command-A on the Mac) and Delete.
    Now with a brush, carefully paint in the skin tone of your subject. Set the adjustment layer’s opacity to 80% in the Layers Palette.

    2) Blood
    Under the Layer menu choose New Adjustment Layer>Hue/Saturation…
    When the Hue/Saturation dialog comes up, set the Hue slider to 0 and the Lightness slider to −70. Leave the Saturation as is and click OK.
    You should be ahead of me here already: When you come out of the Hue/Saturation dialog box, you’ll have the mask of your new adjustment layer selected. Select All (Crtl-A on the PC, Command-A on the Mac) and Delete.
    Now with a brush, paint in some blood. Ironically, with vampires, I find less is more. You could add blood dribbling out of the mouth but I wouldn’t go much further—it’s the teeth that really sell this, after all.

    PRODUCTS SHOWN
    Adobe Photoshop CS3
    USD$649


  • Rebirth of the personal homepage: Should you, could you, would you?
    Editor, blognation Canada

    Review some of the current crop of new AJAX-powered homepages like iGoogle, Netvibes, and Pageflakes. How you set them up and use them, but with the question … should you even bother?

    RELATED WEBSITE LINKS
    www.Igoogle.com
    www.Pageflakes.com
    www.Netvibes.com