|
From: Bart van der Wolf on 9 Apr 2005 16:09 "Kennedy McEwen" <rkm(a)nospam.demon.co.uk> wrote in message news:t2HlEwAUk6VCFw8a(a)kennedym.demon.co.uk... SNIP Thanks for the correction, and additions. Bart
From: Bart van der Wolf on 10 Apr 2005 10:39 "Kennedy McEwen" <rkm(a)nospam.demon.co.uk> wrote in message news:doMJzyD2kEWCFwDh(a)kennedym.demon.co.uk... SNIP > Bart, since you are using this test application, it might be worth > running the same MTF assessment on a negative image of the standard > pattern, to check the asymmetric response that your scanner has is > not driving the results you achieve. > > I don't know if Imatest would work with that, although I suspect it > would. However, it would be easy enough to invert the data after > capture to ensure that it would be compatible. In my case it happens to give identical results (ignore red lines): http://www.xs4all.nl/~bvdwolf/temp/scan0017_Y_cpp.png shows the edge profile, and SFR, and after inverting it in Photoshop http://www.xs4all.nl/~bvdwolf/temp/scan0017PSinvert_Y_cpp.png the evaluation gives identical results in these linear gamma evaluations. In some other tests I have seen, the Edge profile may show a slightly more asymmetric edge but that might be caused by slope limited gamma conversion (one of the reasons I prefer Gamma = 1.0 tests right from the start). Bart
From: HvdV on 13 Apr 2005 16:15 Hi Bart, > > > By oversampling the sensor element's response. A slanted edge target of > adequate size allows to take (a statistically useful multiple of) about > 10 samples at different overlap positions per pixel. When you realize I see, so Imatest takes it as multiple 1D edge responses to decode the aliased frequencies from the image. > that the Nyquist frequency limits reliable resolution to (pixel > dimension)/2 cycles per image dimension, it (hopefully) explains why The sensor element size will indeed reduce the higher frequencies and cause zeros in the band. > oversampling allows to measure beyond Nyquist (which helps to > value/quantify the aliasing tendency). > > > In fact, a slanted edge target allows to produce an accurate > (oversampled) Line Spread Function. The MTF is just the Fourier Power > Spectrum of the first derivative of that LSF. So, basically all that is > needed is an accurate Edge Spread Function for the image dimension of > interest, and some math. Would be a good idea to have a line object, one could do away with the ugly differentiation then. The smaller size gives rise to a weaker signal, but that can be countered by integrating along the line. I'm not speculating, I did something like this in the microscopy field. Still better is measuring Point Spread Functions, but it takes some equipment to manufacture test samples. > >> Also I noted that your 50% MTF is at 60 cy/mm whereas in the results >> you published on >> http://www.jamesphotography.ca/bakeoff2004/scanner_test_results.html >> a 50% MTF of 23.8 is given. Can you explain? > > > That was due to: > 1. A less than perfect target capture/slide, like caused by less than > perfect focus for the lens used to capture the image (or the lens I used > just performs better than Jim Hutchinson's). > 2. In the Bakeoff 2004 you get a combined lens+film+scanner imaging > chain result, and in my "scanner alone" the non-scanner image is as > close to perfect (neither camera lens aberration nor focus error or > camera shake) as can be realistically expected. So the other parts in the chain largerly dominate the results, which explains why everything is so close together. This suggests that the 'bakeoff' is fairly useless to judge scanner quality. I'm glad you published your measurements! > > It's not too bad, although using a program like "Imatest", and MS Excel > for the summary graphs, really helps ;-). I used to use an ISO provided > example program for the SFR evaluations, but Imatest (www.imatest.com) > is much more convenient, and it provides several other useful image > quality evaluations. I looked at the imatest results, I get the impression the accuracy of the OTFs is fairly limited for higher frequencies. I wonder how they reproduce if you repeat an experiment. -- Hans
From: HvdV on 14 Apr 2005 16:10 Hi Kennedy, (cc to Kennedy, getting OT) > In article <425D7DE8.5060308(a)svi.nl>, HvdV <nohanz(a)svi.nl> writes > >> Would be a good idea to have a line object, one could do away with the >> ugly differentiation then. The smaller size gives rise to a weaker >> signal, but that can be countered by integrating along the line. I'm >> not speculating, I did something like this in the microscopy field. > > > Unfortunately it doesn't work with sampled imaging sensors, although it > is standard practice for continuous systems. Why? Even in the speudo 1-D approach I can imagine averaging over multiple similarly shifted pixels. Which can be extended to multiple lines. > > You need to have a line object which is much finer than the pixel pitch > to stimulate response up to and beyond Nyquist. The actual position of First of all, to the side, 'Nyquist' is used a bit strangely in this newsgroup, in signal and image processing the following is used: The Nyquist-Shannon sampling theorem stablishes that "when sampling a signal (e.g., converting from an analog signal to digital), the sampling frequency must be greater than twice the bandwidth of the input signal in order to be able to reconstruct the original perfectly from the sampled version" (http://en.wikipedia.org/wiki/Nyquist-Shannon_sampling_theorem) In short, the critical sampling frequency (Nyquist rate) follows from the signal, not from the sensor. If you violate the theorem, as Bart's measurements show some scanners do, the perfect reconstruction is not always possible. Except for simple objects. The role of the anti aliasing filters is to throw away bandwidth in order to reduce the Nyquist rate so it matches the sensor pitch. Regarding the size of the test object, line or sphere, it does not need to be extremely small, but you have to know its geometry. Roughly, the test object can be as wide as the PSF, beyond that accuracy suffers. You recover the true PSF from the image with an inverted deconvolution procedure, which also gets you around the holes in the object spectrum. > > I have been using the sloping edge method for almost 2 decades now, > since it was pioneered by a colleague of mine at what was then the Royal > Signals and Radar Establishment, in Malvern, England - the same > establishment that developed radar, LCDs and a host of other > technologies we take for granted. It is fairly recent that it has been > standardised by ISO for the measurement of digital cameras and scanners. Incidently, the technique I mentioned above was developed >15 years ago in the contex of a superresolution project with a former collegue of yours, Roy Pike, he worked for or with the RSRE around that time. > >> Still better is measuring Point Spread Functions, but it takes some >> equipment to manufacture test samples. > > > Again, you need to scan the point across a sample, in 2 dimensions, to > measure the PSF. Without scanning you cannot get information beyond > Nyquist, and even the PSF you get below Nyquist (which means the spot is > larger than the sample pitch) will be vary significantly due to the > phase of the aliased components. I'm not so sure this can't be done. Using the a priori knowledge of the test object geometry and positivity of the signal you can probably reconstruct the position of the test objects with sub-pixel accuracy, which would be as good as scanning them. IMO the really nasty problem here is that all this assumes that we are dealing with a linear system, which is not entirely true. Sorry for the rather OT character, cheers, Hans
From: HvdV on 16 Apr 2005 11:25
Hi All, This post is getting really off topic, sorry about that, but I felt it was still relevant to the film scanner topic, hope you agree! > > > Because it isn't a matter of averaging, but of measuring the output as a > function of the phase of the input stimuli relative to the samples. You > can average as many similarly shifted pixels relative to the input > stimulus as you like, but that will only give you one value - and that > is just a single point on the LSF. You must then *change* the phase of > the stimulus and measure another point on the LSF. It is not necessary to do the integration by resampling, the integration follows from the known shape of the measurement object and other constraints which might be imposed, like the known bandwidth of the optics. What you do with the slanted edge fits also in this framework: without knowing it can be represented by a step function at a certain angle you cannot decode the aliased frequencies in the data. This leads to my initial remark: is a step function the ideal test object? Due to the rapidly decaying frequency content of a step function I think it isn't. A thin bar would be better, but still you'd measure only a line in the 2D OTF, plane if you go for the full 3D OTF. I suspect the sole reason edges are used is that they are easy to make at this scale. Nothing wrong with that, but it is a good idea to keep looking for better test objects. > >> Which can be extended to multiple lines. > > > Yes, you can use multiple lines, but these must be arranged in an exact > relation to the samples so that each line is at an incremental phase > relative to the sample. That is almost impossible to achieve with a > scanner since the mechanical steps and the optical magnification are not > likely to be accurate or stable enough for such a pattern of multiple > lines to be produced. Sufficiently small circular or spherical objects with known diameter will do the trick, position can be random. > >> >> First of all, to the side, 'Nyquist' is used a bit strangely in this >> newsgroup, in signal and image processing the following is used: >> The Nyquist-Shannon sampling theorem stablishes that "when sampling a >> signal (e.g., converting from an analog signal to digital), the >> sampling frequency must be greater than twice the bandwidth of the >> input signal in order to be able to reconstruct the original perfectly >> from the sampled version" >> (http://en.wikipedia.org/wiki/Nyquist-Shannon_sampling_theorem) >> > And the consequence is that the maximum input frequency that the > sampling system can unambiguously represent, the Nyquist limit > frequency, is half the sampling frequency. Please reread the quote, it states the Nyquist rate is related to the properties input function or signal. After checking some literature, it seems optics related literature uses this form. In one reference, Numerical Recipes, the usage was mixed between yours and this one. > > When you invent a filter that will throw away the unwanted bandwidth > above the Nyquist limit of your scanner without loss of contrast, ie > poor MTF, below the Nyquist limit then you will be a rich man! ;-) > There are techniques to do this with monochromatic sources, but > currently none that work broadband. The best you can do currently is to > design the sensor so that the sampling exceeds the optical cut-off of > the system, which requires very high resolution. (eg. an f/2 diffraction Which is how it *should* be done. > limited lens will resolve out to 25,400cy/in which, as you note above, > requires 50,000ppi sampling!) For an incoherent system it's delta_x = lambda/(2 n sin(alpha)), alpha the half aperture angle, n the refractive index. For 500nm light, .45 radians aperture you get ~280 nm. In ppi that is ~90.000. For a coherent system it is half of that, close to your value. But in systems like this there is always partial coherency. BTW a jam-jar-bottom lens of that aperture has the same bandwidth. > > A lesser, but more practical, alternative is to oversample the CCD > elements themselves, by half-stepping and/or staggering the lines. In > this technique, the MTF of the CCD pixel itself, nominally a sinc > function, multiplied by the MTF of the practical optic, effectively cuts > the response around the first zero of the sinc function. Since that > occurs at a spatial frequency of 1/(cell width), and the CCD may be > close to 100% fill factored, all that is required to meet the Nyquist > criteria is to sample at half the cell pitch. Hence two CCD rows are > used with a half pixel stagger between them. Epson were the first to > introduce this about a decade ago with their HyperCCD, although Canon > preceded them with a mechanically dithered system using a single CCD > line for each colour instead of two. These days you would be hard > pressed to find a high resolution flatbed that doesn't have this feature. ok, that makes it easier to meet the bandwidth of the lens. > > > <snip> > Again, this only recovers the PSF and is a consequence of the fact that > the signal you measure is the convolution of the PSF and the spot, or > line, shape. However it doesn't overcome the fact that you have > insufficient resolution to determine the PSF in the first place unless > you come up with some oversampling scheme. Furthermore, the larger the > spot or line is, the lower the zeros in its MTF appear and consequently > the noisier that deconvolution becomes - the noise is a consequence of > the spectral nulls - even though inversion prevents an unspecified > result occurring, it doesn't eliminate the noise it causes. That is why > the differentiation of an edge is better, completely avoiding the issue > of spectral nulls. One advantage of using an reversed iterative deconvolution technique is that you separate the measurement space from the object (in this case the PSF) space. That allows you to estimate the object outside the measured region, very useful to remove blur, but also to handle 'missing' data. In order to do that in noisy conditions you need to put in as much as possible a priory information, for example the known geometry of the test object, but also the statistical properties of the noise, aperture of the lens, and so on. > > Let's try explaining this another way. Consider a single pixel in the > CCD - that has a spatial frequency response, the CCD MTF. Lets ignore > the optics for the moment, which only degrade the MTF of the overall > system. The MTF is just the modulus of the fourier transform of the > PSF. Now, since you only have one pixel, you cannot measure the PSF > directly in a single measurement - you need to scan the point across the > field and measure the output of the single pixel at each and every > position. At some positions the spot will be off the pixel, giving no > signal, at others it will be perfectly aligned with the pixel, giving > maximum signal, and at other positions in between, the pixel and the > spot will partially overlap giving an intermediate signal. The shape of > the signal plotted against the scan position is a convolution of the > spot and the pixel PSF. Since the spot is finite, you can get the pixel > PSF by deconvolving the overall PSF with the shape of the spot. That is > just standard stuff. There is a little more involved... > > The critical issue though, is that you must have sufficient data of the > PSF shape to be able to determine the MTF. As a consequence of > Nyquist-Shannon, you actually need more than 2 non-zero points on each > side of the PSF to get a minimum approximation of the MTF. All of this > is fine if the PSF is large and extends across several CCD cells, It always does since its Fourier transform is finite. <snip> > > Now, instead of scanning the spot across the cell in very fine steps, > you can achieve the same effect by tilting a line slightly off of the > scan axis. Then each pitch sized step produces a slight shift of the > line relative to the CCD cell and hence a measure of the output from the > cell at a fine scan step - the ratio of the pixel step and the shift > simply being the gradient of the line. Technically this gives a > convolution of the line width and the system LSF, which is the PSF in > the axis across the line, but critically, it is at finer steps than the > coarse samples - the LSF has been oversampled. Thus the shape of the > LSF can be determined with sufficient accuracy by deconvolving it with > the known line width, and then FTing and determine the MTF in that axis. > Similarly the line can be replaced with an edge and the ESF > differentiated to obtain the LSF. > > The critical step is oversampling - whether using a line or an edge is > irrelevant. However, you have no means of oversampling AND averaging > along a line, which is necessary to compensate for the loss of signal, > while the edge technique requires no averaging because it uses maximum > contrast throughout, and gives a good SNR at each position. Yes, you can do the averaging, the constraints in the deconvolution do this for you automatically! These can also be extended over multiple objects, even multiple images. > > Not a name I recognise - but it sounds like he worked with Lettington > who discussed this type of process with me a lot. Even so, it doesn't > address the oversampling - you need to have adequate information on the > shape of that PSF before you can get the MTF. Without oversampling > there just isn't enough detail and deconvolution, however it is > performed, isn't going to add in what isn't there to begin with. A common misunderstanding. You *can* retrieve 'lost' spatial frequency components *and* lost spatial structures at the same time. There is quite an amount of literature on the topic. For example 'Introduction to inverse problems in imaging' by Bertero & Boccacci is quite accessible. But I'm afraid nothing short of me producing a piece of software which does the job will convince you. > > > > You haven't used many commercial scanners, have you? ;-) That's not an argument. > When a manufacturer quotes 4000ppi, it could be anything from less than > 3900 to 4100 or more - and the same device will vary throughout a > significant part of that range as a function of temperature and focus > position. So you don't have any "a-priori" knowledge of the test > geometry at all. Even worse, you might think you do and consequently > produce meaningless data. Calibration errors are always a serious concern, sure. BTW, it would be interesting to see film scanner MTFs in more than one directions. > >> IMO the really nasty problem here is that all this assumes that we are >> dealing with a linear system, which is not entirely true. >> > Actually, the linearity of most CCDs is pretty impressive - more than > good enough for these purposes, although I would not base a measurement > on an edge that came close to saturating the CCD range for this very > purpose. IIRC, Imatest actually warns specifically about that. Sorry, I was not thinking of CCD linearity but rather of the coherency problem, but found it too off topic to mention. -- Hans |