Luminous Landscape Forum

Equipment & Techniques => Cameras, Lenses and Shooting gear => Topic started by: ErikKaffehr on December 31, 2008, 04:26:51 AM

Title: That famous AA filter...
Post by: ErikKaffehr on December 31, 2008, 04:26:51 AM
Hi,

I was thinking about the AA (Anti Aliasing) filter. DSLRs have it while MFDBs don't. I presume that DSLRs have it for some reason, especially as they are not exactly free. Would be nice to have some explanation about the need for AA filtering.

I do understand so much:

1) AA filters are needed because the bayer-pattern on the sensor will produce color moirés if the lens resolves above the Nyquist limit.
2) AA filters do reduce sharpness
3) Some sharpness can be regained using sharpening techniques

I would appreciate some good technical comments.

Best regards
Erik Kaffehr
Title: That famous AA filter...
Post by: NikosR on December 31, 2008, 05:30:19 AM
Quote from: ErikKaffehr
I do understand so much:

1) AA filters are needed because the bayer-pattern on the sensor will produce color moirés if the lens resolves above the Nyquist limit.

It is not the Bayer interpolation that 'produces' aliasing effects, although it might work towards accentuating them. It is the nature of the digital sampling process per se. Color moire is the most obvious but not the only aliasing effect possible to experience. So called 'false resolution' (i.e. false detail) is another.
Title: That famous AA filter...
Post by: Slough on December 31, 2008, 06:11:47 AM
Quote from: ErikKaffehr
Hi,

I was thinking about the AA (Anti Aliasing) filter. DSLRs have it while MFDBs don't. I presume that DSLRs have it for some reason, especially as they are not exactly free. Would be nice to have some explanation about the need for AA filtering.

I do understand so much:

1) AA filters are needed because the bayer-pattern on the sensor will produce color moirés if the lens resolves above the Nyquist limit.
2) AA filters do reduce sharpness
3) Some sharpness can be regained using sharpening techniques

I would appreciate some good technical comments.

Best regards
Erik Kaffehr

1) To add to the previous post, moiré occurs due to the discrete sampling of the image by a regular array of pixels. When the image also has a pattern e.g. a checkerboard design on a fabric, and the spacing of the pattern is close to that of the pixels, then something odd happens, and you get a moiré pattern. You can understand it if you think about photographing a grid pattern, and the spacing between the grid lines on the sensor is just a bit bigger than the spacing between pixels. The Bayer matrix introduces another compexity, which means you get colour effects too.
3) Not really. Once resolution has been lost, it has been lost. Sharpening accentuates edges, which increases perceived sharpness.

Personally I would rather have no AA filter, since my interest is nature, and regular patterns are rare, except perhaps insect eyes.
Title: That famous AA filter...
Post by: Graeme Nattress on December 31, 2008, 08:36:27 AM
If you have edges, you have high detail. Regular high detail shows up as moire when you don't have a OLPF. With Bayer pattern sensors, you can also get spurious colours when there on any sharp edge.

A zone plate is "wonderful" for showing aliasing artifacts. Here we see chroma aliasing, moire and bayer reconstruction artifacts on a 1D mk III. It's not often that you get such patterns in real life, but you can see the effects in all sorts of images and subject matter. The stronger the OLPF, the less of these artifacts you'll see, but the softer the overall image will be.

It's a complex issue, and one where there many factors at work. At one extreme, you have no OLPF at all, which practically guarantees artifacts in most in-focus photography where sharp edges are visible. At the other extreme, you could  filter the image so you never or practically never see any artifact from  aliasing at all. The image will be softer though.

So it's a balancing act that the camera designer needs to work with to ensure the end result is suitable for the intended use of the camera.

But it's also worth remembering that just as an image that lacks specific details can never have those details magically added afterwards through clever post-processing, that once aliases contaminate an image, they can not be easily removed, and certainly the original underlying image cannot be restored.

Graeme



[attachment=10639:TGN_7979_moire.jpg]
Title: That famous AA filter...
Post by: james_elliot on December 31, 2008, 08:57:31 AM
Quote from: ErikKaffehr
Hi,

I was thinking about the AA (Anti Aliasing) filter. DSLRs have it while MFDBs don't. I presume that DSLRs have it for some reason, especially as they are not exactly free. Would be nice to have some explanation about the need for AA filtering.

I do understand so much:

1) AA filters are needed because the bayer-pattern on the sensor will produce color moirés if the lens resolves above the Nyquist limit.
2) AA filters do reduce sharpness
3) Some sharpness can be regained using sharpening techniques

I would appreciate some good technical comments.

Best regards
Erik Kaffehr
The main reason why DSLR have an AA and MFDB don't is mainly because people using MFDB are usually professional while DSLR users usually aren't.
People using MFDB use almost only RAW format and post-process their shots. So they can use a low-pass software filter if a moiré effect is visible, while retaining maximal sharpness when there is none (if you use JPEG, the compression algorithm is not lossless and post-processing with a low-pass software filter might not be possible). They can also try different demosaicing algorithms, and some of these algorithms are quite efficient at reducing moiré effect, and can not be implemented "in-camera" as they might be too slow or require too much memory.

However there are DSLR that do not have low-pass filters. The quite famous and unsuccesful DCS-14n was one, and the leica M8 (not a DSLR, but not an MFDB either) hasn't either (but Leica had not much choice regarding this issue). So, DSLR manufacturers do not have the same policy regarding low pass filters; there are even some (Pentax I think did it at least once) which have anisotropic low-pass filter (not the same strength in the horizontal ad vertical direction).

