Pages: [1] 2 3 4   Go Down

Author Topic: Resolution and alaising challenge  (Read 44144 times)

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Resolution and alaising challenge
« on: October 17, 2011, 12:30:55 pm »

Bart van der Wolf has published an innovative resolution test target based on a Siemens star with sinusoidally varying radial bars. The target avoids error generating sharp edges and records real resolution in many orientations with a single shot. Shooting distance is noncritical, and a target distance of 20-50x the focal length of the lens is suggested.

Aliasing artifacts stand out by their seemingly hyperbolic divergence from the expected radial direction. Frequencies beyond the Nyquist limit will either be blurred to zero contrast or aliased. One can determine the resolution in cycles per mm or cycles per pixel as Bart describes in his post (the maximal resolution of an ideal sensor is 0.5 cycles per pixel). Results of shooting this target with the Nikon D3 are shown below. The image must be viewed at 100% on the screen to avoid screen induced aliasing. The circle indicates the Nyquist limit of the sensor, which is 59 cycles/mm. Some aliasing with Moire is present beyond Nyquist. Calculated resolution is 56 cy/mm or 0.46 cy/pixel.



The image was taken with the 60mm/f2.8 MicroNikkor, which likely out-resolves the sensor of the camera. However, a good lens improves image quality even with a relatively low resolving camera by providing good MTF below the Nyquist limit. One can calculate MTFs at various frequencies by using the slanted edge portions of Bart's target with Imatest. Results for this camera are shown with the image rendered by ACR ver 6.5 with default settings (including sharpening). The MTF at Nyquist is an indication of aliasing.



The extent of aliasing can be shown with Bart's target. Aliasing and Moire beyond Nyquist are evident and are not completely eliminated by the blur filter that this camera uses.

It would be interesting if users of other cameras, especially those without blur filters, would post their results. MFDB results would be of special interest, since this method clearly demonstrates aliasing. The effects of aliasing on image quality is debated, but Canon and Nikon provide these on their dSLRs for a reason despite their considerable expense. (I can anticipate practical photographers stating that they take photographs of landscapes, etc, and not test targets  :)).

Regards,

Bill
Logged

Fine_Art

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1172
Re: Resolution and alaising challenge
« Reply #1 on: October 17, 2011, 02:29:52 pm »

Its a great pattern, exactly what you need for testing your new lens. I'm still unclear on the diameter measurement. If it had small lines at right angles along one direction stating % of picture height or something similar it would be perfect. Please fill me in if I did not understand something. After taking the shot you convert the raw looking carefully (probably zoomed in) for where the lines start to fail. Marking the diameter is easy. Now you have to decide on how many pixels it is relative to the whole shot? Does the software imatest do this for you?
Logged

Fine_Art

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1172
Re: Resolution and alaising challenge
« Reply #2 on: October 17, 2011, 02:37:49 pm »

I guess you can crop the center circle out to a new picture which will give you the number of pixels rather than having to counting them. Then the ratio of that vs the number of pixels in the whole shot should be straightforward.
Logged

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Re: Resolution and alaising challenge
« Reply #3 on: October 17, 2011, 03:43:40 pm »

Its a great pattern, exactly what you need for testing your new lens. I'm still unclear on the diameter measurement. If it had small lines at right angles along one direction stating % of picture height or something similar it would be perfect. Please fill me in if I did not understand something. After taking the shot you convert the raw looking carefully (probably zoomed in) for where the lines start to fail. Marking the diameter is easy. Now you have to decide on how many pixels it is relative to the whole shot? Does the software imatest do this for you?

Read the explanation on how to use the target on Bart's web site. One simply views the rendered image at 100% and then measures the central blur diameter with the Photoshop ruler tool set to read in pixels. The resolution of the whole optical chain (not just of the lens) is (144/pi)/diameter, which can be expressed as the number of pixels multiplied by the pixel pitch.

In the example, the blur radius was 96 pixels. The pixel pitch of the D3 is 8.46 microns, so the diameter is 96 * 8.46 / 1000 or 0.812 mm. One then plugs this value into the formula.

Regards,

Bill
Logged

Guillermo Luijk

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2005
    • http://www.guillermoluijk.com
Re: Resolution and alaising challenge
« Reply #4 on: October 18, 2011, 05:14:21 pm »

