Kennedy McEwen ha scritto:
Oh but it wasn't a bad comment on you
That's OK - I didn't take it that way and appreciate that you recognise
the value of the detail, something that seems to get overlooked more and
more these days.
When you talk about MFT and so on, I think I can grasp the basic ideas
behind those concepts, but can't really *understand* them to any
extent.
MTF is just a measure of the contrast that a particular component can
reproduce as a function of spatial frequency - it is the spatial
frequency response of the component - just like the graphs that used to
be printed on the back of audio tapes and hi-fi components showing their
response to audio frequencies. The main advantage of MTF in the
analysis of imaging systems is that the total response of a system is
exactly the product of all of the linearly combined individual
components. So with a knowledge of the components, you can derive an
exact measure of the system frequency response - and with a knowledge of
the frequency response you can predict the behaviour. You probably do
understand this, but I added it after writing a lot more about MTF than
I initially intended to later in this post.
But I can see two scenarios:
1) when there is no resolution advantage, is it really *exactly* as
multisampling, or does it lose some ground because of the misalignment?
or can the lost ground be re-gained with appropriate post-processing?
Well, it isn't *exactly* the same as multisampling, but the difference
is minimal and averages out. Only in the special case where there is no
spatial frequency higher than 0cy/mm on the image (a completely bland
and uniform scene) then clearly it doesn't matter where in that scene
the samples are taken, they should all produce the same data, varying
only by the noise of the system. However, if the scene contains a
single low spatial frequency of, say, 1cy/mm then there will be a
systematic difference between samples taken at different phases of that
pattern - even though the spatial frequency is much lower than the
resolution of the basic single CCD line let alone the combination of the
two offset lines. However, since there is no correlation between the
sensor and the scene, that difference will be positive just as often as
it is negative and on average it will cancel out.
With clearly no resolution to be gained, this effect is negligible.
However you can see that with a spatial frequency at the limit of the
single line of sensors, ie. still no actual resolution to be gained,
then a second sample with a half pitch offset can be up to a 50% of the
reproduced contrast level from the original sample. (for example, say
the original CCD line sampled the peak and troughs of the sine wave,
then the corresponding offset sample would be at the mid point, with 50%
level difference from either adjacent original - again averaging out to
zero. Obviously the contrast itself is only 64% of the peak due to the
finite width of the CCD cell being half the cycle of the sine wave, so
you are looking at a total possible error of 32% - and the lens reduces
this significantly further, perhaps to 2-3% at this spatial frequency.)
The noise, however, is always reduced by the square root of the number
of samples used.
2) when there *is* resolution advantage, can the multisampling
advantage exploited *together* with the resolution advantage, or must a
choice be made?
I don't see what you mean by "a choice being made" - it is merely
increased data sampling and you can increase the frequency response of
the system through post processing to maximise the resolution gain at
the expense of signal to noise ratio or decrease the frequency response
to maximise the SNR at the expense of resolution.
The fact that the sensors overlap in object space is not really an issue
- in fact, the individual sensors of *ALL* scanners and digital cameras
can be considered to overlap in the same way sue to the blurring effect
of the lens (you can view this as blurring the image of the scene on the
sensor and as blurring the image of the sensor on the scene). It just
comes down to the component MTFs and the sampling density employed as to
how significant that "overlap" appears relative to the samples used.
One analogy that may help you visualise this is to consider the linear
CCD, not as an array of individual identical sensors, but as a single
cell which scans the image along the axis of the CCD. This single cell
will produce a signal continuous waveform as it scans along the axis of
the CCD. If that waveform is now sampled only at the precise positions
where the cells in the original CCD exist then the resulting sampled
waveform will be indistinguishable from the output of the original CCD.
Now, that probably doesn't seem to make much difference initially, but
since the result is the same then the same equation describes the
waveform. The waveform of the scanned single element is simply the
convolution of the image projected onto it by the lens and the point
spread function of the single element - effectively its width. This
corresponds exactly to the product of the fourier transform of the image
(ie. its representation as a series of spatial frequencies as reproduced
by the lens) and the MTF of the individual cell. So now we have a
spatial frequency representation of the continuous waveform of the
single scanned cell - the fourier transform of the waveform. The
sampling process is simply multiplying the waveform by a series of delta
functions at the sampling positions, which corresponds to convolving the
fourier transform with a series of delta functions at the sampling
frequency and its harmonics. (This is the source of the aliasing etc.
where the negative components in frequency space appear as positive
frequencies when their origin is shifted to the first sampling frequency
- but that is another issue.)
So we can derive an equation to describe the output of the linear CCD by
considering it as a sampled version of a single scanned element. The
real advantage is that this equation is not restricted by the physical
manufacturing limitations of the CCD - there is no relationship between
the pixel size and pitch inherent in that equation. The cell dimension
can be very small or very large compared to the sampling frequency - the
equation remains unchanged.
For a square cell of width a, the MTF is readily computed to be
sin(pi.a.f)/(pi.a.f) [ensuring you calculate the sin in radians]. You
might like to plot out a few of these curves for different sizes of
cell. A cell from a single line 1200ppi CCD will have an effective cell
width of around 20um, a cell from a single line 2400ppi CCD will have a
width of around 10um. What you should see from this exercise is that
changing the cell width only changes the spatial frequency response of
the system. This is completely independent of the sampling density -
the size of the CCD cell is just a spatial filter with a particular
frequency response, just the same as the lens itself is another such
filter with known frequency response. Unlike the CCD cellular MTF, the
lens has a finite MTF (meaning that it falls to zero at a particular
spatial frequency and stays there at higher frequencies than this
cut-off). One of the rules of fourier transforms is that finite
functions on one side of the transform result in infinite functions on
the other side - so, while the CCD cell has a finite dimension and
spread it has an infinite frequency response (albeit at low amplitude),
the lens has a finite frequency response and consequently an infinite
spreading effect on the image (albeit at low amplitude). Hence my
earlier comment that the no optical scanner actually has sensors which
do not overlap to some degree. All that is different is how much
response remains in the system at the sampling density - ideally,
invoking Nyquist, there should be no response to frequencies greater
than half the sampling density.
With a scanner which has a staggered CCD or half steps the linear CCD in
the scan axis, all that is happening is that you move the sampling
frequency further up the MTF curve - where the contrast reproduced by
the lens and the CCD itself is less. So there really isn't a choice to
be made that is any different from how you would treat a full stepped
4800ppi scanned image to how you would treat a half stepped 4800ppi
image - they both behave exactly the same.
There is also a post by you where you say that half-stepping on the
vertical axis is next to useless, at least concerning resolution.
Yes, for the reasons provided above. Once you include the optic MTF
and the CCD cell MTF and then plot where the sampling frequency is, it
is clear that all of the spatial frequencies that can be resolved by the
system are done so well before the advantage of half stepping
(effectively increasing the sampling density by x4) is realised.
But I can clearly see that it *is* useful in terms of noise reduction,
just by taking a scan at 2400x4800 (and then downsampling the 4800) and
one at 2400x2400.
Yes, because the resolution benefit is negligible, so all of the
additional information is simply noise reduction.
When half-stepping, scanners usually interpolate on the horizontal axis
to get a 1:1 ratio. This I don't like (and in fact I'm trying to modify
my SANE driver accordingly): I'd like to take a purely 2400x4800 scan,
and then downsample *appropriately* on the vertical axis.
That would be an average of each of the two 4800ppi samples.
My scans at 1200x1200 are awfully noisy; those at 2400x2400 are better,
but I certainly do appreciate the benefit of 2400x4800, at least for
some pictures.
Yes, 2400x2400ppi downsampled to 1200x1200ppi will have a x2 improvement
in SNR, assuming that the noise is not limited by bit depth you use in
the process. 2400x4800ppi down to 1200x1200ppi should provide about
x2.8 in SNR.
What worries me is the "nominally the same data" part. It's not
nominally the same data in the real world, unless the original is of a
much lower resolution than the sampling rate.
It's *almost* the same data, but shifted -- half a pixel horizontally
(double CCD), and 1/4 of a pixel vertically (half-stepping).
It is shifted, but that is just a higher frequency sample. The shift in
sample position will only produce a difference in signal if there is a
resolution gain to be obtained - what you are trying to do is forego any
resolution benefit for the SNR benefit.
So, I'm under the impression that scanning at 2400x4800 (let's talk
about the half-stepping and ignoring the double CCD)
- they are both the same thing in principle.
and then
downsampling the vertical axis gives me a less noisy, but blurrier
image than scanning at 2400x2400.
The slight loss in doing this is due to the change in the MTF of the
system. If you average two cells from a 1200ppi line that are offset by
1/4800ppi then there is a slight increase in the overall size of the
cell - but this is marginal in the scheme of things. A rough gide of
how significant can be seen by examining the MTF of a cell 1/1200" wide
at a spatial frequency of 4800ppi, the shift that is present. A more
detailed assessment of the MTFs shows that the difference at the
limiting resolution of the 1200ppi image is only 3%, and less than 1% at
4800ppi, confirming that the shift itself is negligible as is the
resolution gain.
This wouldn't happen with "real" multi-sampling, i.e. samples taken at
exactly the same position. Question is, is there a software fix for
this? I'm taking your answer, below, as a "mostly no"...?
No, not at all, just that re-alignment isn't it - there are too many
losses in the process for it to yield a worthwhile benefit.
I.e. an image made by (all pixels from line n + every pixel from line
n+1) / 2 (that is considering only one direction)?
But this is really the same as treating it as a "standard"
multi-sampling, i.e. with no offset, isn't it?
Yes, because when the sampling density is this much higher than the
resolution of the system that shift is no longer significant.
Then what about the various bilinears, biquadratics and bicubics?
Just different downsampling algorithms - the difference between them
swamping the effect that this minor shift has. In effect these are
interpolations with different frequency responses - the higher the order
the flatter and sharper cut-off of the frequency response, so the better
the result.
Which is to say that the offset between each pair of scan lines can't
be really accounted for in software?
Exactly - but it can be very closely approximated.
In any case I don't fully understand why you say that half-pixel
realignment isn't worth doing. I know the explanation would get
technical, but just tell me, shouldn't it be just as worthless when
done on multi-scans (the Don way, I mean, taking multiple scans and
then sub-pixel aligning them)?
What you are doing is not the same as what Don is trying to achieve. You
are multisampling, which means the noise throughout the density range of
the image reduces by the square root of number of samples. Don is
extending the dynamic range of the image directly with an improvement in
the noise only in the extended region which is directly proportional to
the scale of the two exposures. These are very different effects for
very different applications. Don's technique, for example, is very
useful with high contrast and density originals, but offers no advantage
with low contrast materials such as negatives. Conversely,
multiscanning offers the same, albeit reduced, advantage to both. For
example, Don's technique can extend the effective scan density by, say,
10:1 (increasing the Dmax by 1) reducing the noise in the shadows by the
same amount, in only two exposures. Multiscanning will only reduce the
noise by 29% (ie. 71% of its original) with two exposures, or 68% (ie.
to 32% of its original level) with 10 exposures.
Since the benefits of multiscanning are much less direct, being only a
square root function, the susceptibility of that benefit to unnecessary
processing losses is consequentially higher.
The only difference is that, in "our" case, the amount of misalignment
I see. But do you agree with me, in any case, that on the vertical
axis, the 4800 dpi of "resolution" are worthless as *resolution* and
much more useful as a substitute for multi-sampling (i.e. for improving
SNR)?
Absolutely! (and have stated as much on several occasions).
But anyway, what do you have to say about the unsharp masking -- which
I certainly consider doing on 2400x2400 scans?
My impression is that the standard, consumer-oriented Internet sources
say "just apply as much unsharp masking as you see fit".
But shouldn't there be an exact amount and radius of unsharp masking
that can be computed from the scanner's characteristics, seeing from
the things you said in the various threads (which I only very partially
understood, though)?
Yes, there should be and there is. There is also an exact amount of USM
that is required for any particular output, whether screen or print and
that changes with scale etc. The general advice of "apply as required"
is usually given because estimating the exact amount of sharpening (not
just USM) to compensate for the scanner, printer (and any loss in the
original, such as the camera lens etc.) is extremely complex.