The Secrets Of Photoshop Edge Detection

Edge detection in Photoshop is effectively invisible. Relatively few Photoshop users have ever delved into the inner workings of the lasso tool by clicking and holding on it so that the flyout menu pops out and allows you to choose from the standard lasso, the polygonal lasso, and the magnetic lasso.

Each one of these lasso tools has its uses. If you're trying to do a quick and easy selection and don't really care about the edges, the lasso is for you. If you're trying to select the 2001 monolith from a starry sky, then the polygonal lasso is your hot ticket. However, if you're trying to separate a single gargoyle from the mass of dancing gargoyles on the front frieze of the Minna stone temple, then you need the magnetic lasso and you need it badly.

Once you have selected the magnetic lasso all you need to do is to start playing with it to get the proper settings for your gargoylization surgery. The first thing you should do is hit the Caps Lock on your keyboard. This will change the silly looking lasso with a magnet icon to a much more useful circle with a crosshair. Not only will it be more accurate to be pixel perfect with the crosshair, but the software will only be examining the pixel values within the circle, rather than having to compute your entire image.

You can change the size of the circle to suit whatever you're doing. just look up to the Options Bar and change the width to whatever pixel setting you want. The smaller the setting, the more accurate the edge detection. You can change sizes on the fly with the ] and [ keys. Try it. It's neat!

When you're working with low contrast images (like the monolith against the starry sky) you'll want to play with the Option Bar's Contrast setting. The lower the setting, the better it will detect low contrast edgings. Change this setting on the fly with the . and , keys.

You can also tell Photoshop how often you want anchor points dropped with the Frequency value on the Option Bar.

Now magnify the beejeezus out of the image. In my Photoshop CS4 I love to work with the 600% setting. At this magnification, the pixels are clearly delineated so it's easy to switch mags back and forth to make sure you're working with the right pixels.

Once you start working with the tool you'll see why it got its magnetic name. As you drag along close to the edge you're trying to select, the trailing tail will adhere to the edge it recognizes quite magnetically, and drop anchor points where it sees fit. If you're trying to round a specifically tight corner or are passing an area of low contrast to the background, just click and you'll drop anchor points wherever you want them.

If you happen to put an anchor point in the wrong place, don't start again. Just hit the Backspace key (Delete on the Mac) and start eliminating anchor points in reverse order. Very handy for those huge jobs. Those gargoyles on the Minna temple are huge! Some are bigger than Ryan Hupfer's chin!

Hey! I can make fun of Ryan. He doesn't work here anymore and he doesn't have my address.

You can switch between lasso tools too with the Alt key (Option on Mac) but don't. It's mostly not necessary and generally screws you up.

When you get to the end of your image, the typical lasso tiny circle will appear and you can close off your selection and introduce the magnificent Adobe marching ant parade.

Now you can copy the selection to another layer or file and you can repeat the process for any dropouts from within the image such as holes in earrings, etc. Pretty soon you've got a perfectly selected imageĀ  to drop in anywhere you want. Remember to adjust the selection's contrast, brightness, curves, hue, saturation, etc. to look like it really belongs on the new background.

In some cases I like to manually blur my edges with the smudge tool set at one or two pixels. Just drag the smudge along the side of the image to keep that nasty jagged pixilization from making your image look like it was dropped in. For an even better effect, merge your image into the background layer then do the smudge runaround and you'll be able to fool FBI photographic specialists. It's extremely handy for fulfilling all your Forrest Gumpian fantasies. Ever wanted a photo of you standing naked next to Marilyn Monroe? Go for it!

This Hub is for nicomp who requested it and to thank him for tipping me off that his cousin Mine That Bird was the hot pick for the Kentucky Derby (I knew that wasn't a light fixture but a birdhouse)!

More by this Author

Comments 23 comments

Ben Zoltak profile image

Ben Zoltak 6 years ago from Lake Mills, Jefferson County, Wisconsin USA

Thanks for this Hal, I can't believe that Photoshop didn't hint to this in their directional video, maybe they did and I missed it.

I've been thinking of buying Illustrator (right now I only only Photoshop Elements) because I am trying to digitize my oil paintings into more basic elements, I don't suppose you'd give me your opinion on what's better for this application?

Either way, great article.


nicomp profile image

nicomp 6 years ago from Ohio, USA

Very cool. You make it look so easy. My edges are ever closer to being detected.

Hal Licino profile image

Hal Licino 6 years ago from Toronto Author

Hi Ben. Thanks for the kind words. It all depends on what you're trying to do with your oil painting digitization. If you're actually trying to manipulate the images themselves then Photoshop Full wins hands down. I know it's absurdly expensive but I use it virtually every single day and to me it's worth every penny.

Hal Licino profile image

Hal Licino 6 years ago from Toronto Author

nicomp, all your edge are belong to us. :)