Hi Bill, could you please try the experiment to visualize a single RAW channel from your test chart (dcraw -v -d -r 1 1 1 1 -4 -T file.nef plus 50% nearest neighbour rescaling in PS) to seek for aliasing artifacts there?.

I wonder what results can be obtained leaving demosaicing aside, and considering the sensor as 4 independent sensors working at half the spatial sampling frequency each. Colour moiré can be produced by the RAW development algorithms, not because of capture aliasing itself, so this would be a way to find out if aliasing really exists in the individual RAW channels or it's a produce of the Bayer interpolation process.


(I can anticipate practical photographers stating that they take photographs of landscapes, etc, and not test targets  :)).

I admire your politeness towards those obnoxious anti-geeks infesting interesting forum threads.

Regards

« Last Edit: October 18, 2011, 05:27:02 pm by Guillermo Luijk »
Logged

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Re: Resolution and alaising challenge
« Reply #5 on: October 18, 2011, 07:05:24 pm »

Hi Bill, could you please try the experiment to visualize a single RAW channel from your test chart (dcraw -v -d -r 1 1 1 1 -4 -T file.nef plus 50% nearest neighbour rescaling in PS) to seek for aliasing artifacts there?.

I wonder what results can be obtained leaving demosaicing aside, and considering the sensor as 4 independent sensors working at half the spatial sampling frequency each. Colour moiré can be produced by the RAW development algorithms, not because of capture aliasing itself, so this would be a way to find out if aliasing really exists in the individual RAW channels or it's a produce of the Bayer interpolation process.

Guillermo,

I used DCRaw (DCRawms for my 64 bit Windows 7 machine) as requested and used bicubic 50% nearest neighbor in Photoshop. Since the image was dark, I used a levels command to reset the white point with the results shown on the right. I then used Iris split_cfa to split out the green 1 channel and saved the *.fit as *.tiff, and the result is shown on the left (without resizing).

The results are similar, with the blur area of the low-pass filter about half the size as previously, but there is additional aliasing in the surrounding area. I don't know how to interpret this.  Perhaps you or Bart (if he sees this thread) can help.

Bill

Results:


Screen capture of DCRaw command:


Logged

Guillermo Luijk

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2005
    • http://www.guillermoluijk.com
Re: Resolution and alaising challenge
« Reply #6 on: October 18, 2011, 07:57:31 pm »

the blur area of the low-pass filter about half the size as previously, but there is additional aliasing in the surrounding area. I don't know how to interpret this.  Perhaps you or Bart (if he sees this thread) can help.

Results:

My interpretation is that for being this a sampling of the same scene with the same AA filter but at half the sampling frequency (double spatial interval), much more aliasing artifacts take place and they begin at lower (half?) spatial frequencies of the scene (i.e. they begin earlier than considering the whole interpolated Bayer pattern).

This means the Bayer sensor + demosaicing, in terms of effective sampling frequency, actually behaves like (or close to) a real sampling at a spatial interval of one photosite (like a Foveon sensor would). I had my doubts about this, which is always regarded as correct, because the interpolation process involved is not strictly related to the sampling process, but something done afterwards by combining the 4 sets of data (RGGB) sampled at 2 photosite intervals.

This also means the AA filter is well tuned to avoid aliasing in the demosaiced image, being too weak to avoid it on each individual Bayer channel. In other words, the AA filter is as weak as it can be.

I guess that colour moiré in the slightly aliased areas (now I refer back to your original image) is the only real drawback of Bayer vs Foveon regarding aliasing issues, and it can anyway be kept to a minimum with a good interpolation algorithm.

Thanks for taking your time. Let's see if we have Bart's feedback.
« Last Edit: October 18, 2011, 08:16:17 pm by Guillermo Luijk »
Logged

joofa

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 544
Re: Resolution and alaising challenge
« Reply #7 on: October 19, 2011, 01:31:38 am »

This means the Bayer sensor + demosaicing, in terms of effective sampling frequency, actually behaves like (or close to) a real sampling at a spatial interval of one photosite (like a Foveon sensor would).

A Bayer CFA can be treated as a regular sampling with a spatial interval of one photosite as you say. Here is a simplified 1-D diagram of this concept:


Logged
Joofa
http://www.djjoofa.com
Download Photoshop and After Effects plugins

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8913
Re: Resolution and alaising challenge
« Reply #8 on: October 19, 2011, 04:36:39 am »