If you can read french, there is an explanation of the demosaicing process, moiré effect and low pass filter here (http://www.photo-lovers.org/fmosaic.html.en).
Title: That famous AA filter...
Post by: ErikKaffehr on December 31, 2008, 09:22:39 AM
Thanks for the french article. It has also links to two english language articles related to the issue. Unfortunately I don't read french but I nevertheless can grasp the idea.

Erik

Quote from: james_elliot
The main reason why DSLR have an AA and MFDB don't is mainly because people using MFDB are usually professional while DSLR users usually aren't.
People using MFDB use almost only RAW format and post-process their shots. So they can use a low-pass software filter if a moiré effect is visible, while retaining maximal sharpness when there is none (if you use JPEG, the compression algorithm is not lossless and post-processing with a low-pass software filter might not be possible). They can also try different demosaicing algorithms, and some of these algorithms are quite efficient at reducing moiré effect, and can not be implemented "in-camera" as they might be too slow or require too much memory.

However there are DSLR that do not have low-pass filters. The quite famous and unsuccesful DCS-14n was one, and the leica M8 (not a DSLR, but not an MFDB either) hasn't either (but Leica had not much choice regarding this issue). So, DSLR manufacturers do not have the same policy regarding low pass filters; there are even some (Pentax I think did it at least once) which have anisotropic low-pass filter (not the same strength in the horizontal ad vertical direction).

If you can read french, there is an explanation of the demosaicing process, moiré effect and low pass filter here (http://www.photo-lovers.org/fmosaic.html.en).
Title: That famous AA filter...
Post by: ErikKaffehr on December 31, 2008, 09:31:19 AM
Graeme,

I hoped that you would "chime in" on this discussion! Thanks for posting!

As far as I understand modern interpolation algorithms can reduce aliasing, but they possibly demand very much computing power. On the other hand I would suggest that it should be possible to regain most of the information lost due to OLPF filtering,if the PSF (Point Spread Function) is known, using deconvolution.

Best regards
Erik

Quote from: Graeme Nattress
If you have edges, you have high detail. Regular high detail shows up as moire when you don't have a OLPF. With Bayer pattern sensors, you can also get spurious colours when there on any sharp edge.

A zone plate is "wonderful" for showing aliasing artifacts. Here we see chroma aliasing, moire and bayer reconstruction artifacts on a 1D mk III. It's not often that you get such patterns in real life, but you can see the effects in all sorts of images and subject matter. The stronger the OLPF, the less of these artifacts you'll see, but the softer the overall image will be.

It's a complex issue, and one where there many factors at work. At one extreme, you have no OLPF at all, which practically guarantees artifacts in most in-focus photography where sharp edges are visible. At the other extreme, you could  filter the image so you never or practically never see any artifact from  aliasing at all. The image will be softer though.

So it's a balancing act that the camera designer needs to work with to ensure the end result is suitable for the intended use of the camera.

But it's also worth remembering that just as an image that lacks specific details can never have those details magically added afterwards through clever post-processing, that once aliases contaminate an image, they can not be easily removed, and certainly the original underlying image cannot be restored.

Graeme



[attachment=10639:TGN_7979_moire.jpg]
Title: That famous AA filter...
Post by: james_elliot on December 31, 2008, 10:43:06 AM
Quote from: ErikKaffehr
Graeme,

I hoped that you would "chime in" on this discussion! Thanks for posting!

As far as I understand modern interpolation algorithms can reduce aliasing, but they possibly demand very much computing power. On the other hand I would suggest that it should be possible to regain most of the information lost due to OLPF filtering,if the PSF (Point Spread Function) is known, using deconvolution.

Best regards
Erik
The problem of using deconvolution methods to retrieve information lost by low-pass bi-refringent optical filters has already been tackled, but I don't think it is on the mainstream of demosaicing research.
I just added two more articles on my web site (http://www.photo-lovers.org/fmosaic.html.en).
One of them (an issue of Electronic Imaging) might be of interest to you.
Title: That famous AA filter...
Post by: Graeme Nattress on December 31, 2008, 11:06:17 AM
Once aliasing corrupts a signal, there's no real way to get back to that original signal. It's corrupt and gone. Chroma moire in a bayer pattern sensor can be removed to an extent by using an uncorrupted luma as a guide to reconstruct a reasonable facsimile of what the chroma would have been, and this can work quite well indeed. Removing luma aliasing really doesn't work because if the aliases are bad enough, they "fold back" into the image at a low frequency. That low frequency has a long wavelength and hence shows up as large area artifacts that are hard to detect and remove convincingly.

That is why we always look to stop aliasing artifacts entering a system before they have a chance to corrupt the precious signal.

It is very processing intensive to deconvolve the OLPF, but certainly possible, whereas no such process exists for de-aliasing an aliased image. As mentioned in the links above, chroma aliasing can be effectively "dealt with" if you're clever in the demosaicing.

Now, where I get concerned is not so much the still-image situation, but when images move. Moving aliasing and moire is  more visible than when still as it moves in the opposite direction to the movement of the object or camera. This causes all manner of issues down the distribution chain which often tend to use motion estimation based compression.

Graeme
Title: That famous AA filter...
Post by: NikosR on December 31, 2008, 11:38:19 AM
Maybe someone knowledgeable can comment on the significance lenses might have on the decision of dSLR manufacturers to use AA filters while MFDB manufacturers by default don't. A lens can effectively act as an AA filter depending on the relationship of its transfer function to the sampling frequency (i.e. pixel pitch).
Title: That famous AA filter...
Post by: Graeme Nattress on December 31, 2008, 12:50:46 PM
If the sensor is of so high a resolution that the lens cannot output significant contrast at that resolution, then an optical low pass filter is not needed. However, that does not mean you'll now get a sharp image at a pixel level, as that only really occurs when you allow aliasing into a system. But you won't be limiting the resolution of the system further than it should  be. It's pretty obvious to me that higher and higher resolution are probably the way forward. It makes sense to take resolution beyond what is necessary so we can properly over-sample.

Graeme
Title: That famous AA filter...
Post by: Daniel Browning on December 31, 2008, 02:08:16 PM
My favorite explanation is by Graeme Nattress: When the lens resolves more detail than the sensor can capture and that extra detail is *not* filtered out by an AA OLPF, you're trying to fit more resolution than the pixels dimensions can handle. In real life when you put more than a pint of beer in a pint pot, the beer spills out and makes a mess. In image processing, the beer folds back on itself and corrupts the image - aliasing, but just another mess of beer really. Aliases are spurious false data that are not correlated with the actual detail in the image. They're effectively noise, or extra detail that's not actually part of the image.

I would add that a lot of photographers like aliasing artifacts. Most that shoot Sigma Foveon, for example, call the images "crisp", "sharp", etc., but what they're actually seeing is aliasing. You can even get aliases with a camera that has an OLPF, by just downsampling with a bad algorithm, such as nearest neighbor.

To me, aliasing looks fake and computer-generated, like fonts that are not anti-aliased. Correctly filtered images appear more natural and desirable to my eye.
Title: That famous AA filter...
Post by: Slough on January 01, 2009, 05:48:34 AM
Quote from: Graeme Nattress
It is very processing intensive to deconvolve the OLPF, but certainly possible,

Is that possible in the sense that it has been done with a commercial camera, or in the sense of being theoretically possible but not proven? My own experience with several commercial deconvolution software tools is that the results are not worth bothering with. Of course these tools might have been pants, especially given the cost, though they did take a long time to process. It is possible that adding in knowledge of the specific camera OLPF would improve the results since these were generic tools. Not knowing anything about the underlying physics of an OLPF, I wonder whether the blurring is due to a random feature of the OLPF, in which case surely deconvolution would not work.


Curiously I have just read that, according to one source anyway, Nikon apply an additional blurring between image capture and RAW file creation, using some hardware/software algorithm. AS to whether or not this is accurate information ...
Title: That famous AA filter...
Post by: KevinA on January 01, 2009, 07:02:18 AM
I have a Kodak SLR/n which does not have an AA, I had to stop using it for jobs because moire was a big problem, i have not seen any program that can remove moire completely. I have also a couple of Canons with AA's. moire is no longer a problem. There are buts though, I think the Kodak images despite less pixels and less detail have more pop. The reason I think this is, is because the AA degrades the picture, levels the field across the frame between sharp and un-sharp areas the non AA pictures hold the differential better. Just my opinion not from any specific tests to show this.

Kevin.
Title: That famous AA filter...
Post by: Graeme Nattress on January 01, 2009, 07:35:31 AM
The OLPFs I've used are the bifringent crystal type and are a constant and even attenuation of high frequencies, and don't use any random factors, so should be de-convolve-able. I'm not an expert on this type of processing, so I don't know who's doing it, or if anyone is specifically doing it for an OLPF, but it's certainly do-able.

Aliasing does give an effect on some edges that people like. What happens is that as the detail that cannot be sampled gets folded back into the image, it records as false detail. To some eyes, this can look good.

However, it can be achieved by another sampling process often used in image process - downsampling an image - by choosing an appropriately aliasy downsample filter.

Graeme
Title: That famous AA filter...
Post by: telyt on January 01, 2009, 08:35:03 AM
Quote from: james_elliot
... However there are DSLR that do not have low-pass filters. The quite famous and unsuccesful DCS-14n was one, and the leica M8 (not a DSLR, but not an MFDB either) hasn't either (but Leica had not much choice regarding this issue).
The Leica DMR back for the R8 and R9 also has no AA filter.
Title: That famous AA filter...
Post by: Bob Smith on January 01, 2009, 09:58:18 PM
Quote from: NikosR
Maybe someone knowledgeable can comment on the significance lenses might have on the decision of dSLR manufacturers to use AA filters while MFDB manufacturers by default don't. A lens can effectively act as an AA filter depending on the relationship of its transfer function to the sampling frequency (i.e. pixel pitch).

I think the decision regarding DSLRs is simply marketing.  Prime example was Kodak's 14n.  All previous Kodak DSLRs were sold either without AA filters or with AA filters as an option.  Those were radically high priced systems compared to today's DSLRs.  Users were pretty much exclusively serious pros as they are with current medium format backs.  When Kodak brought out the 14n at a much lower price point than previous cameras they aimed at a completely different market but they kept the no AA filter approach.  The camera was blasted in early reviews because of aliasing and moire issues.  Those of us who had used many previous Kodaks knew how to deal with it an loved the camera.  New users hated it and panned it royally in various reviews.  It was the final nail in Kodak's pro camera coffin.  The majority of buyers of most current DSLRs are not pros... and even most of the pros using DSLRs would be put off by having to constantly deal with color moire issues if their routine subject matter was the sort that often caused it (bridal veils?).

The higher the resolution of the camera, the less an AA filter is needed.  My first Kodak, a DCS410 was 1.5 megapixel with no AA filter.  You got color noise on just about anything you pointed it at.  Training on that thing made the sort of noise a 14n produced child's play to deal with.  I still prefer the look of a no AA filter camera.  I can deal with the few instances where it poses a problem.  I'd like to see it offered as an option on more DSLRs but I'm probably an oddity in the market.  They're not designing cameras for me.
Title: That famous AA filter...
Post by: ejmartin on January 02, 2009, 12:17:05 AM
Quote from: james_elliot
The problem of using deconvolution methods to retrieve information lost by low-pass bi-refringent optical filters has already been tackled, but I don't think it is on the mainstream of demosaicing research.

Do you have a reference for that?  I'd be interested.

Quote from: Daniel Browning
I would add that a lot of photographers like aliasing artifacts. Most that shoot Sigma Foveon, for example, call the images "crisp", "sharp", etc., but what they're actually seeing is aliasing. You can even get aliases with a camera that has an OLPF, by just downsampling with a bad algorithm, such as nearest neighbor.

There are two uses of the term "aliasing" in common usage.  One is the stairstepping of diagonal lines, also called "jaggies".  The other, which is what I believe Graeme is referring to, is the shifting of spatial frequency of a signal by a multiple of the sampling frequency k_max, due to the fact that the sampling cannot distinguish a signal of frequency k and k-k_max when k>k_max.  For some pretty pictures, see

http://en.wikipedia.org/wiki/Aliasing (http://en.wikipedia.org/wiki/Aliasing)

I would think the main reason for the AA filter is to combat moire and color aliasing.  Thought the latter can be mitigated by post-processing techniques, the former is quite nasty and nearly impossible to to back out, since the information that would allow one to distinguish that an oscillation of luminance at frequency k-k_max really should have been frequency k is irretrievably lost.

On the other hand, there is substantial room for improvement in demosaicing algorithms.  Many of the ones I see break down strongly on texture data near the Nyquist frequency, and if they don't produce moire as a result, introduce maze artifacts and other structures that are just as bad.  AA filters help here, but I think there is progress to be had on the processing side.
Title: That famous AA filter...
Post by: SeanFS on January 02, 2009, 01:31:03 AM
Quote from: Bob Smith
I think the decision regarding DSLRs is simply marketing.  Prime example was Kodak's 14n.  All previous Kodak DSLRs were sold either without AA filters or with AA filters as an option.  Those were radically high priced systems compared to today's DSLRs.  Users were pretty much exclusively serious pros as they are with current medium format backs.  When Kodak brought out the 14n at a much lower price point than previous cameras they aimed at a completely different market but they kept the no AA filter approach.  The camera was blasted in early reviews because of aliasing and moire issues.  Those of us who had used many previous Kodaks knew how to deal with it an loved the camera.  New users hated it and panned it royally in various reviews.  It was the final nail in Kodak's pro camera coffin.  The majority of buyers of most current DSLRs are not pros... and even most of the pros using DSLRs would be put off by having to constantly deal with color moire issues if their routine subject matter was the sort that often caused it (bridal veils?).

The higher the resolution of the camera, the less an AA filter is needed.  My first Kodak, a DCS410 was 1.5 megapixel with no AA filter.  You got color noise on just about anything you pointed it at.  Training on that thing made the sort of noise a 14n produced child's play to deal with.  I still prefer the look of a no AA filter camera.  I can deal with the few instances where it poses a problem.  I'd like to see it offered as an option on more DSLRs but I'm probably an oddity in the market.  They're not designing cameras for me.

I have to agree. I started with the dcs 760 and it could alias quite badly pointed at the right subject , but much of the time it was never a huge problem if at all. With some of the later converters like ACR it was rare to see moire at all and simple to deal with it. The 14n wasn't so bad either but had other issues. The 14nx/ slrn was an improvement and I rarely saw moire - and I got moire in similar places ( always materiel) with a 1ds2 - much to my surprise. With a 1ds3 (aa filter ) and imacon 22mp back ( none) the back produces more detail thanks to no AA filter and some moire where the 1ds3 produces very slightly less detail and none visible moire and  its debatable how useful that tiny edge of detail is .
I have wondered if the AA filter in the Canons doesn't sometimes help hide noise a little as well
Title: That famous AA filter...
Post by: Plekto on January 02, 2009, 04:16:18 AM
Quote from: telyt
The Leica DMR back for the R8 and R9 also has no AA filter.

http://www.maxmax.com/hot_rod_visible.htm (http://www.maxmax.com/hot_rod_visible.htm)
You can get a few models also converted to non AA by this company.  Given how tiny artifacts are in the new 24-25MP cameras, I think it might be a good "upgrade" once they start to support these newer models.(wish they'd hurry up!)

Note - the Fuji S5Pro with this modification seems to be a great performer due to the fact that the sensor in it doesn't really need an AA filter since it brackets and blends the shot already.  Oh - speaking of which, using a program like the Zero Noise software  that's mentioned on this site in a couple of threads, you can bracket a shot on a camera without an AA filter and pretty much eliminate all of the ugly problems.
Title: That famous AA filter...
Post by: Slough on January 02, 2009, 06:13:51 AM
Quote from: Plekto
Given how tiny artifacts are in the new 24-25MP cameras

Surely artifacts such as moiré will still be present, but they will appear for finer patterns in the subject matter. But if you enlarge the image more (which is surely the reason for such high pixel counts), then you will see them just as badly.

On a side issue, people are claiming the Nikon D3x has very sharp images at the 100% level. Presumably that means a weak AA filter. Presumably the argument is that only pros and knowlegeable amateurs will make big enlargements and these people will know how to handle artifacts in software. (That's a guess.)
Title: That famous AA filter...
Post by: ErikKaffehr on January 02, 2009, 06:25:19 AM
Hi,

Graeme suggest that the best solution is oversampling, that is more pixels. The industry is clearly moving in that direction possible for the wrong reasons, namely that pixels sell. Anyway in my eyes there seems to be an agreement on this forum that aliasing phenomena are bad and cannot really handled in software. There still seems to be a good reason for using those filters.

To my understanding, based on this discussion, color moiré can be reduced in postprocessing whereas the removal of BW moiré and other aliasing artifacts are not really feasible in software. On the "positive" side aliasing effect can give a spurious resolution giving the impression of more detail than actually resolved.

The discussion did not really answer my other question, why MFDBs don't have a AA-filter, with the sole exception of the the Mamya ZD which had it as an option. A suggestion was that the reason was a "raw" workflow is the rule on MFDBs while on DSLRs JPEG is at least an option.

My personal view would be that:

- The AA filters are there for a good reason
- AA-filters loose some acutance (by smearing an image point over multiple pixels) but this can partly be recovered using sharpening
- The softening by the AA-filter is just an addition to other softening effects, like residual aberrations in the lens and focusing errors

I have a small comment regarding resolution. If we have a very good lens which resolves very much higher than the sensor the resolution is dominated by the sensor. A well designed AA-filter would not reduce resolution, as it is given by the pixel pitch (or the Nyquist limit), but it would reduce contrast by "spilling" a controlled amount of light into the surrounding pixels. So contrast (or MTF) would be reduced and not resolution. If resolution is not dominated by the sensor the situation is much more complicated. This explanation may be simplistic and possibly not even correct.

Best regards
Erik


Quote from: ejmartin
Do you have a reference for that?  I'd be interested.



There are two uses of the term "aliasing" in common usage.  One is the stairstepping of diagonal lines, also called "jaggies".  The other, which is what I believe Graeme is referring to, is the shifting of spatial frequency of a signal by a multiple of the sampling frequency k_max, due to the fact that the sampling cannot distinguish a signal of frequency k and k-k_max when k>k_max.  For some pretty pictures, see

http://en.wikipedia.org/wiki/Aliasing (http://en.wikipedia.org/wiki/Aliasing)

I would think the main reason for the AA filter is to combat moire and color aliasing.  Thought the latter can be mitigated by post-processing techniques, the former is quite nasty and nearly impossible to to back out, since the information that would allow one to distinguish that an oscillation of luminance at frequency k-k_max really should have been frequency k is irretrievably lost.

On the other hand, there is substantial room for improvement in demosaicing algorithms.  Many of the ones I see break down strongly on texture data near the Nyquist frequency, and if they don't produce moire as a result, introduce maze artifacts and other structures that are just as bad.  AA filters help here, but I think there is progress to be had on the processing side.
Title: That famous AA filter...
Post by: ErikKaffehr on January 02, 2009, 06:32:05 AM
Hi,

The D3X and also the 10MP plus APS-C cameras are pretty close to diffraction limitation which start to set in around aperture f/8 some evidence points in the direction that the Canon 50D is limited by diffraction at f/8. Add to this residual aberrations, nonoptimal focusing, camera movement and other perils reducing sharpness and risk for aliasing is significantly reduced. Pixel pitch on the 3DX is about 6 microns, same league as 10 mpixel APS-C sensors.

Best regards
Erik

Quote from: Slough
Surely artifacts such as moiré will still be present, but they will appear for finer patterns in the subject matter. But if you enlarge the image more (which is surely the reason for such high pixel counts), then you will see them just as badly.

On a side issue, people are claiming the Nikon D3x has very sharp images at the 100% level. Presumably that means a weak AA filter. Presumably the argument is that only pros and knowlegeable amateurs will make big enlargements and these people will know how to handle artifacts in software. (That's a guess.)
Title: That famous AA filter...
Post by: Graeme Nattress on January 02, 2009, 07:59:06 AM
Quote from: ejmartin
There are two uses of the term "aliasing" in common usage.  One is the stairstepping of diagonal lines, also called "jaggies".  The other, which is what I believe Graeme is referring to, is the shifting of spatial frequency of a signal by a multiple of the sampling frequency k_max, due to the fact that the sampling cannot distinguish a signal of frequency k and k-k_max when k>k_max.  For some pretty pictures, see

http://en.wikipedia.org/wiki/Aliasing (http://en.wikipedia.org/wiki/Aliasing)

I would think the main reason for the AA filter is to combat moire and color aliasing.  Thought the latter can be mitigated by post-processing techniques, the former is quite nasty and nearly impossible to to back out, since the information that would allow one to distinguish that an oscillation of luminance at frequency k-k_max really should have been frequency k is irretrievably lost.

On the other hand, there is substantial room for improvement in demosaicing algorithms.  Many of the ones I see break down strongly on texture data near the Nyquist frequency, and if they don't produce moire as a result, introduce maze artifacts and other structures that are just as bad.  AA filters help here, but I think there is progress to be had on the processing side.

Jaggies are just another aliasing artifact. Aliasing refers to jaggies, moire (both luma and chroma).

An OLPF is to either avoid, or limit aliasing, and hence the visual artifacts produced from aliasing.

Indeed chroma aliasing in a Bayer pattern colour filter array sensor can be reduced quite well with clever algorithms. It's much harder to do so though if there is also luma aliasing present and if there is no OLPF present.

Yes, often demosaicing algorithms break down with maze artifacts and bad colour artifacts if they're over-simplistic. Often it's the battle to eek out as much resolution as you can from the image that causes this, and is allowed because most natural images don't make such artifacts too visible. An OLPF can make the demosaic algorithm development easier, but does  not eliminate these difficulties.

OLPF has no impact on noise, as noise on a per pixel levels comes from the sensor, which is after the OLPF.
Title: That famous AA filter...
Post by: ejmartin on January 02, 2009, 09:18:59 AM
Quote from: Graeme Nattress
Jaggies are just another aliasing artifact. Aliasing refers to jaggies, moire (both luma and chroma).

How are jaggies related to frequency shifts by a multiple of Nyquist?

Quote
Indeed chroma aliasing in a Bayer pattern colour filter array sensor can be reduced quite well with clever algorithms.

What sort of algorithms?
Title: That famous AA filter...
Post by: bjanes on January 02, 2009, 09:41:15 AM
Quote from: james_elliot
The problem of using deconvolution methods to retrieve information lost by low-pass bi-refringent optical filters has already been tackled, but I don't think it is on the mainstream of demosaicing research.

Quote from: ejmartin
Do you have a reference for that?  I'd be interested.

Jonathan Wienke, among others, reports using Focus Magic (a deconvoluiton algorithm) for capture sharpening. This can be used as a first step of capture sharpening. Bruce Fraser used an unsharp mask for this purpose, with the radius determined by the megapixel count of the sensor and the amount determined by the strength of the blur filter.

The problem is to determine the Point Spread Function (PSP) to be used for the deconvolution. Jonathan uses an empiric PSP which produces good results for him. I too would be interested in some references in the scientific literature.

Bill
Title: That famous AA filter...
Post by: walter.sk on January 02, 2009, 10:17:13 AM
Quote from: bjanes
Jonathan Wienke, among others, reports using Focus Magic (a deconvoluiton algorithm) for capture sharpening. This can be used as a first step of capture sharpening. Bruce Fraser used an unsharp mask for this purpose, with the radius determined by the megapixel count of the sensor and the amount determined by the strength of the blur filter.

The problem is to determine the Point Spread Function (PSP) to be used for the deconvolution. Jonathan uses an empiric PSP which produces good results for him. I too would be interested in some references in the scientific literature.

Bill

Focus Magic has a mechanism that supposedly measures the blur width within a small rectangle that the user can move over various parts of an image and then pres the "detect" button.  On their website they give several examples of measuring the blur width, preferably of bright highlights that are supposed to be point sources of light.  The assumption is that the blur is uniform in all directions.  Focus Magic also has another routine available to "correct" directional blur from camera movement.  A circle with a rotatable diameter line is set either by measurement or trial and error to be parallel to the direction of the camera movement, and then the radius of the blur is set manually, by eye or after counting the pixels involved in the blur.  I suppose that they could provide references to the appropriate scientific literature.

Focus Magic (http://www.focusmagic.com/)
Title: That famous AA filter...
Post by: bjanes on January 02, 2009, 11:11:30 AM
Quote from: walter.sk
Focus Magic has a mechanism that supposedly measures the blur width within a small rectangle that the user can move over various parts of an image and then pres the "detect" button.  On their website they give several examples of measuring the blur width, preferably of bright highlights that are supposed to be point sources of light.  The assumption is that the blur is uniform in all directions.  Focus Magic also has another routine available to "correct" directional blur from camera movement.  A circle with a rotatable diameter line is set either by measurement or trial and error to be parallel to the direction of the camera movement, and then the radius of the blur is set manually, by eye or after counting the pixels involved in the blur.  I suppose that they could provide references to the appropriate scientific literature.

Focus Magic (http://www.focusmagic.com/)


Deconvolution methods are widely used in astronomy, and the free ware Iris (http://www.astrosurf.com/buil/iris/new533/new533_us.htm) incorporates some of these methods, as shown in their documentation. In the example, they synthesize the PSP from a mathematical model. I don't know why they didn't determine the PSP from an image of a star as viewed by the telescope. It would be interesting to take an image of a star with ones DSLR and use this for the deconvolution. This would be more precise than using a point source from a specular highlight.

Bill
Title: That famous AA filter...
Post by: joofa on January 03, 2009, 02:45:26 PM
Quote from: bjanes
The problem is to determine the Point Spread Function (PSP) to be used for the deconvolution. Jonathan uses an empiric PSP which produces good results for him. I too would be interested in some references in the scientific literature.

There are tons of references in deconvolution theory (just Google this term), many of  them in channel equalization that is within the domain of communication systems. A straight forward implementation of deconvolution with a known kernel is not difficult in hardware/software as it is just filtering, however, the problem lies in determining the right deconvolution kernel, and that is the more compute intensive task.

Additionally, many algorithms assume Gaussian statistics and mean square error for objective functions for finding the right deconvolution kernel, which are not the best measures all of the times. More complicated algorithms exist in estimation theory literature, especially those using Bayesian statistics, but that is a whole separate field.
Title: That famous AA filter...
Post by: Bob Smith on January 03, 2009, 04:49:36 PM
Quote from: ErikKaffehr
- The AA filters are there for a good reason
- AA-filters loose some acutance (by smearing an image point over multiple pixels) but this can partly be recovered using sharpening
- The softening by the AA-filter is just an addition to other softening effects, like residual aberrations in the lens and focusing errors

AA filters do very good things.  The problem is that most subject matter in most images doesn't need them at all (especially as camera resolutions keep increasing) and your images are sharper without them.  The few areas that do need them can look horrible without them.  The trade off is how much time/effort are you willing to devote in software to fixing the problem areas versus accepting the softening of everything that the AA filter provides.  Various sharpening techniques and todays higher res cameras help a lot but you can't get all of what the AA filters suppresses back again.  For a portrait or fashion photographer that is constantly shooting a variety of fabrics, an AA filter is a no brainer.  For landscapes or most product photography I can very happily live without it.

Without an AA filter ALL of your images will be slightly sharper but a few will look horrible.  With an AA filter all of your images will be very slightly softer but none will look horrible.  If you're a marketing manger for a DSLR maker, which do you pick?

If I get a 5dII soon, I'll send my original 5D for a mod to remove the AA filter.

Bob Smith
Title: That famous AA filter...
Post by: ejmartin on January 03, 2009, 05:28:56 PM
Quote from: joofa
There are tons of references in deconvolution theory (just Google this term), many of  them in channel equalization that is within the domain of communication systems. A straight forward implementation of deconvolution with a known kernel is not difficult in hardware/software as it is just filtering, however, the problem lies in determining the right deconvolution kernel, and that is the more compute intensive task.

Additionally, many algorithms assume Gaussian statistics and mean square error for objective functions for finding the right deconvolution kernel, which are not the best measures all of the times. More complicated algorithms exist in estimation theory literature, especially those using Bayesian statistics, but that is a whole separate field.


Yes, I have done that in the past.  The question I raised was in response to a post that seemed to suggest that there was some work done specifically on the use of deconvolution to back out the effects of the AA filter.  That, rather than some generic work on deconvolution sharpening, is what I was looking for a reference about.
Title: That famous AA filter...
Post by: joofa on January 03, 2009, 06:52:47 PM
Quote from: ejmartin
Yes, I have done that in the past.  The question I raised was in response to a post that seemed to suggest that there was some work done specifically on the use of deconvolution to back out the effects of the AA filter.  That, rather than some generic work on deconvolution sharpening, is what I was looking for a reference about.

Hi,

There is some work on image restoration, including some that does not assume linear spatial invariance that is assumed many times in deconvolution, which may be in line of what you are looking for, though I am not entirely sure if that is what you need. Kindly PM me your email and I shall be glad to provide some references. (BTW, in your case I can figure out your email address, however, since I don't want to bombard people with emails without their approval, I ask them for sending a message to show interest.)

Quote from: Bob Smith
AA filters do very good things.  ...  The trade off is how much time/effort are you willing to devote in software to fixing the problem areas versus accepting the softening of everything that the AA filter provides.  ...

You might notice that since the sampling inherent in a digital imager is not point sampling, coarse anti-aliased-type smoothing is already provided by the sensor photosites, regardless of the presence of an AA filter.
Title: That famous AA filter...
Post by: Slough on January 04, 2009, 11:35:55 AM
I wonder if anyone has implemented an 'electronic' AA filter? Some materials' optical properties can be modified by the application of an electric field. So in principle this would allow the user to turn off the AA filter for 'normal' use, and turn it on when there are regular patterns in the subject.
Title: That famous AA filter...
Post by: Mitchell Baum on January 04, 2009, 12:52:03 PM
Quote from: Plekto
http://www.maxmax.com/hot_rod_visible.htm (http://www.maxmax.com/hot_rod_visible.htm)
You can get a few models also converted to non AA by this company.  Given how tiny artifacts are in the new 24-25MP cameras, I think it might be a good "upgrade" once they start to support these newer models.(wish they'd hurry up!)

Note - the Fuji S5Pro with this modification seems to be a great performer due to the fact that the sensor in it doesn't really need an AA filter since it brackets and blends the shot already.  Oh - speaking of which, using a program like the Zero Noise software  that's mentioned on this site in a couple of threads, you can bracket a shot on a camera without an AA filter and pretty much eliminate all of the ugly problems.


Has anyone here had Maxmax remove the AA filter? How was the result?

Best,

Mitchell
Title: That famous AA filter...
Post by: ejmartin on January 04, 2009, 01:22:50 PM
Quote from: Slough
I wonder if anyone has implemented an 'electronic' AA filter? Some materials' optical properties can be modified by the application of an electric field. So in principle this would allow the user to turn off the AA filter for 'normal' use, and turn it on when there are regular patterns in the subject.

No I haven't heard of that.  However I have seen a suggestion that cameras with in-body IS might be modified so that a high frequency (at least several kHz) circular motion of small radius is applied.  That would have the effect of blurring the image over a quartet of pixels and would easily be turned off.  I don't know if the actuators for in-body IS can be adapted to apply this frequency motion, however; the motion they are compensating is much lower frequency.
Title: That famous AA filter...
Post by: SeanFS on January 04, 2009, 05:13:25 PM
[quote name='ErikKaffehr' date='Jan 2 2009, 06:25 AM' post='248745']
Hi,

Graeme suggest that the best solution is oversampling, that is more pixels. The industry is clearly moving in that direction possible for the wrong reasons, namely that pixels sell. Anyway in my eyes there seems to be an agreement on this forum that aliasing phenomena are bad and cannot really handled in software. There still seems to be a good reason for using those filters.

To my understanding, based on this discussion, color moiré can be reduced in postprocessing whereas the removal of BW moiré and other aliasing artifacts are not really feasible in software. On the "positive" side aliasing effect can give a spurious resolution giving the impression of more detail than actually resolved.

The discussion did not really answer my other question, why MFDBs don't have a AA-filter, with the sole exception of the the Mamya ZD which had it as an option. A suggestion was that the reason was a "raw" workflow is the rule on MFDBs while on DSLRs JPEG is at least an option.

My personal view would be that:

- The AA filters are there for a good reason
- AA-filters loose some acutance (by smearing an image point over multiple pixels) but this can partly be recovered using sharpening
- The softening by the AA-filter is just an addition to other softening effects, like residual aberrations in the lens and focusing errors



I remember reading somewhere the reason MFDB's don't have AA filters is they are RAW only devices. It was always anticipated they would have software to deal with any artifacts in Raw , and to a large extent this is true, and so it should be given their high prices. The DCS760 I have in the cupboard was built along the same principles but the software never lived up to the promises despite many upgrades. In contrast , the noise filter I have in Flexcolour does a superb job of controlling minor artifacts. Moire happens but is nowhere near the problem it was with the Kodak
The lack of AA filter does give an edge in detail and sharpness and probably means one less item that affects colour on the chip
Part of the reason ( in the same article)there has to be an AA filter in DSLR is they are used to shoot jpegs directly rather than RAW - no professionals don't want to deal with RAW files so much and so it is there to appease the mass market as much as anything .

Title: That famous AA filter...
Post by: Daniel Browning on January 04, 2009, 05:37:50 PM
Quote from: SeanFS
The discussion did not really answer my other question, why MFDBs don't have a AA-filter...

I don't know, but I'll hazard a guess or two. First is momentum. Whatever reason there was in the beginning, changing it will upset some of their customers. Some of their customers know what an OLPF is and will be displeased with the addition of one. Other customers don't know what it is, but have accustomed to the microcontrast and aliasing, so would also be displeased. Some will appreciate the addition of an OLPF, but I think the former outweigh the latter by a wide margin, especially in that demographic. In any case, with their shrinking market they might be afraid to introduce changes.

Second: cost. Good OLPF are lab-grown, ground, and polished Lithium Niobate crystal. My understanding is that it is very expensive at low production volumes, and the cost scales exponentially with area. Canon/Nikon ship millions of units a year, so their economies of scale take care of the OLPF, not to mention the advantage of a much smaller area. MFDB are down to just 6,000 per year, and they buy off-the-shelf sensors that were designed for the aerospace industry. Those factors might combine so that the cost is nontrivial, even for something in the tens of thousands.

Those are my guesses.
Title: That famous AA filter...
Post by: Wayne Fox on January 05, 2009, 11:04:15 PM
Quote from: Bob Smith
I think the decision regarding DSLRs is simply marketing.  Prime example was Kodak's 14n.  All previous Kodak DSLRs were sold either without AA filters or with AA filters as an option.  Those were radically high priced systems compared to today's DSLRs.  Users were pretty much exclusively serious pros as they are with current medium format backs.  When Kodak brought out the 14n at a much lower price point than previous cameras they aimed at a completely different market but they kept the no AA filter approach.  The camera was blasted in early reviews because of aliasing and moire issues.  Those of us who had used many previous Kodaks knew how to deal with it an loved the camera.  New users hated it and panned it royally in various reviews.  It was the final nail in Kodak's pro camera coffin.  The majority of buyers of most current DSLRs are not pros... and even most of the pros using DSLRs would be put off by having to constantly deal with color moire issues if their routine subject matter was the sort that often caused it (bridal veils?).

The higher the resolution of the camera, the less an AA filter is needed.  My first Kodak, a DCS410 was 1.5 megapixel with no AA filter.  You got color noise on just about anything you pointed it at.  Training on that thing made the sort of noise a 14n produced child's play to deal with.  I still prefer the look of a no AA filter camera.  I can deal with the few instances where it poses a problem.  I'd like to see it offered as an option on more DSLRs but I'm probably an oddity in the market.  They're not designing cameras for me.

When Kodak introduced the 14n, they hyped up the super resolution of the sensor, and stated often that because of the high pixel density it did not need an anti aliasing filter - it wouldn't create moire.  They then changed their tune dramatically since most portrait and wedding photographers were bitten quickly (as were we) because of the moire from various fabrics and introduced moire reduction in their software (which didn't work super well).  We actually purchased over 70 of the cameras to replace our mixture of 520's and 560's, and managed the moire issue for the most part.  

 For landscapes it was ahead of its time in image quality, but it seems they didn't understand that high pixel density made moire more likely. (at least their sales and marketing people didn't get it).

From this discussion it sounds like the only way to not have this as a problem is a sensor than can resolve greater than any lens you can put in front of it?

I've heard of removing the AA filter from a 5D with reportedly great results for landscape ... would this work with a 21 or greater mp DSLR?
Title: That famous AA filter...
Post by: JeffKohn on January 05, 2009, 11:41:45 PM
Quote from: Wayne Fox
I've heard of removing the AA filter from a 5D with reportedly great results for landscape ... would this work with a 21 or greater mp DSLR?
MaxMax.com offers the AA filter removal for a variety of cameras (more Nikon than Canon though, including D3 and D300). They don't have any of the 21+ mp models on the supported list yet. I think it usually takes some brave soul to offer their camera up as the guinea pig first so they can try it. Given that the D300 is on the supported list and the D3x sensor seems to have a lot in common with the D300 sensor I wouldn't be surprised if they offer D3x conversions at some point in the future.
Title: That famous AA filter...
Post by: Bob Smith on January 06, 2009, 09:34:42 AM
Quote from: Wayne Fox
From this discussion it sounds like the only way to not have this as a problem is a sensor than can resolve greater than any lens you can put in front of it?

I believe that's correct... and why AA filters aren't needed on the cheap point & shoots that have relatively high resolutions with less than great optics.  For this same reason I don't see it as a problem that DSLR resolutions are getting to the point that they out resolve some lenses.  That's often put forth as an idea why we don't need that resolution.  I think just the opposite.  Resolution higher than the lens can resolve should remove the whole AA issue and is a good thing.

And yes I think the Kodak marketing folks massively underestimated the problems the no AA filter 14n would cause wedding shooters... one of their primary target markets.  The higher res did produce less instances of moire than previous no AA models (I owned 410, 330, 760 and 720x as well) but that was zero consolation to the new-to-digital wedding photographer that was suddenly seeing this new effect on piles of bridal veils.

Bob Smith
Title: That famous AA filter...
Post by: Plekto on January 06, 2009, 08:29:14 PM
Quote from: Bob Smith
For a portrait or fashion photographer that is constantly shooting a variety of fabrics, an AA filter is a no brainer.  For landscapes or most product photography I can very happily live without it.

And, if you use a program like Zero Noise(see discussion on this site for those who aren't familiar with it) and bracket the shot, the effects of not having an AA filter pretty much become a non-issue.  Win-win for outdoor photography types.  Indoor and wedding photographers... probably want an AA filter and them some.  

Of course, if the makers were smart, they would offer two models - one with and one without for a small up-charge.
Title: That famous AA filter...
Post by: joofa on January 06, 2009, 11:12:07 PM
Quote from: Wayne Fox
From this discussion it sounds like the only way to not have this as a problem is a sensor than can resolve greater than any lens you can put in front of it?

Or if you are willing to downsize your image, then one can get rid of aliasing with proper filtering even after it has corrupted an image.
Title: That famous AA filter...
Post by: Bob Smith on January 07, 2009, 05:38:08 AM
Quote from: Plekto
Of course, if the makers were smart, they would offer two models - one with and one without for a small up-charge.

Kodak took that approach years ago except that it wasn't two models.  They simply made the AA filter user interchangeable.  Originally most cameras came with an AA filter.  The user could easily remove it and replace it with one that only filtered IR for a modest cost.  Later models came with only the IR filter to hold down cost.  Those that wanted AA could add it for about $1K USD (not exactly a small upcharge).  These things were fragile enough that you didn't want to swap AA and IR filters in the field but it was a trivial task to do in the studio before a shoot where you knew you needed one particular type of setup or the other.  The 14n series was the only later model to come without an AA filter and no option to add one (HUGE marketing blunder).  

Kodak had many superb ideas that were way, way ahead of their time.  I still cringe at how some less than brilliant marketing decisions forced the demise of that line of cameras.

 
Title: That famous AA filter...
Post by: docmaas on February 12, 2009, 04:14:14 AM
You'll only be able to have one of two aa filters removed.  The aa filter in the portrait orientation also serves as the sensor cover glass and cannot be removed.

Been there done that.

Mike

Quote from: Bob Smith
AA filters do very good things.  The problem is that most subject matter in most images doesn't need them at all (especially as camera resolutions keep increasing) and your images are sharper without them.  The few areas that do need them can look horrible without them.  The trade off is how much time/effort are you willing to devote in software to fixing the problem areas versus accepting the softening of everything that the AA filter provides.  Various sharpening techniques and todays higher res cameras help a lot but you can't get all of what the AA filters suppresses back again.  For a portrait or fashion photographer that is constantly shooting a variety of fabrics, an AA filter is a no brainer.  For landscapes or most product photography I can very happily live without it.

Without an AA filter ALL of your images will be slightly sharper but a few will look horrible.  With an AA filter all of your images will be very slightly softer but none will look horrible.  If you're a marketing manger for a DSLR maker, which do you pick?

If I get a 5dII soon, I'll send my original 5D for a mod to remove the AA filter.

Bob Smith
Title: That famous AA filter...
Post by: docmaas on February 12, 2009, 04:21:00 AM
Quote from: Mitchell Baum
Has anyone here had Maxmax remove the AA filter? How was the result?

Best,

Mitchell

Yes,  have a look here.

http://www.pbase.com/masimo/5d_hotrod (http://www.pbase.com/masimo/5d_hotrod)
Title: That famous AA filter...
Post by: ACH DIGITAL on May 17, 2009, 06:42:34 PM
Quote from: Bob Smith
AA filters do very good things.  The problem is that most subject matter in most images doesn't need them at all (especially as camera resolutions keep increasing) and your images are sharper without them.  The few areas that do need them can look horrible without them.  The trade off is how much time/effort are you willing to devote in software to fixing the problem areas versus accepting the softening of everything that the AA filter provides.  Various sharpening techniques and todays higher res cameras help a lot but you can't get all of what the AA filters suppresses back again.  For a portrait or fashion photographer that is constantly shooting a variety of fabrics, an AA filter is a no brainer.  For landscapes or most product photography I can very happily live without it.

Without an AA filter ALL of your images will be slightly sharper but a few will look horrible.  With an AA filter all of your images will be very slightly softer but none will look horrible.  If you're a marketing manger for a DSLR maker, which do you pick?

If I get a 5dII soon, I'll send my original 5D for a mod to remove the AA filter.

Bob Smith

Hi Bob,

I have both cameras and I shoot jewelry and product and I have tested them both together . The original 5D has softer AA filter, the 5d MKII has it stronger don't know why. I would recoment, what I would like to do soon, to send the 5D MKII for removing the AA filter. The only thing I don't like about it is that they take the sensor cleanig off..

Antonio Chagin