Tech Support > Computer Hardware > Scanners > unsharp mask?
unsharp mask?
Posted by Louise on July 11th, 2005


Epson 2400 with negative holder.

I posted a question earlier about bit and resolution choices using the
epson software and the twain.

I note that there is a little box called "unsharp mask" which is
checked, apparently by default.

What is "unsharp mask" and why would I want it while scanning negatives,
or other things?

TIA again.

Louise

Posted by Ken Weitzel on July 11th, 2005




Louise wrote:

The term is incredibly misleading; a hang-over from
the good old film days. Unsharp masking gives the
illusion of increased sharpness.

In film days the lab would produce a negative. Then
produce a negative of that negative (now positive, of
course) that was intentionally out of focus. Those
two negatives were then sandwiched together in the
enlarger, producing a print that appeared to be crisper.

Todays electronic version does much the same thing.
Using it results in a pic that has the intensity at edges
increased to make them look crisper.

For instance, where flesh toned skin meets the an
(almost) white eye. The last one (or few) pixels
of flesh would have increased intensity and so would
the first one or two pixels of the eye.

Sort of like if a child drew a picture, and then
outlined all the edges with a more intense crayon.

You *don't* want to use it during scanning, you
absolutely don't want to use it if you're going to
be post-processing. If it's needed and desirable,
then photoshop will do a far, far better job, and
allow you to change the strength, width, etc., while
previewing what you're doing.

Ken




Posted by Louise on July 11th, 2005


In article <MPG.1d3baaf45d030198989f@news-server.nyc.rr.com>,
none@nospam.com says...

Louise

Posted by Louise on July 11th, 2005


In article <7YlAe.1934698$6l.156554@pd7tw2no>, kweitzel@shaw.ca says...
fact, the manual was as misleading as the term.

Thanks so much - I will uncheck the check box!

Louise

Posted by Kennedy McEwen on July 12th, 2005


In article <MPG.1d3bbb4c744fa4589898a1@news-server.nyc.rr.com>, Louise
<none@nospam.com> writes
(USM), he has jumped to a conclusion without any supporting evidence,
and in this case the conclusion is completely wrong.

In general USM should only be applied at the final stage before
printing, because the amount of USM necessary depends on the scale of
the final image that will be viewed. However, that is not why a fixed
level of USM is included in the Epson driver, or why it is enabled by
default.

Like most high resolution flatbed scanners, the Epson uses a staggered
CCD structure. Indeed Epson were the first to introduce this
technology, dubbing it a HyperCCD, although other manufacturers such as
HP and Canon used more complex approaches to achieve the same end
result. In the HyperCCD each colour is scanned by two CCD lines which
are offset by half a pixel pitch. The scan driver is then responsible
for interleaving the images produced by these two lines to produce each
scanned line in the image.

Now the effect of this type of CCD is that the contrast of the image
produced at the limit of its resolution is exactly zero. The benefit of
this is that no aliasing is possible and the scanned image is more akin
to a normal optical image. However, reducing the contrast to zero at
the limit of its resolution means that the contrast is less than it
could be for things that are close to the limit.

For example, with a single line CCD the contrast at the limit of
resolution is generally more than 65%. In both cases, the contrast of
well resolved objects is close to 100%, gradually falling off to the
ultimate levels as resolution increases, and the lens has an effect
reducing contrast as well. So, to produce a more natural image, the
HyperCCD has the misfortune of reducing the contrast in some detail
below a simpler single line CCD.

However, this loss in contrast can be recovered to an extent by the use
of a certain amount of USM, and this is the amount of USM that the Epson
scanner driver applies by default.

Now, what Ken didn't explain about USM, but it is important for the
explanation of the effect, is that it always increases the noise on the
image. However, each pixel in the HyperCCD has 4x the area of what
would be possible in a single line CCD of the same length and pixel
count - and consequently, the base signal from the HyperCCD has half the
amount of noise, all other things being equal. So, provided the noise
increase by the USM is less than 2x, the HyperCCD still produces a lower
noise image - even after the USM is applied.

Summarising, in general USM is applied at the print stage (to compensate
for sharpness losses in the printing and viewing process). However, in
the case of a flatbed scanner with a HyperCCD, such as your Epson, a
specific amount of USM is required to compensate for sharpness losses at
the scanning stage. Quite contrary to Ken's advice, this should not be
turned off under normal use, especially when scanning at the optical
resolution of the system, as would be normal for film. USM is an
integral part of the operation of the HyperCCD that is commonplace in
flatbed scanners today.
--
Kennedy
Yes, Socrates himself is particularly missed;
A lovely little thinker, but a bugger when he's pissed.
Python Philosophers (replace 'nospam' with 'kennedym' when replying)