The results are similar, with the blur area of the low-pass filter about half the size as previously, but there is additional aliasing in the surrounding area. I don't know how to interpret this.  Perhaps you or Bart (if he sees this thread) can help.

Hi Bill,

What you are effectively seeing here is the result of 'poor' downsampling/decimation, by skipping every other sensel, and you'll get a better view on the effects of more point sampling rather than area sampling. You'll get a similar effect when you downsample your initial demosaiced version with nearest neighbor resampling to 50% size.

When you compare these R/G/G/B sub-images (not really images but rather datasets), the Nyquist frequency is now at 46 (45.8 ) pixels diameter (because half of the pixels were removed), and what Guillermo was asking is shown as mild aliasing inside that 46 pixel center diameter. So the task for the Raw converter includes having to deal with aliasing which as usual mimicks as lower frequency detail but cannot be separated from actual detail. The aliasing is not a product of the demosaicing, although it may produce some challenges in filling in the 2 missing colors per pixel position.

Cheers,
Bart
« Last Edit: October 19, 2011, 05:44:35 am by BartvanderWolf »
Logged
== If you do what you did, you'll get what you got. ==

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8913
Re: Resolution and alaising challenge
« Reply #9 on: October 19, 2011, 05:09:47 am »

My interpretation is that for being this a sampling of the same scene with the same AA filter but at half the sampling frequency (double spatial interval), much more aliasing artifacts take place and they begin at lower (half?) spatial frequencies of the scene (i.e. they begin earlier than considering the whole interpolated Bayer pattern).

Hi Guillermo,

That's how I see it as well. Sampling at every other sensel, and decimating the image by removing the 'empty' columns/rows. That will introduce jaggies on edges, and lower frequency aliases for under-sampled fine repetitive detail. The decimation issues manifest themselves mostly between the Nyquist frequency (46 pixel center diameter on the decimated image) and half of Nyquist (witin the 92 pixel center diameter). Thanks to this target not having sharp edges, but only sinusoidal patterns the effect is limited to the (expected) problem area. Sharp edges will show stairstepping and would make it much harder to see the real issues.

Quote
This means the Bayer sensor + demosaicing, in terms of effective sampling frequency, actually behaves like (or close to) a real sampling at a spatial interval of one photosite (like a Foveon sensor would). I had my doubts about this, which is always regarded as correct, because the interpolation process involved is not strictly related to the sampling process, but something done afterwards by combining the 4 sets of data (RGGB) sampled at 2 photosite intervals.

Also remember that the 4 sub-images are offset by 1 pixel position to eachother, but that will be dealt with when interpolating the 'empty' positions in the color grid. The offset could pose a problem with haphazard alignment with the sensel grid, if there were no AA-filter, and by using sinusoidal patterns.

Quote
This also means the AA filter is well tuned to avoid aliasing in the demosaiced image, being too weak to avoid it on each individual Bayer channel. In other words, the AA filter is as weak as it can be.

Yes it seems to be well dimensioned.

Quote
I guess that colour moiré in the slightly aliased areas (now I refer back to your original image) is the only real drawback of Bayer vs Foveon regarding aliasing issues, and it can anyway be kept to a minimum with a good interpolation algorithm.

Color moiré is an inherent problem when the sampling densities of Green versus Red and Blue differ, and the sampling positions are offset by a pixel. However, it is handled very well by modern demosaicing algorithms in the majority of situations.

Cheers,
Bart
« Last Edit: March 17, 2012, 10:09:27 pm by BartvanderWolf »
Logged
== If you do what you did, you'll get what you got. ==

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Re: Resolution and alaising challenge
« Reply #10 on: October 19, 2011, 09:54:14 am »

That's how I see it as well. Sampling at every other sensel, and decimating the image by removing the 'empty' columns/rows. That will introduce jaggies on edges, and lower frequency aliases for under-sampled fine repetitive detail. The decimation issues manifest themselves mostly between the Nyquist frequency (46 pixel center diameter on the decimated image) and half of Nyquist (witin the 92 pixel center diameter). Thanks to this target not having sharp edges, but only sinusoidal patterns the effect is limited to the (expected) problem area. Sharp edges will show stairstepping and would make it much harder to see the real issues.