Ben Zoltak profile image

Ben Zoltak 6 years ago from Lake Mills, Jefferson County, Wisconsin USA

Thanks for the expert advice, maybe I'll stick with Photoshop since it seems to work well for you. I've also been tooling around with Google Sketch-Up, because at times I need to take my art and place it in a hypothetical 3-D environment/replication. Although maybe I can do that in Photoshop too, but currently I'm not sure how.

nicomp profile image

nicomp 6 years ago from Ohio, USA

Laughing so hard I can't type.

Hal Licino profile image

Hal Licino 6 years ago from Toronto Author

Ben: One of the big advancements in CS4 was that Photoshop is now a pretty decent 3D program. It can read 3DS, DAE, U3D, Obj, and more. The tool bar has a full 3D menu on the bar, second from the bottom.

nicomp: Glad you liked it! :)

Logo Design Gear 6 years ago

Heya ! that's a cool writing... love it Thank you ^_^

Hal Licino profile image

Hal Licino 6 years ago from Toronto Author


borge_009 profile image

borge_009 6 years ago from Philippines

Thanks. I've been using photoshop for for all my works but didn't realize this. Thanks for the info

Hub Llama profile image

Hub Llama 6 years ago from Denver, CO

I have tried to figure this through a hundred times and this is the first thing I have read that a) wasn't so basic as to be insulting and b) that actually made sense.


Hal Licino profile image

Hal Licino 6 years ago from Toronto Author

Wow, that's some compliment. Thanks so much! :)

Nando's profile image

Nando's 6 years ago from Pretoria, South Africa

Thank you Hal, very useful info, thanx

Hal Licino profile image

Hal Licino 6 years ago from Toronto Author

You're very welcome! :)

M. T. Dremer profile image

M. T. Dremer 6 years ago from United States

This just goes to show you that you can never really learn everything about photoshop. I've been using it for over 7 years and I never knew about this option of the lasso tool. I've used the lasso before, but it was usually in conjunction with the magic wand tool. This should be a really useful method to play around with. Thanks!

Hal Licino profile image

Hal Licino 6 years ago from Toronto Author

Thanks for your comment. Once you start using this option you'll be hooked. You'll be pasting your face on Mr. Olympia bodies, etc. It's fun! :)

M. T. Dremer profile image

M. T. Dremer 5 years ago from United States

I hope you don't mind, I linked to this article in my second hub about making wallpapers out of tiny images. The magnetic lasso was a really useful technique for what I was talking about so I directed readers here to learn more. If this is not okay, let me know and I will take it down.

website designing cochin kerala 5 years ago

Thanks for this Hal, I can't believe that Photoshop didn't hint to this in their directional video, maybe they did and I missed it.

dsmythe profile image

dsmythe 5 years ago

I like your style of writing. Very funny and informative at the same time. I use the magnetic lasso tool when I want to outline something with a hard edge. Thanks for sharing this. Happy Photoshopping!

LaCursiva 5 years ago

good information, I will try to put it into practice, look easy.

juan Ignacio 5 years ago

good info, you do a good job.


Alladream74 profile image

Alladream74 5 years ago from Oakland, California

CS5 presents an even more advanced edge detection tool with "content aware". This calculates the pixels selected taking into consideration the ones around,in the end you get a very neat selection. Definitely worth your money if you work in the graphics industry.Great hub, keeps track of developments

Martin 5 years ago

A simple way to edge detect to add effect with masks : duplicate your layer, scale the top layer up or down of 1 or 2 %. Change the layer blend from normal to difference. All your edges should appear in full contrast. Just have to full desaturate it and play with lum/contrast. You can use the result as a mask.

    Sign in or sign up and post using a HubPages Network account.

    0 of 8192 characters used
    Post Comment

    No HTML is allowed in comments, but URLs will be hyperlinked. Comments are not for promoting your articles or other sites.

    Click to Rate This Article