Posted by Hecate on July 12th, 2005


On Mon, 11 Jul 2005 02:51:00 GMT, Louise <none@nospam.com> wrote:


Unsharp mask increases the sharpness of an image by emphasising edges.
It's not something you want to use, except as the last step in
Photoshop (And don't *ever* use the sharpness filters other than USM,
they'll make a mess of your image.).

--

Hecate - The Real One
Hecate@newsguy.com
Fashion: Buying things you don't need, with money
you don't have, to impress people you don't like...

Posted by Hecate on July 12th, 2005


On Mon, 11 Jul 2005 03:51:50 GMT, Louise <none@nospam.com> wrote:


--

Hecate - The Real One
Hecate@newsguy.com
Fashion: Buying things you don't need, with money
you don't have, to impress people you don't like...


Posted by Ken Weitzel on July 12th, 2005




Kennedy McEwen wrote:

Hi...

Oh oh, I think I'll comment no further, know when I've been
bested

A question though, if I may?

I no longer use the Epson software, preferring instead
to use Silverfast (couldn't live without the dsr)
Silverfast allows all sorts of usm; defining them not by
the usual means we use, but rather as more, less, way more,
etc. Or custom, in which case we can define an intensity
as a percentile number. Default is 42%, which looks quite
nice. 100% looks bizarre.

So the question is, is there a magic number that optimizes
this hyperccd stuff? 50% ?

Thanks, and take care.

Ken


Posted by Kennedy McEwen on July 12th, 2005


In article <gWEAe.229229$El.61679@pd7tw1no>, Ken Weitzel
<kweitzel@shaw.ca> writes
need to find it by trial and error since there is more than one
parameter to USM than just the intensity it is applied at.
--
Kennedy
Yes, Socrates himself is particularly missed;
A lovely little thinker, but a bugger when he's pissed.
Python Philosophers (replace 'nospam' with 'kennedym' when replying)

Posted by Kennedy McEwen on July 12th, 2005


In article <0d46d1pf7gva1aq0gphkd37bu1kq5tqn76@4ax.com>, Hecate
<hecate@newsguy.com> writes
....except when compensating for the scanner, as in the case that Louise
is asking about.


process - ie. subtracting a blurred version of the image from the
original. Unfortunately, the blur is not optically accurate, but a
digital FIR filter of limited extent. The other sharpness filters apply
the same FIR filter, with the same extent but different parameters,
directly to the image. There is no reason at all why this should be any
less suitable for an image, indeed, by having fewer processes, it is
likely to be less prone to rounding inaccuracies.
--
Kennedy
Yes, Socrates himself is particularly missed;
A lovely little thinker, but a bugger when he's pissed.
Python Philosophers (replace 'nospam' with 'kennedym' when replying)

Posted by Hecate on July 12th, 2005


On Tue, 12 Jul 2005 08:34:55 +0100, Kennedy McEwen
<rkm@nospam.demon.co.uk> wrote:


And this is where I disagree. The sharpness filters are only good for
very small detail in a specific type of image. Say a medal on the
portrait of a member of the armed forces and, indeed, that is the
example that Dan Margulis uses in Professional Photoshop. Otherwise
they are, for most purposes, worse than useless and degrade the image.
I, and a lot of others who use PS every day wish that Adobe would
remove the filters altogether (except perhaps for the sharpness tool,
useful in the example I gave) because they cause beginners to make a
mess of their images and then tear their hair out wondering what they
did wrong. If you want good examples of why you shouldn't use
Photoshop's sharpness filters you'll find them in any *good* book
about Photoshop.

--

Hecate - The Real One
Hecate@newsguy.com
Fashion: Buying things you don't need, with money
you don't have, to impress people you don't like...



Posted by Bart van der Wolf on July 12th, 2005



"Ken Weitzel" <kweitzel@shaw.ca> wrote in message
news:gWEAe.229229$El.61679@pd7tw1no...
That would assume that the amount of USM applied by the scanner
software only 'compensates' for high spatial frequency contrast loss,
which it might, or might not.
What's more, if the full native resolution scan will be down-sampled,
it is better to refrain from all sharpening until after the
down-sample. Only sharpening at the final output resolution will
reduce graininess (grain-aliasing).

Yes, but only at full native scan resolution.

SNIP
It depends on the sharpening algorithm used, but the evaluation of an
edge transition will give clues. If the sharpening of the edge causes
a halo, then you've gone beyond contrast restoration. That is not
necessarily bad if you sharpened for print output, because losses will
occur when printing. So 'some' over-sharpening will pre-compensate for
the losses to come.

If you want to really perfect the sharpening, you could analyze a
slanted (say approx. 5 degrees) edge transition. That will allow to
produce an over-sampled edge response function, the first derivative
of which is the so-called Line Spread Function (LSF). That LSF is a
one-dimensional integral of a Point Spread Function (PSF), a model of
the blur of each pixel by the optical chain (lens+film+scanner).

Knowing that PSF allows the construction of software solutions, such
as High Pass sharpening or Deconvolution kernels. I can show this
example of a rather involved reconstruction on a DSLR image (the
camera's AA-filter also blurs high frequency detail) I made for an
other purpose:
<http://www.xs4all.nl/~bvdwolf/main/downloads/Batavia_Crop.jpg>.
Similar effects are achieved by correct sharpening, although care must
be taken to not exaggerate film graininess. Using a noise reduction
program, before sharpening, will allow more intense sharpening.

Bart


Posted by Kennedy McEwen on July 13th, 2005


In article <42d4562c$0$24563$e4fe514c@news.xs4all.nl>, Bart van der Wolf
<bvdwolf@no.spam> writes
The intention is that it partially compensates. Clearly it cannot
restore an MTF of zero to 60-70%. However it will partially restore the
finite MTF to a higher level commensurate with not exceeding the
integrated noise advantage of the larger pixel.

filtering to minimise aliasing in itself. As you are well aware, the
downsampling algorithms in PS do include such filters. Consequently it
is worth having as much MTF as available in the original before
downsampling, and that means USM should be applied as the default.

native resolution.
--
Kennedy
Yes, Socrates himself is particularly missed;
A lovely little thinker, but a bugger when he's pissed.
Python Philosophers (replace 'nospam' with 'kennedym' when replying)

Posted by Kennedy McEwen on July 13th, 2005


In article <qpf8d1hf7rv9eq4eimffkl366kt6ed19j2@4ax.com>, Hecate
<hecate@newsguy.com> writes
Well you'll have to disagree, but the fact is that the kernel size used
in the USM is no bigger than that used in the sharpening filter, so it
cannot be any more limited.
USM is simply y=x-f(x), while sharpening is y=g(x) where f(x) and g(x)
are filtered versions of the original image, x, created from the same
kernel size, f(x) with even components, g(x) with odd components.

Maybe it has escaped your notice, but sharpening *does* only apply to
small detail, whether applied in a sharpening filter or unsharp masking.

If you are applying USM to larger than detail then your images are
degraded to begin with.

The only limitation of the sharpness filters is that they are provided
at 4 predetermined levels - Sharpen, Sharpen Edges, Sharpen More and
High Pass (the latter being available in the Custom filter section. Of
course this is a more limited selection than the range of adjustments
available in the USM control. However, if you look in the Custom Filter
section you will also find "Custom" which permits you to construct your
own tailored, directly sharpening filter.

I didn't say it was something that a novice could do, but it is complete
codswallop to suggest that the available sharpening levels ruin images.

If you want to learn why they are no different in performance to USM
then look for any *good* book on image processing, not restricted to the
application of Photoshop.
--
Kennedy
Yes, Socrates himself is particularly missed;
A lovely little thinker, but a bugger when he's pissed.
Python Philosophers (replace 'nospam' with 'kennedym' when replying)

Posted by Bart van der Wolf on July 13th, 2005



"Kennedy McEwen" <rkm@nospam.demon.co.uk> wrote in message
news:i6zmHtAHsG1CFw8a@kennedym.demon.co.uk...
SNIP
No, I'm not assuming but referring to observed behavior.

Yes, the later versions (CS/CS2) allow to do 'something' in order to
reduce artifacts, but they are rather ineffective (probably a
compromise for speed) and cause other artifacts (e.g. halo). This is
what happens:
<http://www.xs4all.nl/~bvdwolf/main/foto/down_sample/down_sample.htm>

Based on the above experiment, I'd have to disagree. Things may be a
bit less critical with real-life images, but anything besides the
'regular' bi-cubic downsampling will cause *avoidable* artifacts.
Here is an example of a film scan being down-sampled with various
methods:
http://www.xs4all.nl/~bvdwolf/main/f...e/example1.htm
I have yet to encounter a better behaved resampler than ImageMagick's
(with an appropriate filter model for the subject at hand). Oh, and
yes I do understand that scans from different scanners will behave
differently, as will different films and camera optics, because the
system MTF changes.

Yes, but is it the correct type of USM? Besides the fact that
sharpening should (to avoid color artifacts) be applied to the
Luminance of an image and not to the R/G/B channels, I've not seen
conclusive evidence that the method used in the Epson SW is optimal.
An edge scan with and without USM will reveal some of the answers.

Bart


Posted by Kennedy McEwen on July 13th, 2005


In article <42d4e9e5$0$26524$e4fe514c@news.xs4all.nl>, Bart van der Wolf
<bvdwolf@no.spam> writes
shows that the better downsampling processes, even those in PS, do
include filtering to minimise aliasing - see below.

Well, I don't have PS CS or CS2, but my own tests using your test
pattern have produced the same results as you have published - see below
- and this quite clearly indicates filtering on the downsampled
algorithms in PS. I know this same filtering was present in PS5 (I
never used PS6) and I believe it has been included in PS since at least
PS4, but it is so long ago that I used that version that I cannot be
sure exactly whether it was introduced before or after.

mind when I responded to your previous post yesterday, but I couldn't
find the appropriate page right away.

"Observe" the behaviour that *you* have produced for the downsampling of
an rgb image.

The nearest neighbour algorithm has no integral filtering and produces
the reference level of aliasing. Now, correct me if I am wrong, but the
aliasing present in the linear and bicubic downsampling is considerably
*less* than this reference.

Based on the amplitude of the central ring of the horizontal and
vertically displaced alias imaged, I estimate the maximum amplitude of
the aliased components in the bicubic example to be only 15% of the
original reference - that is a significant reduction of aliasing, not
complete elimination, but a significant reduction - on a target you
acknowledge to be "hypersensitive" to the problem. With bilinear
downsampling the maximum amplitude of the aliased signal, as shown in
your page, is even less!

This can only occur because a filter with a suitably limited MTF is
applied prior to the actual downsampling process. It is not a
consequence of the linear or cubic interpolation used, as can be readily
proven by applying such downsampling to single dimensional curves in
Excel or Mathcad. Furthermore, less capable software such as PSP,
either uses a different filter or none at all. Last time I checked PSP
(V7?) bicubic downsampling produced precisely the same level of aliasing
as the reference level.

Now, that 85% reduction also applies to any increase in high frequency
content that would be caused by applying USM to the scan produced by a
HyperCCD. Since, even after USM is applied, the MTF of the HyperCCD
scan at the Nyquist limit of the sample density is *still* zero, the
effect is negligible.

Stop and think about the logical consequence, and its relevance to this
thread, of what you are saying.

You are suggesting that the USM, which only goes some way to recover the
MTF of the scanning process for a HyperCCD to that of an undersampled
inline CCD, causes excessive aliasing (and you particularly specify
grain aliasing) on undersampling. The logical consequence of that is
that downsampling the output of a conventional linear CCD scanner, eg. a
typical film scanner, would be considerably *worse* when downsampled and
should be heavily filtered to avoid it!

Sorry Bart but no matter how you dress it up, the alias content of a
downsampled, USM filtered HyperCCD will *always* be less than the same
process applied to an inline CCD which, because of its intrinsically
undersampled nature, inevitably has a significant grain alias content in
before you even start!

Even though your own page demonstrates that regular *bilinear*
downsampling produces *LESS* aliased content than that? Compare the
amplitude of the diagonal alias patterns on your own examples of these
two downsample algorithms built into Photoshop, the bilinear at:
http://www.xs4all.nl/~bvdwolf/main/f...mple_files/Rin
gs1_BLrgb.gif
with the bicubic at:
http://www.xs4all.nl/~bvdwolf/main/f...mple_files/Rin
gs1_BCrgb.gif

Define "the correct type of USM". You know full well that there is no
single "correct type" since, amongst many other reasons, the USM cannot
lift the MTF at the Nyquist limit (or even close to it) to the level of
an inline device. The best that can be achieved is a level of USM which
does not cause the system MTF to exceed unity at any spatial frequency
(ie. produce ringing edges) or have an integrated noise gain of greater
than 2. There is an infinite number of such solutions.

That would be an adequate rule to apply to an undersampled system.
However we are applying the USM in this discussion to a system which is
oversampled by design - and even more oversampled by manufacture, given
the lens MTF that is fitted to the 2450. It makes absolutely no
difference whatsoever whether the USM is applied to the individual RGB
channels or simply to the luminance in that case.

I used the edge scan method to assess the performance of various
scanners I was buying. An edge scan has no ringing even after the USM
is applied on the Epson scanner - the resulting MTF or SFR never exceeds
the DC level except for noise at very low frequencies. You will find
ample evidence of edge and line pattern responses (as well as MTF
measurements) of this and other Epson scanners at James' scanner bakeoff
pages.
--
Kennedy
Yes, Socrates himself is particularly missed;
A lovely little thinker, but a bugger when he's pissed.
Python Philosophers (replace 'nospam' with 'kennedym' when replying)

Posted by Hecate on July 13th, 2005


On Wed, 13 Jul 2005 02:42:06 +0100, Kennedy McEwen
<rkm@nospam.demon.co.uk> wrote:


I'm not interested in the use of these filters except and insofar as
they apply to Photoshop and no professional I know, or have read,
wants anything to do with them, and nor do I. Personal experience,
plus the experience written by others leads me to conclude that whilst
you may be right in theory, in practice the PS sharpening filters,
apart from USM, are worse than useless.

--

Hecate - The Real One
Hecate@newsguy.com
Fashion: Buying things you don't need, with money
you don't have, to impress people you don't like...

Posted by Kennedy McEwen on July 14th, 2005


In article <2q1bd1178t8no8ic971tqnodohe76r2t67@4ax.com>, Hecate
<hecate@newsguy.com> writes
you will not want anything to do with any of them - for example, all you
have to do is take a look at a few 'Photoshopped' images on the net and
you will quickly find examples which have been ruined by inappropriate
or excessive use of USM. The fact that a filter can be used badly does
not mean they are "worse than useless", simply that the user doesn't
know what they are or what they are doing.

You may not be interested in finding out, and that is fine - there are
plenty of tools in PS that many users avoid completely because they have
a preferred workflow or no need for the use. But to publicly condemn a
tool because you have no interest in using it is complete arrogance.
--
Kennedy
Yes, Socrates himself is particularly missed;
A lovely little thinker, but a bugger when he's pissed.
Python Philosophers (replace 'nospam' with 'kennedym' when replying)

Posted by Hecate on July 14th, 2005


On Thu, 14 Jul 2005 08:31:33 +0100, Kennedy McEwen
<rkm@nospam.demon.co.uk> wrote:

I'm not just disagreeing with you on "the fact that a filter can be
used badly" I'm disagreeing with you on whether the filter can be used
at all with anything less than resulting, and obvious, sharpening
artifacts, except in very small doses on specific small objects with a
much larger image. The difference with USM is that, used properly,
USM will give you a reasonable result across a whole image -
particularly where you are correcting for the inherent softness of RAW
files. Applying sharpen to a whole image just results in a mess.

No, you#'re not getting what I'm saying. What I'm not particularly
interested in is information that apply specifically to the use of
Photoshop (not your suggestion of reading about image processing that
doesn't). I never have been, nor do not intend, to make a study of
the physics of it.

I leave that to other people - like you

--

Hecate - The Real One
Hecate@newsguy.com
Fashion: Buying things you don't need, with money
you don't have, to impress people you don't like...

Posted by Kennedy McEwen on July 14th, 2005


In article <bbodd152jesbue04kq6klka9dl7ccdc40v@4ax.com>, Hecate
<hecate@newsguy.com> writes
sharpening artefacts and a mess - that certainly is NOT true. Whilst
the effect of these filters may result in some artefacts with images
which are undersampled in the first place, by producing an MTF which
exceeds unity, that certainly is not the case in general. In fact, I
have yet to see a *single* instance of "sharpening artefacts" caused by
the application of the standard level of the sharpening filter even to
images downsampled from raw scans. I have certainly seen many instances
where "sharpen more" was excessive and produced artefacts, but I have
also seen images where even that level does not produce any noticeable
issues. Applying these filters to the output of a flatbed scanner, for
example, certainly will not "result in the mess" that you predict.

Yes, you have a problem using them and the standard levels are, by no
means, as flexible as the USM, but your claims are ridiculously
exaggerated.
--
Kennedy
Yes, Socrates himself is particularly missed;
A lovely little thinker, but a bugger when he's pissed.
Python Philosophers (replace 'nospam' with 'kennedym' when replying)


Similar Posts