Bart's explanation fits the observed pattern. Here is the decimated sub-image of the green one channel. The central area that is well blurred by the low pass filter (inner red circle) is about 46 pixels as Bart predicted, and the surrounding decimated region (outer red circle) is slightly larger than predicted, measuring about 110 pixels.



It would be interesting to see the results of similar tests with cameras lacking a low-pass filter, but thus far no one has stepped up to the plate. Users of those cameras do not appear to be interested in technical analysis or perhaps they are afraid of what such an analysis would show.

Regards,

Bill
Logged

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8913
Re: Resolution and alaising challenge
« Reply #11 on: October 19, 2011, 10:27:53 am »

It would be interesting to see the results of similar tests with cameras lacking a low-pass filter, but thus far no one has stepped up to the plate. Users of those cameras do not appear to be interested in technical analysis or perhaps they are afraid of what such an analysis would show.

Which would be a pitty, because they can learn a lot about their tools and technique. It can also reveal real issues like mirror shake, or a not sturdy enough tripod/head (or street traffic), or a lens issue. An image of the target, e.g. in a product shot, will allow to estimate the AA-filter effect of diffraction and/or defocus, or point out sub-optimal downsampling in the post processing workflow, and allows to determine the best pre-downsampling blur compromise. The list of learning experiences is even longer than that, e.g. which MFDB would be better suited for shooting fashion and avoiding fabric related artifacts, to name just one.

A non-OLPF fitted camera will usually perform flawlessly up to the Nyquist frequency (only limited by technique, lens and Raw converter), and show aliasing artifacts inside the 92 pixel central blur circle, and less noticeable artifacts with smaller sensel pitch DBs.

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==

ErikKaffehr

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 11311
    • Echophoto
Re: Resolution and alaising challenge
« Reply #12 on: October 19, 2011, 01:59:10 pm »

Hi,

Sony Alpha 55 SLT, 50/1.4 focused using LV at f/1.4 and shot at f/5.6 at 2.00 m from focal plane. Could it be it has only one layer of OLP filters?

I also include a corresponding image from the Sony Alpha 900.

Best regards
Erik
« Last Edit: October 19, 2011, 02:38:48 pm by ErikKaffehr »
Logged
Erik Kaffehr
 

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8913
Re: Resolution and alaising challenge
« Reply #13 on: October 19, 2011, 02:51:52 pm »

Sony Alpha 55 SLT, 50/1.4 focused using LV at f/1.4 and shot at f/5.6 at 2.00 m from focal plane. Could it be it has only one layer of OLP filters?

Hi Erik,

Thanks for participating, it will also help others.

It doesn't look like a single OLPF layer, that would cause a more elliptic blur. It is probably a slightly less effective OLPF filter, or the Raw converter is trying too hard. Normally the diagonal directions have a slightly higher resolution compared to the horizontal/vertical directions. That's normal in square grid.

I think the sharpening radius was a tad too large, causing some halos that interact with the lower frequencies outside the 92 pixel Nyquist boundary. There is also a beginning of mazing artifacts near Nyquist, similar to what I can get with Capture One as Raw converter. Which Raw converter did you use?

Since defocus will quickly kill resolution near Nyquist, I usually take several images, Live View with loupe, and pick the best. It will teach us how important technique, and things like Live View are for the best quality.

Of course this is not a contest, but Bill's micro lens is very good, and will be a challenge for other lenses to reach so close to Nyquist. Your lens looks pretty normal (as you'll see when others participate), just check your sharpening settings or try a different Raw converter or different settings (e.g. no clarity, noise reduction, and such).

Cheers,
Bart
« Last Edit: October 19, 2011, 02:57:16 pm by BartvanderWolf »
Logged
== If you do what you did, you'll get what you got. ==

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Re: Resolution and alaising challenge
« Reply #14 on: October 19, 2011, 03:13:37 pm »

Hi,

Sony Alpha 55 SLT, 50/1.4 focused using LV at f/1.4 and shot at f/5.6 at 2.00 m from focal plane. Could it be it has only one layer of OLP filters?

I also include a corresponding image from the Sony Alpha 900.

Best regards
Erik

Erik,

Thanks for rising to the challenge! I downloaded your images and calculated the resolution by Bart's method and obtained 100 cy/mm or 0.48 cy/pixel for the Alpha 65 and 78 cy/mm or 0.46 cy/pixel for the Alpha 900. This is very close to the Nyquist limits for the sensors (105 and 88 respectively), indicating that your results are very close to the theoretical limit and that your photography and processing are optimal.

