Chapter 10 ✦ Corrective Filtering Averaging pixels with Median Another command in the Filter ➪ Noise submenu, Median removes noise by averaging the colors in an image, one pixel at a tim
Trang 1Chapter 10 ✦ Corrective Filtering
Averaging pixels with Median
Another command in the Filter ➪ Noise submenu, Median removes noise by averaging
the colors in an image, one pixel at a time When you choose Filter ➪ Noise ➪ Median,
Photoshop produces a Radius option box For every pixel in a selection, the filter
averages the colors of the neighboring pixels that fall inside the specified radius —
ignoring any pixels that are so different that they might skew the average — and
applies the average color to the central pixel
You can now enter any value between 1 and 100 However, even at the old limit, 16,
significant blurring occurs, as you can see from the bottom-right example in Figure
10-41 (in the preceding section) At the maximum Radius value, you wind up with a
sort of soft, blurry gradient, with all image detail obliterated
As with Gaussian Blur, you can achieve some very interesting and useful effects by
backing off the Median filter with the Fade command But rather than creating a Star
Trek glow, Median clumps up details, giving an image a plastic, molded quality, as
demonstrated by the examples in Figure 10-42 To create every one of these images,
I applied the Median Filter with a Radius of 5 pixels Then I pressed Ctrl+Shift+F to
display the Fade dialog box and lowered the Opacity value to 70 percent The only
difference between one image and the next is the blend mode
Another difference between Gaussian Blur and Median is that Gaussian Blur
destroys edges and Median invents new ones This means you can follow up the
Median filter with Unsharp Mask to achieve even more pronounced sculptural
effects I sharpened every one of the examples in Figure 10-42 using an Amount
value of 150 percent and a Radius of 1.5
Sharpening a compressed image
Digital cameras are the hottest thing in electronic imaging You can take as many
images as you like, download them to your computer immediately, and place them
into a printed document literally minutes after snapping the picture In the next five
years, I have little doubt that you — yes, you — will purchase a digital camera (if you
haven’t already)
Unfortunately, the technology is still very young And if you’re using one of the
mid-or low-priced cameras — read that, under $500 — even the slightest application of the
Unsharp Mask filter sometimes results in jagged edges and unsightly artifacts These
blemishes stem from a stingy supply of pixels, heavy-handed compression schemes
(all based on JPEG), or both The situation is improving; cameras at the high end of
the consumer price range ($700 and up) can produce 3-megapixel images and often
enable you to store uncompressed images in the TIFF format But as with all good
things in life, it will take a while for those options to be available in moderately
priced equipment
6
Photoshop 6
Trang 2480 Part III ✦ Selections, Masks, and Filters
Figure 10-42: After applying the Median filter, I reversed the
effect slightly using Edit ➪ Fade Median Although I varied the blend mode — as labeled beneath the images — the Opacity value remained a constant 70 percent
In the meantime, firm up the detail and smooth out the color transitions in your digital photos by applying a combination of filters — Median, Gaussian Blur, andUnsharp Mask — to a layered version of the image The following steps tell all
If you own a digital camera, I encourage you to record these steps with the Actionspalette, as explained in Chapter B on the CD accompanying this book This way, youcan set Photoshop to open squads of images, batch-process them, and save them in
a separate folder, leaving you free to do something fun, like read more of this book
Note
Trang 3Chapter 10 ✦ Corrective Filtering
STEPS: Adjusting the Focus of Digital Photos
1 Select the entire image and copy it to a new layer That’s Ctrl+A,
Ctrl+J Figure 10-43 shows the image that I intend to sharpen, a picture
of a friend’s child
Figure 10-43: I captured this youthful fellow
with a low-end digital camera equipped with a
removable fish-eye lens How innocent and happy
he looks — obviously not a computer user
2 Choose Filter ➪ Noise ➪ Median After processing several thousand of
these images, I’ve found that a Radius value of 2 is almost always the
optimal choice But if the image is particularly bad, 3 may be warranted
3 Choose Filter ➪ Blur ➪ Gaussian Blur Now that you’ve gummed up the detail
a bit and rubbed out most of the compression, use the Gaussian Blur filter
with a Radius of 1.0 to blur the gummy detail slightly This softens the edges
that the Median filter creates (You don’t want any fake edges, after all.)
4 Choose Filter ➪ Sharpen ➪ Unsharp Mask All this blurring demands some
intense sharpening So apply Unsharp Mask with a maximum Amount value
of 500 percent and a Radius of 1.0 (to match the Gaussian Blur radius) This
restores most of the definition to the edges, as shown in Figure 10-44
5 Lower the layer’s Opacity value By itself, the filtered layer is a bit too smooth.
So mix the filtered floater with the underlying original with an Opacity value
between 30 and 50 percent I found that I could go pretty high — 45 percent —
with Cooper Kids have clearly defined details that survive filtering quite nicely
Trang 4482 Part III ✦ Selections, Masks, and Filters
Figure 10-44: Thanks to Median, Gaussian Blur,
and Unsharp Mask, Cooper is a much smoother customer In fact, he’s beyond smooth — he’s a gummy kid
6 Merge the image Press Ctrl+E to send the layer down.
7 Continue to correct the image as you normally would The examples in
Figure 10-45 show the difference between applying the Unsharp Mask filter
to the original image (top) and the filtered mixture (bottom) In both cases,
I applied an Amount value of 200 percent and a Radius of 1.0 The top photodisplays an unfortunate wealth of artifacts — particularly visible in the magnified eye — while the bottom one appears smooth and crisp
These steps work well for sharpening other kinds of compressed imagery, includingold photographs that you over-compressed without creating backups, and imagesthat you’ve downloaded from the Internet If applying the Unsharp Mask filterbrings out the goobers, try these steps instead
Cleaning up scanned halftones
Photoshop offers one additional filter in the Filter ➪ Noise submenu called Dust &Scratches The purpose of this filter is to remove dust particles, hairs, scratches,and other imperfections that may accompany a scan The filter offers two options,Radius and Threshold As long as the offending imperfection is smaller or thinnerthan the Radius value and different enough from its neighbors to satisfy theThreshold value, the filter deletes the spot or line and interpolates between the pixels around the perimeter
Trang 5Chapter 10 ✦ Corrective Filtering
Figure 10-45: Here you can see the difference
between sharpening a digital photograph right off
the bat (top) and waiting to sharpen until after
you’ve prepared the image with Median, Gaussian
Blur, and Unsharp Mask (bottom)
But like so many automated tools, this one works only when conditions are favorable
I’m not saying that you shouldn’t ever use it — in fact, you may always want to give
this filter the first crack at a dusty image But if it doesn’t work (as it probably won’t),
don’t get your nose out of joint Just hunker down and eliminate the imperfections
manually using the rubber stamp tool, as explained in the “Touching up blemishes”
section of Chapter 7
Trang 6484 Part III ✦ Selections, Masks, and Filters
Now, as I say, Dust & Scratches was designed to get rid of gunk on a dirty scanner.But another problem that the filter may be able to eliminate is moiré patterns.These patterns appear when scanning halftoned images from books and magazines.See, any time you scan a printed image, you’re actually scanning a collection
of halftone dots rather than a continuous-tone photograph In most cases, thehalftone pattern clashes with the resolution of the scanned image to produce rhythmic and distracting moirés
When scanning published photographs or artwork, take a moment to find out ifwhat you’re doing is legal It’s up to you to make sure that the image you scan is
no longer protected by copyright — most, but not all, works over 75 years old areconsidered free game — or that your noncommercial application of the image fallsunder the fair-use umbrella of commentary or criticism
The Dust & Scratches filter can be pretty useful for eliminating moirés, particularly
if you reduce the Threshold value below 40 But this also goes a long way towardeliminating the actual image detail, as shown in Color Plate 10-7 This figure features
an image scanned from a previous issue of Macworld magazine (Because I created the original image, Macworld probably won’t sue me, but you shouldn’t try it.)
The left half of Color Plate 10-7 shows the individual color channels in the image;the right half shows the full-color image I’ve blown up a detail in each image so that you can better see the pixels in the moiré pattern
The top example in the color plate shows the original scanned image with its awful moirés (Actually, I’ve slightly exaggerated the moirés to account for anyprinting anomalies; but believe me, with or without enhancement, the image is amess on screen.) The middle example shows the same image subject to the Dust
& Scratches filter with a Radius of 2 and a Threshold value of 20 The moirés are gone, but the edges have all but disappeared as well I’m tempted to describe this artwork using adjectives such as “soft” and “doughy,” and them are fightin’words in the world of image editing
But what about that bottom example? How did I manage to eliminate the moirés
and preserve the detail that is shown here? Why, by applying the Gaussian Blur,
Median, and Unsharp Mask filters to individual color channels
The first step is to examine the channels independently (by pressing Ctrl+1, Ctrl+2,and Ctrl+3) You’ll likely find that each one is affected by the moiré pattern to a dif-ferent extent In the case of this scan, all three channels need work, but the bluechannel — the usual culprit — is the worst The trick, therefore, is to eliminate thepatterns in the blue channel and draw detail from the red and green channels
To fix the blue channel, I applied both the Gaussian Blur and Median commands infairly hefty doses I chose Filter ➪ Blur ➪ Gaussian Blur and specified a Radius value
of 1.5 pixels, rather high considering that the image measures only about 300 pixelstall Then I chose Filter ➪ Noise ➪ Median and specified a Radius of 2
Caution
Trang 7Chapter 10 ✦ Corrective Filtering
The result was a thickly modeled image with no moirés but little detail To firm
things up a bit, I chose Filter ➪ Sharpen ➪ Unsharp Mask and entered 200 percent
for the Amount option and 1.5 for the Radius I opted for this Radius value because
it matches the Radius that I used to blur the image When correcting moirés, a
Threshold value of 0 is almost always the best choice A higher Threshold value
not only prevents the sharpening of moiré pattern edges but also ignores real
edges, which are already fragile enough as it is
The green and red channels required incrementally less attention After switching
to the green channel, I applied the Gaussian Blur filter with a Radius of 1.0 Then I
sharpened the image with the Unsharp Mask filter set to 200 percent and a Radius
value of 0.5 In the red channel (Ctrl+1), I applied Gaussian Blur with a Radius value
of 0.5 The gradual effect wasn’t enough to warrant sharpening
When you’re finished, switch back to the RGB view (Ctrl+0) to see the combined
result of your labors (Or keep an RGB view of the image up on screen by choosing
Window ➪ New Window.) The focus of the image will undoubtedly be softer than it
was when you started You can cure this to a limited extent by applying very
dis-creet passes of the Unsharp Mask filter, say, with an Amount value of 100 percent
and a low Radius value Keep in mind that oversharpening may bring the patterns
back to life or even uncover new ones
One last tip: Always scan halftoned images at the highest resolution available
to your scanner Then resample the scan down to the desired resolution using
Image ➪ Image Size, as covered in Chapter 3 This step by itself goes a long way
toward eliminating moirés
Tip
Trang 9Filtering
Destructive Filters
Corrective filters enable you to eliminate image flaws and
apply special effects Destructive filters, on the other hand, are
devoted solely to special effects Even though Photoshop
offers nearly twice as many destructive filters as corrective
counterparts, destructive filters are less frequently used and
ultimately less useful
Don’t get me wrong — these filters are a superb bunch But
because of their more limited appeal, I don’t explain each and
every one of them Rather, I concentrate on the ones that I
think you’ll use most often, breeze over a handful of others,
and let you discover on your own the ones that I ignore
In addition to explaining the commands found on the Filter
menu, this chapter also explains the new Liquify command,
which probably ought to be on the Filter menu but isn’t
Liquify enables you to shove pixels around your image by
dragging them, providing a means for freeform, interactive
distortion
A million wacky effects
Oh heck, I guess I can’t just go and ignore half of the
com-mands on the Filter menu — they’re not completely useless,
after all It’s just that you aren’t likely to use them more than
once every lunar eclipse So here are the briefest of all
pos-sible descriptions of these filters:
✦ Color Halftone: Located under the Filter ➪ Pixelate
sub-menu, this command turns an image into a piece of RoyLichtenstein artwork, with big, comic-book halftonedots Although scads of fun, the filter is ultimately a novelty that takes about a year and a half to apply
Clever ways to use thePixelate filters
Putting the Mezzotintfilter to good useApplying the edge-enhancement filters,including Emboss andFind Edges
Creating metalliceffects with Bas Relief,Plastic Wrap, andChrome
Exploring new worldswith the help of thedistortion filtersTugging at imageswith the Liquify filterDesigning specializedgradations and otherabstractions
Transforming images
in 3D spaceChanging a picture’satmosphere usingClouds
The complete innerworkings of LightingEffects
Trang 10488 Part III ✦ Selections, Masks, and Filters
✦ Fragment: Ooh, it’s an earthquake! This lame filter repeats an image four times
in a square formation and lowers the opacity of each to create a sort of jigglyeffect You don’t even have any options to control it It’s quite possible I’mmissing the genius behind Filter ➪ Pixelate ➪ Fragment Then again, maybe not
✦ Lens Flare: Found in the Render submenu, this filter adds sparkles and halos
to an image to suggest light bouncing off the camera lens Even though tographers work their behinds off trying to make sure that these sorts ofreflections don’t occur, you can add them after the fact You can select fromone of three Lens Type options, adjust the Brightness slider between 10 and
pho-300 percent (though somewhere around 100 is bound to deliver the bestresults), and move the center of the reflection by dragging a point aroundinside the Flare Center box
In addition, you now can Alt-click inside the preview to position the centerpoint numerically
If you want to add a flare to a grayscale image, first convert it to the RGBmode Then apply the filter and convert the image back to grayscale TheLens Flare filter is applicable to RGB images only
Here’s another great tip for using Lens Flare Before choosing the filter, create
a new layer, fill it with black, and apply the Screen blend mode (Shift+Alt+Swith a non-painting tool selected) Now apply Lens Flare You get the sameeffect as you would otherwise, but the effect floats above the backgroundimage, protecting your original image from harm You can even move the lensflare around and vary the Opacity value, giving you more control over thefinal effect
✦ Diffuse: Located in the Stylize submenu — as are the three filters that follow —
Diffuse dithers the edges of color, much like the Dissolve brush mode dithersthe edges of a soft brush Diffuse is moderately useful but not likely to gain aplace among your treasured few
✦ Solarize: This single-shot command is easily Photoshop’s worst filter It’s
really just a color-correction effect that changes all medium grays in the image
to 50 percent gray, all blacks and whites to black, and remaps the other colors
to shades in between (If you’re familiar with the Curves command, the mapfor Solarize looks like a pyramid.) It really belongs in the Image ➪ Adjust sub-menu or, better yet, on the cutting room floor
✦ Tiles: This filter breaks an image up into a bunch of regularly sized but
ran-domly spaced rectangular tiles You specify how many tiles fit across the widthand height of the image — a value of 10, for example, creates 100 tiles — andthe maximum distance each tile can shift You can fill the gaps between tileswith foreground color, background color, or an inverted or normal version ofthe original image A highly intrusive and not particularly stimulating effect
✦ Extrude: The more capable cousin of the Tiles filter, Extrude breaks an image
into tiles and forces them toward the viewer in three-dimensional space ThePyramid option is a lot of fun, devolving an image into a collection of spikes
Tip
6
Photoshop 6
Trang 11Chapter 11 ✦ Full-Court Filtering
When using the Blocks option, you can select a Solid Front Faces option that
renders the image as a true 3D mosaic The Mask Incomplete Blocks option
simply leaves the image untouched around the perimeter of the selection
where the filter can’t draw complete tiles
Actually, I kind of like Extrude For the sheer heck of it, Color Plate 11-1 shows
an example of Extrude applied to what was once a red rose I set the Type to
Blocks, the Size to 10, the Depth to 30 and Random, with both the Solid Front
Faces and Mask Incomplete Blocks radio buttons selected Pretty great, huh? I
only wish that the filter would generate a selection outline around the masked
areas of the image so that I could get rid of anything that hadn’t been extruded
It’s a wonderful effect, but it’s not one that lends itself to many occasions
✦ Diffuse Glow: The first of the Gallery Effects that I mostly ignore, Filter ➪
Distort ➪ Diffuse Glow sprays a coat of dithered, background-colored pixels
onto your image Yowsa, let me at it
✦ The Artistic filters: As a rule, the effects under the Filter ➪ Artistic submenu
add a painterly quality to your image Colored Pencil, Rough Pastels, and
Watercolor are examples of filters that successfully emulate traditional
medi-ums Other filters — Fresco, Smudge Stick, and Palette Knife — couldn’t pass
for their intended mediums in a dim room filled with dry ice
✦ The Brush Strokes filters: I could argue that the Brush Strokes submenu
con-tains filters that create strokes of color This is true of some of the filters —
including Angled Strokes, Crosshatch, and Sprayed Strokes Others — Dark
Strokes and Ink Outlines — generally smear colors, while still others —
Accented Edges and Sumi-e — belong in the Artistic submenu Whatever
✦ The Sketch filters: In Gallery Effects parlance, Sketch means color sucker.
Beware, every one of these filters replaces the colors in your image with the
current foreground and background colors If the foreground and background
colors are black and white, the Sketch filter results in a grayscale image
Charcoal and Conté Crayon create artistic effects, Bas Relief and Note Paper
add texture, and Photocopy and Stamp are stupid effects that you can
pro-duce better and with more flexibility using High Pass
To retrieve some of the original colors from your image after applying a
Sketch filter, press Ctrl+Shift+F to display the Fade dialog box and try out a
few different Mode settings Overlay and Luminosity are particularly good
choices In Color Plate 11-2, I applied the Charcoal filter with the foreground
and background colors set to light blue and dark green Then I used the Fade
command to select the Overlay mode
✦ The Texture filters: As a group, the commands in the Filter ➪ Texture
sub-menu are my favorite effects filters Craquelure, Mosaic Tiles, and Patchwork
apply interesting depth textures to the image Texturizer provides access to
several scalable textures and permits you to load your own (as long as the
pattern is saved in the Photoshop format), as demonstrated in Figure 11-1
The one dud is Stained Glass, which creates polygon tiles like Photoshop’s
own Crystallize filter, only with black lines around the tiles
Tip
Trang 12490 Part III ✦ Selections, Masks, and Filters
Figure 11-1: Filter ➪ Texture ➪ Texturizer lets you select from four built-in
patterns — including the first three shown here — and load your own In the last example, I loaded the Random Strokes pattern included with Photoshop
Certainly, there is room for disagreement about which filters are good and which
are awful After I wrote a two-star Macworld review about the first Gallery Effects
collection back in 1992 — I must admit, I’ve never been a big fan — a gentlemanshowed me page after page of excellent artwork he created with them Recently,
a woman showed me her collection of amazing Lens Flare imagery I mean, here’s
a filter that just creates a bunch of bright spots, and yet this talented person wasable to go absolutely nuts with it
The moral is that just because I consider a filter or other piece of software to be asqualid pile of unspeakably bad code doesn’t mean that a creative artist can’t come
along and put it to remarkable use But that’s because you are good, not the filter.
So if you’re feeling particularly creative today, give the preceding filters a try.Otherwise, skip them with a clear conscience
Sandstone
Burlap
Canvas
Random Strokes
Trang 13Chapter 11 ✦ Full-Court Filtering
What about the others?
Some filters don’t really belong in either the corrective or destructive camp Take
Filter ➪ Video ➪ NTSC Colors, for example, and Filter ➪ Other ➪ Offset Both are
examples of commands that have no business being under the Filter menu, and
both could have been handled much better
The NTSC Colors filter modifies the colors in your RGB or Lab image for transfer to
videotape Vivid reds and blues that might otherwise prove very unstable and bleed
into their neighbors are curtailed The problem with this function is that it’s not an
independent color space; it’s a single-shot filter that changes your colors and is
done with them If you edit the colors after choosing the command, you may very
well reintroduce colors that are incompatible with NTSC devices and therefore
war-rant a second application of the filter Conversion to NTSC — another light-based
system — isn’t as fraught with potential disaster as conversion to CMYK pigments,
but it still deserves better treatment than this
The Offset command moves an image a specified number of pixels Why didn’t I
cover it in Chapter 8 with the other movement options? Because the command
actually moves the image inside the selection outline while keeping the selection
outline itself stationary It’s as if you had pasted the entire image into the selection
outline and were now moving it around The command is a favorite among fans of
channel operations, a topic I cover in Chapter 13 You can duplicate an image, offset
the entire duplicate by a few pixels, and then mix the duplicate and original to
cre-ate highlight or shadow effects But I much prefer the more interactive control of
layering and nudging with the arrow keys I imagine the Offset filter might find favor
with folks who want to automate movements from the Actions palette, but now that
Photoshop records movements made with the move tool, I’m not even sure about
that Okay, I admit it; the Offset command is a primitive feature with no purpose in
our high-tech modern world
Among the filters I’ve omitted from this chapter is Filter ➪ Stylize ➪ Wind, which is
technically a destructive filter but is covered along with the blur and noise filters in
Chapter 10 I discussed Filter ➪ Render ➪ Texture Fill in Chapter 7 And finally, for
complete information on the Custom and Displace filters, crack open Chapter A on
the CD-ROM at the back of this book
As for the other filters in the Filter ➪ Distort, Pixelate, Render, and Stylize
sub-menus, stay tuned to this chapter to discover all the latest and greatest details
Third-party filters
In addition to using the filters provided by Photoshop, you can purchase all sorts of
plug-in filters from other companies In fact, Photoshop supports its own
flourish-ing cottage industry of third-party solutions from wonderful companies such as
Extensis, Alien Skin, Andromeda, and others
Cross-Reference
Trang 14492 Part III ✦ Selections, Masks, and Filters
The CD-ROM at the back of this book includes sample versions of some of myfavorite filters For complete information on the specific filters and the companiesthat provide them, read the appendix Many of the filters are demo versions of theshipping products, which means that you can see what they do but you can’t actu-ally apply the effects or they work for only a limited period of time I know, it’s adrag, but these folks claim that they like to make money every once in a while, and
I can’t say that I blame them
One final note about RAM
Memory — that is, real RAM — is a precious commodity when applying destructivefilters As I mentioned in Chapter 2, the scratch disk space typically enables you toedit larger images than your computer’s RAM might permit But all the filters in theDistort submenu and most of the commands in the Render submenu operate exclu-sively in memory If they run out of physical RAM, they choke
Fortunately, there is one potential workaround: When editing a color image, tryapplying the filter to each of the color channels independently One color channelrequires just a third to a fourth as much RAM as the full-color composite Sadly, thistechnique does not help either Lighting Effects or Lens Flare These delicate flowers
of the filter world are compatible only with full-color images; when editing a singlechannel, they appear dimmed
The Pixelate Filters
The Filter ➪ Pixelate submenu features a handful of commands that rearrange yourimage into clumps of solid color:
✦ Crystallize: This filter organizes an image into irregularly shaped nuggets You
specify the size of the nuggets by entering a value from 3 to 300 pixels in theCell Size option
✦ Facet: Facet fuses areas of similarly colored pixels to create a sort of
hand-painted effect
✦ Mosaic: The Mosaic filter blends pixels together into larger squares You
spec-ify the height and width of the squares by entering a value in the Cell Sizeoption box
✦ Pointillize: This filter is similar to Crystallize, except it separates an image
into disconnected nuggets set against the background color As usual, youspecify the size of the nuggets by changing the Cell Size value
Tip
Cross-Reference
Trang 15Chapter 11 ✦ Full-Court Filtering
The Crystal Halo effect
By applying one of the Pixelate filters to a feathered selection, you can create what I
call a Crystal Halo effect, named after the Crystallize filter, which tends to deliver the
most successful results (For a preview of these effects, sneak a peek at Figure 11-2.)
The following steps explain how to create a Crystal Halo, using the images in
Figures 11-2 and 11-3 as an example
STEPS: Creating the Crystal Halo Effect
1 Select the foreground element around which you want to create the halo.
Then choose Select ➪ Inverse to deselect the foreground element and select
the background
2 Press Q to switch to the quick mask mode.
3 Choose Filter ➪ Other ➪ Minimum As I explained in Chapter 10, this filter
enables you to increase the size of the deselected area around the foreground
element The size of the Radius value depends on the size of the halo you
want to create I entered 15 because I wanted a 15-pixel halo (Photoshop 6 no
longer limits the Radius value to a measly 10 pixels; you can now enter values
as high as 100.)
4 Choose Filter ➪ Blur ➪ Gaussian Blur Then enter a Radius value 0.1 less than
the amount by which you increased the size of the deselected area In my case,
I entered 14.9 This cuts into the image slightly, but hardly enough to be visible,
as you can see in the image on the left in Figure 11-2
Figure 11-2: Create a heavily feathered selection outline (left) and then apply
the Crystallize filter to refract the feathered edges (right)