Pages: 1 [2]   Go Down

Author Topic: Bayer Interpolation and Re-sampling question  (Read 24173 times)

hjulenissen

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2051
Re: Bayer Interpolation and Re-sampling question
« Reply #20 on: October 02, 2013, 09:05:36 am »

Another imaging defect results from insufficient sampling of a target with discrete lines which are thicker than the pixel width is ghosting as illustrated in your shot and below where the vertical black line has double grey ghosts due to insufficient sampling.
I believe that the bandwidth of the pulse that you are trying to record in your scetch is too wide? A pulse containing infinitely sharp transitions translates into a spatial-frequency domain sinc of infinite extent, meaning that it occupies (towards) infinite bandwidth.

A "proper"*) sampling system cannot generally recreate that pulse at that sampling rate. The options are either to:
1. Prefilter before sampling (so as to remove frequencies that cannot be reliably recreated)
2. Increase the sampling rate (for this example: towards infinity)
3. Sample with insufficient prefiltering, violating Nyquist, living with aliasing

Your (computer-generated) example seems to use a simple pre filter (relying on the area integration of each sensel). Something sinc-like would probably give more accurate results, but is not usually possible in optical systems.

If the pulse had been shifted by 1/2 sensel left or right, the apparent sampling system would seem to work: the (boxcar filtered) output would be identical to the (boxcar filtered) input. This might be the case for font designers and graphics arts that have a high degree of control over the sampling grid. It cannot be relied upon for general cameras where scene elements move unpredictably around. I think there is a unnecessary big divide between how "dsp-people" think about this and how "graphics/image" people think about this.

-h
*)Taken here to mean a close approximation to a Shannon-Nyquist sampler operating in the baseband
« Last Edit: October 02, 2013, 09:20:40 am by hjulenissen »
Logged

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Re: Bayer Interpolation and Re-sampling question
« Reply #21 on: October 02, 2013, 09:38:37 am »

I believe that the bandwidth of the pulse that you are trying to record in your scetch is too wide? A pulse containing infinitely sharp transitions translates into a spatial-frequency domain sinc of infinite extent, meaning that it occupies (towards) infinite bandwidth.

A "proper"*) sampling system cannot generally recreate that pulse at that sampling rate. The options are either to:
1. Prefilter before sampling (so as to remove frequencies that cannot be reliably recreated)
2. Increase the sampling rate (for this example: towards infinity)
3. Sample with insufficient prefiltering, violating Nyquist, living with aliasing

Your (computer-generated) example seems to use a simple pre filter (relying on the area integration of each sensel). Something sinc-like would probably give more accurate results, but is not usually possible in optical systems.

If the pulse had been shifted by 1/2 sensel left or right, the apparent sampling system would seem to work: the (boxcar filtered) output would be identical to the (boxcar filtered) input. This might be the case for font designers and graphics arts that have a high degree of control over the sampling grid. It cannot be relied upon for general cameras where scene elements move unpredictably around. I think there is a unnecessary big divide between how "dsp-people" think about this and how "graphics/image" people think about this.

-h
*)Taken here to mean a close approximation to a Shannon-Nyquist sampler operating in the baseband

What you say is likely true, but in real world images (as well as your posted images) one does see the ghosting that I described. The effect is shown below at various frequencies with a line pattern. This is with the D800e, which lacks a low pass filter.  What do you think?

Bill

« Last Edit: October 02, 2013, 10:03:36 am by bjanes »
Logged

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8914
Re: Bayer Interpolation and Re-sampling question
« Reply #22 on: October 02, 2013, 10:04:13 am »

What you say is likely true, but in real world images (as well as your posted images) one does see the ghosting that I described. The effect is shown below at various frequencies with a line pattern. What do you think?

Hi Bill,

That's correct, but it also shows why bi-tonal targets are unsuited for evaluation of discrete sampling sensor systems. In normal scenes such extremely high spatial frequency edge transitions rarely exist, but when they do they will cause issues due to imperfect low-pass filtering of the capture system.

Cameras without an additional OLPF (like the D800E, Foveon based cameras, MFDBs) only have their optical aberrations, diffraction, and defocus, to reduce these unwanted artifacts. All solutions represent imperfect trade-offs, so it's a case of picking one's poison. Part of the solution is to increase the sampling density, because that will reduce the likelihood of such fine edge transitions to be present, or in adequate focus.

Cheers,
Bart
« Last Edit: October 02, 2013, 10:07:27 am by BartvanderWolf »
Logged
== If you do what you did, you'll get what you got. ==

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Re: Bayer Interpolation and Re-sampling question
« Reply #23 on: October 02, 2013, 10:36:52 am »

Hi Bill,

That's correct, but it also shows why bi-tonal targets are unsuited for evaluation of discrete sampling sensor systems. In normal scenes such extremely high spatial frequency edge transitions rarely exist, but when they do they will cause issues due to imperfect low-pass filtering of the capture system.

Cameras without an additional OLPF (like the D800E, Foveon based cameras, MFDBs) only have their optical aberrations, diffraction, and defocus, to reduce these unwanted artifacts. All solutions represent imperfect trade-offs, so it's a case of picking one's poison. Part of the solution is to increase the sampling density, because that will reduce the likelihood of such fine edge transitions to be present, or in adequate focus.

Cheers,
Bart

Bart,

Thanks for the confirmation. For my testing I now use your sinusoidal Siemen's star and slanted edge target. Your online tool is quite helpful and informative. However, those who persist using the line tools will see this artifact.

Bill
« Last Edit: October 02, 2013, 10:38:26 am by bjanes »
Logged

hjulenissen

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2051
Re: Bayer Interpolation and Re-sampling question
« Reply #24 on: October 02, 2013, 02:43:47 pm »

What you say is likely true, but in real world images (as well as your posted images) one does see the ghosting that I described. The effect is shown below at various frequencies with a line pattern. This is with the D800e, which lacks a low pass filter.  What do you think?
It may be similar to photon shot noise. It is there, no-one likes it, and there is no obvious cure except increasing the amount of photons.

-h
Logged
Pages: 1 [2]   Go Up