Anti-aliasing - please explain. « Nikon Rumors Forum

The new Nikon Rumors Forum is now live at http://forum.nikonrumors.com/discussions. This forum is now in "read only" mode until I figure a proper way to import all data over to the new platform. Please register over at the new forum.


Nikon Rumors Forum

where there’s smoke there’s forum fire

Register or log in - lost password?

Nikon Rumors Forum » Weird & Fun

Anti-aliasing - please explain.

(43 posts) (20 voices)
  • Started 1 year ago by dormant
  • Latest reply from npolish
  • Related Topics:
    1. Those three legged friends, Tripods, Love or Hate
    2. D600 orders and availability
    3. D800, D800E, D4, Are We Ready to Compare?
    4. pny vs sandisk
    5. NR is censoring criticism

Tags:

  • catwoman costume
12Next »
  1. dormant

    preferred member
    Joined: Apr '09
    Posts: 182

    offline

    So the D800 might be available without an anti-aliasing filter. Some people on here seem to think that is a good thing.

    I have a strong background in digital signal processing of seismic signals (very similar to audio, but at lower frequencies). To me, aliasing is a thing that is sent by the devil, and the idea of removing an anti-aliasing filter is scary - it would allow the generation of artifacts that could never be removed in signal-processing.

    So can someone please explain, or point me to resources that explain, what anti-aliasing filters do in image processing and why some people don't like them.

    Posted 1 year ago #
  2. tcole1983

    preferred member
    Joined: Feb '10
    Posts: 1,553

    offline

    Here is a link from dpreview. http://www.dpreview.com/learn/?/key=aliasing

    It basically is like masking filter in post processing, but the camera automatically does this step. It sounds like it makes single points into multiple points in an effort to smooth out edges. With the increase number of points it then averages the points in the area to help create a less jagged edge. I think you lose some resolution because of this though. I know others probably know more and will chime in.

    Posted 1 year ago #
  3. dormant

    preferred member
    Joined: Apr '09
    Posts: 182

    offline

    That DPreview article explains it in terms I understand and I can now see that aliasing is basically the same thing in signal and image processing.

    I see that images will be sharper without an AA filter. Aliasing will be a problem for certain subjects, but becomes less of a problem with higher resolution sensors.

    Why can't the manufacturers build in a switchable hardware AA filter?

    Posted 1 year ago #
  4. bjrichus

    preferred member
    Joined: Nov '10
    Posts: 921

    offline

    dormant said:
    Why can't the manufacturers build in a switchable hardware AA filter?

    A good question...

    Perhaps the answer is both a bit of the old increased cost not justifying it in anything other than very top end or even lab gear kind of argument and until recently where 'relatively' affordable sensors are now approaching or equaling the kind of resolutions where moire patterns are MUCH less likely, would there have been any perceived benefit from NOT having one for "average" users? I hasten to add, that there are many users here who would like to not have them......

    Now I know, we all like the idea of more megapixels, more resolution, higher sharpness, etc, etc, etc, and we can debate what makes an image sharp until the end of time, but the mass market (and hence most manufacturers design and certainly not the marketing departments) won't usually add features unless they see sales coming from them or it's a defensive (as in "me too") kind of feature.

    My god! Can you imagine the reputation a P&S without an Anti-Alias filter would get when all the peeps who do silly things like using built-in flash in concert halls/stadiums or want to shoot photos of the little kiddies by the beach once a year, saw lots of "interference" (moire patterns) in their precious memories?

    If you know *when* you can go without one, you don't need one and a switch to turn it off would be ideal. :-)

    As I say... Perhaps that's the answer...

    Posted 1 year ago #
  5. TaoTeJared

    preferred member
    Joined: Apr '10
    Posts: 2,422

    offline

    dormant said:
    I see that images will be sharper without an AA filter. Aliasing will be a problem for certain subjects, but becomes less of a problem with higher resolution sensors.

    You got it. I have seen many images taken with "Hot Rod-ed" cameras and it is nuts how much better the images are. Of course that is for specific applications. Leica has been getting away with it on their M9 with great results so I starting to think we are getting closer to the threshold of it not being a huge issue that it once was.

    It's all about give and takes.

    Posted 1 year ago #
  6. Testing123

    preferred member
    Joined: Oct '10
    Posts: 232

    offline

    dormant said:
    Why can't the manufacturers build in a switchable hardware AA filter?

    They can't because I do not believe a "variably optically translucent" material exists. It would need to be a mechanically switched AA filter and that seems impractical.

    Posted 1 year ago #
  7. dslr

    member
    Joined: Aug '11
    Posts: 12

    offline

    The link on dpreview does not adequately describe the anti-aliasing filter used on digital cameras. The anti-aliasing filter used on an imaging sensor splits a single beam of light into 4, so that the same point of light directed to each appropriate receptor on the sensor (red, green, blue). Removal of this will can cause unwanted color noise -- colored jagged lines on sharp edges and Moire patterns. If Nikon goes with a 3-layer sensor like Sigma, it would eliminate the need for the AA filter.

    Posted 1 year ago #
  8. Testing123

    preferred member
    Joined: Oct '10
    Posts: 232

    offline

    dslr said:
    The link on dpreview does not adequately describe the anti-aliasing filter used on digital cameras. The anti-aliasing filter used on an imaging sensor splits a single beam of light into 4, so that the same point of light directed to each appropriate receptor on the sensor (red, green, blue).

    That would be quite the array of prisms, and would defeat the effectiveness of the camera. I'd really like to see your citation on this, as every other resource on the web an in print simply describes the AA filter for digital cameras as a quite pedestrian spatial lowpass.

    Let me try to show you:
    Currently the mosaic of a Nikon digital camera looks like this:
    RGBGRGBGRGBGRGBG
    BGRGBGRGBGRGBGRG
    RGBGRGBGRGBGRGBG
    BGRGBGRGBGRGBGRG
    A 12MP D300 has 12 thousand photosites, each photosite is under a Red, a Blue, or a Green filter. The filter arrays are arranged similar to the pattern I show above. The magic of demosaicing is that even through every one of the twelve thousand photosites only is sensitive to one color, you can interpolate all three colors for every one of them by using very complicated algorithms to learn from their neighbors.

    A filter such as you describe would effectively quarter the resolution of the sensor as it would end up looking like:
    ---------------------------------------------
    |RG|BG|RG|BG|RG|BG|RG|BG|
    |BG|RG|BG|RG|BG|RG|BG|RG|
    ---------------------------------------------
    |RG|BG|RG|BG|RG|BG|RG|BG|
    |BG|RG|BG|RG|BG|RG|BG|RG|
    ---------------------------------------------
    Where four photosites reside under one "filter". The problem with this concept is the way it actually works is with overlapping squares of photosites used to create pixels, matrix
    ---------------------------------------------
    |RG|BG|RG|BG|RG|BG|RG|BG|
    |BG|RG|BG|RG|BG|RG|BG|RG|
    ---------------------------------------------
    |RG|BG|RG|BG|RG|BG|RG|BG|
    |BG|RG|BG|RG|BG|RG|BG|RG|
    ---------------------------------------------
    AND matrix
    ---------------------------------------------
    R|GB|GR|GB|GR|GB|GR|GB|G
    B|GR|GB|GR|GB|GR|GB|GR|G
    ---------------------------------------------
    R|GB|GR|GB|GR|GB|GR|GB|G
    B|GR|GB|GR|GB|GR|GB|GR|G
    ---------------------------------------------
    AND matrix
    R|GB|GR|GB|GR|GB|GR|GB|G
    ---------------------------------------------
    B|GR|GB|GR|GB|GR|GB|GR|G
    R|GB|GR|GB|GR|GB|GR|GB|G
    ---------------------------------------------
    B|GR|GB|GR|GB|GR|GB|GR|G
    AND all the other permutations get fed into the great demosaic software (in your camera or in your post process suite if you shoot RAW).

    Posted 1 year ago #
  9. dslr

    member
    Joined: Aug '11
    Posts: 12

    offline

    Sorry, I did not mean to imply prisms. You can find description of the AA filter on Wikipedia. The filter is made of a material that causes doubling of the image (refraction) and in two layers will cause four beams from one.

    Posted 1 year ago #
  10. Testing123

    preferred member
    Joined: Oct '10
    Posts: 232

    offline

    Yes, the wikipedia entry cites two layers of a birefrigent material to create "four points". Where I think you are going astray is in the idea that this creates four distinct beams which land on four distinct photosites. That's not what it is doing. For how I confused the topic even more earlier I apologize.

    What this process is doing is bluring the image by making all object smaller than a certain point (chosen as the Nyquest point of the photosite spacing) in effect "larger" by smearing its edges. To the point this smears them to oblivion small features effectively disappear.

    The best analogy I can come up with is like looking through a piece of cloudy milk jug plastic. This blurs by a different process, but the idea is the same. This clouding prevents you from distinguishing thin lines because all edges become soft and a thin line is nothing but edge, yet you can still distinguish thick lines. The milk jug plastic is acting as a crude lowpass filter of very low spatial frequencies. The AA filter in your camera is operating at much higher spatial frequencies.

    Imagine drawing a thick dark line on a sheet of paper as with a magic marker.
    Now imagine replacing that thick dark line with four duplicates of it each one a quarter the "darkness" and stacking them on top of eachother.
    One offset slightly left in the X axis, one slightly right in the X axis, one slightly up in the Y axis, one slightly down in the Y axis. This is what the filter is doing. The center of the thick line will be 4/4ths (100%) as dark of the original as this is where all 4 images overlap (as will the vast majority of the line), but all the edges will now be only 1/4 as dark as the edges consist only of the offset. This is how the dual layers "soften" edges so that a transition from light to dark never happens over a space smaller than a photosite.

    Posted 1 year ago #
  11. Ade Barkah

    preferred member
    Joined: Apr '11
    Posts: 108

    offline

    dlsr (and tcole) had it essentially correct. AA filters work by spreading points of light into nearby (but not necessarily adjacent) pixels, essentially by creating four overlapping beams of light slightly offset from each other, using two sheets of (optical) material.

    A theoretically ideal and properly tuned AA filter will filter out only high frequency details which exceed the sensor's capability. So an AA filter should not quarter the resolution of the sensor.

    Or maybe saying it another way, in the blurring process each pixel gets some contribution from nearby pixels, but are not "replaced" by another pixel. The process also does not "throw away" any pixel. Either of those WOULD essentially reduce (perhaps quarter) the sensor's resolution. We'd call those "downsampling" filters instead of AA filters. Downsampling filters can make moire & aliasing even worse.

    Of course in reality an ideal AA filter doesn't exist, so there is some reduction in information. And typically an AA filter is combined with a (similarly non-ideal) IR filter.

    I'm not convinced higher-resolution sensors will reduce the need for an AA filter. Plus if anything, the push for video will increase the need for stronger AA filters.

    Lastly, don't forget that Nikon has a patent for an on/off AA filter:

    http://nikonrumors.com/2011/05/21/nikon-patent-for-onoff-optical-low-pass-filter-olpf.aspx/

    Posted 1 year ago #
  12. Testing123

    preferred member
    Joined: Oct '10
    Posts: 232

    offline

    Ade Barkah said:
    dlsr (and tcole) had it essentially correct.

    Except for the crucial point he said it puts a point onto four adjacent photosites. That is not what the filter does. It creates four (slightly) offset images. That might put a line/object/transition on four photosites, it might put it on forty. There are no "appropriate" photosites.

    Ade Barkah said:
    I'm not convinced higher-resolution sensors will reduce the need for an AA filter.

    As soon as the Nyquest limit exceeds the resolving limit of a lens an AA filter accomplishes nothing. Even before that happens (the much maligned day when diffraction limitation kick in at f/1.4) the practical need for AA filters will decrease as the effects of aliasing, while still visible on a pixel-level zoom, will be invisible at reasonable photo sizes and viewing distances.

    Posted 1 year ago #
  13. dslr

    member
    Joined: Aug '11
    Posts: 12

    offline

    Thanks for your explanation, I can see now I was oversimplifying.

    What are your thoughts on this sensor technology patent from Nikon. Any chance this might be used?
    http://www.google.com/patents?id=vSp9AAAAEBAJ&printsec=abstract&zoom=4&dq=7,138,663#PPP1,M1

    Posted 1 year ago #
  14. Ade Barkah

    preferred member
    Joined: Apr '11
    Posts: 108

    offline

    In practice, each optical point is spread among very few neighboring pixel (not forty). I believe for a Bayer sensor, the filter is typically tuned to spread among nearby Green pixels.

    I specifically mentioned "video" in reference to the need AA filters. Typical DLSR video processing uses a subset of the (high resolution) sensor. I.e., it downsamples to retain the same "crop" but at a lower resolution.

    As we've discussed, downsampling makes aliasing worse. So we'd still need AA filters (pre-sensor) or we'd need stronger post-processing, either in camera or on the computer. For still images, post-processing is a viable option. For video, it may not be practical.

    The good news is upcoming Nikon cameras should have much stronger processors than the current generation, so for stills at least the need for AA filters is somewhat reduced.*

    (* there are variables here as well such as reduced-resolution JPEGs, which may need stronger AA again due to downsampling). I.e., the reduction of high-resolution images into "reasonable photo sizes" might in fact require higher AA either pre-sensor or in post.

    Posted 1 year ago #
  15. NikoDoby

    The Terminator
    Joined: May '09
    Posts: 6,598

    offline

    I cleaned this thread up and deleted everything that wasn't explaining what an AA-filter is/does.

    Back on-topic

    Posted 1 year ago #
  16. dormant

    preferred member
    Joined: Apr '09
    Posts: 182

    offline

    Thanks, Niko, I was enjoying this thread until it got distracted.

    The rumoured D800 now begins to make a bit of sense. People always say they don't want more megapixels. However, increasing the pixel density is a good way of getting sharper pictures. A 36Mp image, filtered and properly downsampled to 12Mp will be sharper and less susceptible to Moire patterns than an original 12Mp image. The downsampling will also decrease the noise a tad, but I have no idea if that would be comparable to the noise on the original 12Mp image.

    Posted 1 year ago #
  17. Drab

    preferred member
    Joined: Aug '10
    Posts: 540

    offline

    dormant said:
    A 36Mp image, filtered and properly downsampled to 12Mp will be sharper and less susceptible to Moire patterns than an original 12Mp image. The downsampling will also decrease the noise a tad, but I have no idea if that would be comparable to the noise on the original 12Mp image.

    Yes, If MP count gets high enough the physical AA filter can be removed - but how much light is it robbing? (I know there are other issues)

    All things being equal 36->12 will have the same noise as 12. All things aren't equal, though. Ultimately noise levels (all things being equal) are subject to the total amount of light collected. Divide than light into 36MP and then recombine into 12MP is just more work than dividing by 12 to begin with.

    Posted 1 year ago #
  18. TaoTeJared

    preferred member
    Joined: Apr '10
    Posts: 2,422

    offline

    NikoDoby said:
    I cleaned this thread up and deleted everything that wasn't explaining what an AA-filter is/does.

    Thank you

    dormant said:
    A 36Mp image, filtered and properly downsampled to 12Mp will be sharper and less susceptible to Moire patterns than an original 12Mp image. The downsampling will also decrease the noise a tad, but I have no idea if that would be comparable to the noise on the original 12Mp image.

    I think you are trying to mix bleach with apple juice to get lemon-aid.
    Everyone on here seems to understand that AA filters reduce moire that is an optical phenomenon. Chromatic abrasion also can add/create moire as well.

    Now it seems that this is going into using software to reduce it. Down-sampling will not necessarily reduce noise or moire. It can, but it also can make it worse or blur the image to correct it as well.

    Moire happens when frequencies start to converge which is a basic end effect of Regular Rectangular Patterns on sensors. Computers work in 1 & 0s and has a regular pattern as well so that is why software solutions are haphazard as well. All of it is better solved with physical design then software. The physical design fix so far is only to use an AA filter which blurs the sharp edges of the image slightly. If you have ever seen a 6mp dslr with with AA removed you can really tell the difference, but now not so much.

    Two ways to correct: Go to a Sigma Foveon type sensor which has proven it reduces moire to an indeterminable amount. The second is to capture the light detail at such a fine level the eye can no longer discern (recognize) it. It will exist though, but as such a small level, it will not be noticeable. This is what companies seem to be moving to as (among other things) utilizing as a solution.

    I'm not sure if 36mp is at that point or not - we will have to see that.

    Noise on the other hand with increase mp will get worse (that is solvable by software) as that is produced by the "wells" not receiving enough light to properly record the color. Software improve noise using algorithmic calculations based on the recorded color values of adjacent pixels. The issue arises when those also did not record good color values. That is why having larger wells which capture more light is preferable. This calculation could as a result reduce moire but that is not the objective of the procedure and is just a secondary result of the process.

    Posted 1 year ago #
  19. Drab

    preferred member
    Joined: Aug '10
    Posts: 540

    offline

    TaoTeJared said:
    Moire happens when frequencies start to converge which is a basic end effect of Regular Rectangular Patterns on sensors. Computers work in 1 & 0s and has a regular pattern as well so that is why software solutions are haphazard as well. All of it is better solved with physical design then software.

    I agree with everything you say except this paragraph.

    1 - Regular rectangular patterns are not the cause of Moire. Regular patterns (rectangular or not) at frequencies greater than the Nyquest limit of the sensor are the cause. Moire is the visual artifact of aliasing.

    2 - It is irrelevant that computers work in binary. Nyquest and Shannon proved that a digital sampling system can perfectly reproduce a bandlimited analog input so long as there is the said input side bandpass filter and proper reconstruction filtering on the output side.

    3 - "Bandlimited" is the key. Once sampling has taken place aliasing can not be filtered out without making assumptions.

    Posted 1 year ago #
  20. jonnyapple

    Goldfingers
    Joined: May '09
    Posts: 3,400

    offline

    Absolutely right, Drab. I saw "moire" (time-domain aliasing) today by firing a 160Hz strobe light at a speaker that was being driven by a 162Hz sine wave generator. (I love my job.) This gives a 2Hz beat frequency that you can see: the cone moves in and out as if driven by a 2Hz generator. There are no rectangles there—only discrete pulses of light to sample the position of the speaker.

    This is time-domain aliasing, but it's exactly the same principle in space. Eventually the AA filter may be the imperfect lenses we use, but I don't think we're there yet. The fact is, like Drab says, there has to be some filtering done because frequencies just above the Nyquist frequency will be problematic.

    This is me thinking out loud: I think it also becomes less of a problem as the sampling becomes less discrete, because that has an effect similar to low pass filtering the signal (i.e. as the photosite becomes better at collecting light from the entire photosite area, very high frequencies are naturally filtered out). This would be analogous to increasing the pulse time of the strobe experiment I mentioned until the pulse time almost equals the time between pulses. In fact, lighting the speaker with an incandescent light is the extreme case of the light on constantly (100% duty cycle), and the aliasing disappears.

    Posted 1 year ago #
  21. Nikoner

    preferred member
    Joined: Apr '10
    Posts: 171

    offline

    All that jargon talk is find & dandy and please carry on, but in simple terms what type of photography (not video) could benefit from a D800 with AA filter removed?

    Sports, landscape, cityscape, portrait, macro??? (assume no post processing is done)

    Thanks

    Posted 1 year ago #
  22. Drab

    preferred member
    Joined: Aug '10
    Posts: 540

    offline

    Whatever you want more detail in and are able to predict, if not control, the risk of aliasing.

    Posted 1 year ago #
  23. NikoDoby

    The Terminator
    Joined: May '09
    Posts: 6,598

    offline

    You wouldn't want to shoot portraits without an AA filter. Fabrics are prone to cause moire. You'd probably get moire with fine grids and windows in architecture too. The biggest advantage would be for landscapes.

    Posted 1 year ago #
  24. Nikoner

    preferred member
    Joined: Apr '10
    Posts: 171

    offline

    So it will show wrinkles and sagging skin in much more fine details then! ladies are not gonna like this at all.

    I often got a lot of moire pattern in my P6000, could it be Nikon experimented with a inferior AA filter on it for their upcoming DSLR?

    As P6000 had quite a few innovative features which are now being incorporated with newer camera releases (p&s, mirrorless, dslr):

    U1 & U2 settings.
    continues shooting in a semi rugged p&s.
    filter thread.
    GPS.
    Network enabled Ethernet connector.

    Posted 1 year ago #
  25. Drab

    preferred member
    Joined: Aug '10
    Posts: 540

    offline

    Nikoner said:
    I often got a lot of moire pattern in my P6000, could it be Nikon experimented with a inferior AA filter on it for their upcoming DSLR?

    Could you post a photo somewhere? I don't have a P6000, can't speak to the P6000, but I'd like to see the moire.

    Thanks

    Posted 1 year ago #

RSS feed for this topic

12Next »

Reply »

You must log in to post.

NikonRumors Forum (http://nikonrumors.com/forum) is proudly powered by bbPress
Disclaimer: This site has no affiliation with Nikon USA or any other subsidiary of Nikon. Please visit the official Nikon website at nikon.com
Copyright © 2008-2011 NikonRumors.com