The Moire for the Alpha 65 does appear asymmetrical. The selection of the "blur centers" is somewhat arbitrary, but I tried to select the areas where the aliasing artifacts exhibited a hyperbolic divergence from the expected radial direction. My selections are shown. Hopefully, Bart will comment. In all my tests, the blur diameter is around 100 pixels. Is this chance?

Regards,

Bill
Logged

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Re: Resolution and alaising challenge
« Reply #15 on: October 19, 2011, 03:22:33 pm »


Of course this is not a contest, but Bill's micro lens is very good, and will be a challenge for other lenses to reach so close to Nyquist. Your lens looks pretty normal (as you'll see when others participate), just check your sharpening settings or try a different Raw converter or different settings (e.g. no clarity, noise reduction, and such).

Bart,

According to the results I was posting prior to your most recent post, it appeared that Erik's results also closely approached Nyquist. Where did I go wrong?

Bill
Logged

ErikKaffehr

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 11311
    • Echophoto
Re: Resolution and alaising challenge
« Reply #16 on: October 19, 2011, 03:29:15 pm »

Hi,

Bart is right that I may use excessive sharpening. It's more optimized for the Alpha 900, and I find it a bit excessive on the Alpha 55.

Best regards
Erik

Bart,

According to the results I was posting prior to your most recent post, it appeared that Erik's results also closely approached Nyquist. Where did I go wrong?

Bill
Logged
Erik Kaffehr
 

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8913
Re: Resolution and alaising challenge
« Reply #17 on: October 19, 2011, 03:42:09 pm »

The Moire for the Alpha 65 does appear asymmetrical.

It does appear to be a bit asymmetrical, but it's too early to tell whether that's due to lens decentering or something else. The sharpening makes it a bit harder to see what's going on. When ths pattern does return in repeat shots, then we can eliminate camera shake in an unlikely diagonal direction.

Quote
The selection of the "blur centers" is somewhat arbitrary, but I tried to select the areas where the aliasing artifacts exhibited a hyperbolic divergence from the expected radial direction. My selections are shown. Hopefully, Bart will comment. In all my tests, the blur diameter is around 100 pixels. Is this chance?

Indeed, it is sometimes a bit hard to set the cut-off point, that's why adding a circle of 92 pixel diameter in the result helps to spot asymmetry. The hyperbolic divergence is a dead giveaway of aliasing, but I also look for where usually a horizontal or vertical dark and light 'line' pair seems to change phase, usually just after they both turned medium gray for a pixel or so.

The fact that you get consistent readings of around 100 diameter just tells us that your optical system resolves close to the Nyquist frequency. Try stopping down the lens to f/11 or f/16, or wide open, you'll get a different result.

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8913
Re: Resolution and alaising challenge
« Reply #18 on: October 19, 2011, 03:50:36 pm »

According to the results I was posting prior to your most recent post, it appeared that Erik's results also closely approached Nyquist. Where did I go wrong?

Nothing wrong, the resolution near Nyquist in the first shot is just not as well behaved as it could be, partly due to sharpening. It gives a good starting point to optimize technique a bit, postprocessing, and perhaps repeat he experiment to eliminate potential shortcomings during the test shot. It is e.g. possible that traffic in the street, or wind on a high building, or people walking in the room have an influence. By repeating the experiment one can see if it's systematic or not.

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==

ErikKaffehr

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 11311
    • Echophoto
Re: Resolution and alaising challenge
« Reply #19 on: October 19, 2011, 04:16:18 pm »

Hi,

The image was taken with studio flash and LV based focusing so I don't really see the probability for random effects. I enclose an unsharpened image.

The file is here: http://echophoto.dnsalias.net/ekr/images/20111019-_DSC1394.dng

Best regards
Erik


Nothing wrong, the resolution near Nyquist in the first shot is just not as well behaved as it could be, partly due to sharpening. It gives a good starting point to optimize technique a bit, postprocessing, and perhaps repeat he experiment to eliminate potential shortcomings during the test shot. It is e.g. possible that traffic in the street, or wind on a high building, or people walking in the room have an influence. By repeating the experiment one can see if it's systematic or not.

Cheers,
Bart
Logged
Erik Kaffehr
 
Pages: [1] 2 3 4   Go Up