Jump to content

The Leica Forum uses cookies. Read the privacy statement for more info. To remove this message, please click the button to the right:    OK, understood.

Photo
- - - - -

Towards an explanation of the Italian Flag Phenomenon


  • Please log in to reply
208 replies to this topic

#1 Lindolfi

Lindolfi

    Erfahrener Benutzer

  • Members
  • 870 posts
  • City / Ort:Groningen

Posted 05 June 2011 - 12:00

Advertisement (Gone after free registration)
Several threads have been produced concerning the italian flag phenomenon, but none have been able to give a satisfying explanation of this effect.

I'm starting this thread with the only purpose of finding such an explanation. Other discussions in this thread should be avoided in order to keep momentum in the direction of an explanation.

Let's first look at the cleanest example possible: images taken with a non-shiny opaque white sheet of plastic in front of a wide angle lens. Both presented here are from the 21/2.8 Elmarit ASPH at f/16. The first one is not coded and the second one is coded as an 21/2.8 Elmarit ASPH. The images are taken at 160 ISO and with an exposure compensation of +2 stops, lens distance ring turned to infinity. No postpressing other than loading in LightRoom 3.4.1. Light from overcast clouded sky.

Posted Image
not coded

Posted Image
coded

First you can see the excellent job this firmware (1.138) does in correcting the italian flag phenomenon and it takes care of some (fortunately not all) vignetting.

Secondly, you can see that the italian flag phenomenon is not red-white-green from left to right, but from left lower corner to right upper corner.

Thirdly the true discolouration is not red, but magenta (lack of green) lower left corner and cyan/green (lack of red) upper right corner.

Now what we know is the following (looking along the path of the light rays):

1] Any colour change from the optics (lens only) should be rotational symmetric around the optical axis, so although the lens produces the angle of incidence on the sensor, it does not produce the change in colour we see in the italian flag phenomenon.

2] There is a cover glass on the sensor that takes care of IR filtering, which is quite thick (1 mm). This cover glass disperses a white ray of light consisting of different wavelengths (colours) to slightly different positions on the sensor. This effect increases at an increasing obliqueness of the rays. However, this effect also is rotational symmetric around the optical axis. Moreover, rays that are neighbours of the rays we look at simply add up to the full spectrum of white light. So the chromatic dispersion of the cover glass on its own (!) can not be responsible for the observed discolouration.

3] There are microlenses on top of the pixels of the sensor that are shifted (increasingly towards the edge of the sensor) relative to the pixels in the direction of the center of the sensor, to be able to catch sufficient lightrays from wide angle lenses. When it is assumed that this shift is rotational symmetric around the optical axis, this shift can also not be responsible for the oberved phenomenon. This is even true when these microlenses themselves have chromatic aberration.

4] The sensor consists of pixels that are sensitive to three different overlapping bands of the visible spectrum: red, green and blue. These pixels are arranged in a Bayer pattern in which there are two times as many green pixels than either blue or red sensitive pixels. In principle when you have an even number of pixels along the length of a sensor, the pattern is asymmetric, since you may start with a red/green pair at the left edge and you end up with a green/blue pair at the right edge of the sensor. But this asymmetry extends only over 1 only one pixel and so the changes of colour over larger distances can not be explained with it. Moreover, the algorithm that calculates the rgb components of one image pixel in the produced image uses a weighted combination of red, green and blue sensor pixels.


So we are left without an explanation. The effect may be produced by a combination of properties of the cover glass, micro lenses, sensor and algorithm. But how exactly?


So let us look at some observations:

a] According to some observers, the italian flag phenomenon is known from sensors without micro lenses, so perhaps we can exclude them from an explanation.

b] There is a relation with focal length and not with the place on the sensor, so the angle of incidence of the lightrays is certainly a necessary condition of the phenomenon.


Some observations I would like to see filled in:

i] If you take the area covered by the M8 sensor out of an M9 image, using the same lens, and you use no coding, do you get the same amount of colour change? I have no M8, so can not do the test. I'm asking this to see what the effect is of the thickness of the cover glass.

ii] What are clear examples of italian flag phenomenon in other digital sensors than M9 and M8. What do these sensors have in common?

Michael J. Hußmann (user mjh) has repeatedly stated that no explanation has been given. So can we do better?

Edited by Lindolfi, 05 June 2011 - 12:56.

  • otto.f said thank you to this
Bert
PhotoBlog

#2 sydkugelmass

sydkugelmass

    Erfahrener Benutzer

  • Members
  • 762 posts

Posted 05 June 2011 - 14:48

I briefly recall my own hypotesis about the italian flag pattern, exposed (4th of june) in the firmware thread:

http://www.l-camera-...tml#post1724372

I'm not sure about the thesis that, given the asymmetrical (anisotropical in some sense) Bayer pattern tipical of the sensor, it does matter only at the local pixel level and, such, can not be responsible for the Italian Flag Pattern, which seems to be an integral effect.

The fact that the image pixel RGB assignment algorithm, applied to raw sensor data, uses a weighted sum can't do much if a large incidence angle wrt normal-to-sensor-surface vector is implied. Weights are presumably calculated wrt certain angles coming from the lens, which are different for different lenses. The fact that a much better correction in color shift is obtainable, e.g. for the CV UWHeliar 12mm / ZM distagon 15mm if You set up their correction as a 21mm (old type) Leica WA, than that obtainable coosing the 16mm Tri-Elmar, (may be) can say something.

A demonstration about these observed facts is welcome, but I would expect the use of Fourier Optics and Vector Field Analysis to a significant extent
  • Malvolio said thank you to this

#3 Lindolfi

Lindolfi

    Erfahrener Benutzer

  • Members
  • 870 posts
  • City / Ort:Groningen

Posted 05 June 2011 - 15:09

Thanks sydkugelmass. Indeed you expect that the needed correction is not only related to focal length, but also to the optical design, more specifically to the location of the back principal plane: if it is located further from the sensor, less correction is needed.

This effect has nothing to do with the Bayer pattern and its asymmetry, only with the angle of incidence of the light rays.
Bert
PhotoBlog

#4 sydkugelmass

sydkugelmass

    Erfahrener Benutzer

  • Members
  • 762 posts

Posted 05 June 2011 - 15:39

This effect has nothing to do with the Bayer pattern and its asymmetry, only with the angle of incidence of the light rays.

I like this thesis.

I would like its mathematical demonstration even more than the thesis itself.

May be this demonstration can be given in detail so that apodyptical assumptions can be thoroughly excluded?

Why no vertical median plan symmetry exists in the phenomenon?

Why the phenomenon presents itself with a lower-left-magenta/upper-right-cyan shift character?

By the way: on the M6, using film, no problem exists about color shift with the same optics cited before. Why?

Is out there something wrong not in structural facts about using a Bayer pattern sensor, but, much more simply, in a trickier-than-desirable implementation of the correction algorithm as given by the M9?

#5 Lindolfi

Lindolfi

    Erfahrener Benutzer

  • Members
  • 870 posts
  • City / Ort:Groningen

Posted 05 June 2011 - 15:45

You lifted that sentence out of its context, sydkugelmass, so let me clarify: This effect (the fact that you need correction not quite in line with focal length only) has nothing to do with the Bayer pattern and its asymmetry, only with the angle of incidence of the light rays.

But so far I agree with the direction in which you point when looking for an explanation of the Italian Flag Phenomenon: a combination of the algorithm and the Bayer pattern. But we still have no explanation.

The fact that the flag is oriented along a diagonal as I have shown (rather than left-right) may be meaningful as well as the wavelengths missing from the white light in both diagonal corners.
Bert
PhotoBlog

#6 Lindolfi

Lindolfi

    Erfahrener Benutzer

  • Members
  • 870 posts
  • City / Ort:Groningen

Posted 05 June 2011 - 15:51

I have written software to simulate any optical design as long as I have the glass type per element, both radii of curvature and location. (click for a dutch article on that), but I lack the data and software for the sensor, microlenses and cover glass.
Bert
PhotoBlog

#7 pop

pop

    Moderator

  • Moderators
  • 13,821 posts
  • LocationNear Basel
  • City / Ort:near Basel

Posted 05 June 2011 - 16:01

The experimental setup is very nice in that it appears to be repeatable and in that it reduces the image in question to a very simple case. However, one instance of the defect might be a bit difficult to debug. I would like to suggest some further experimentation with the original setup:

- Is the defect repeatable if you unmount and remount the same lens to the same body?
- How does it change with different apertures?
- How does it change with different distances between lens and sensor?
- How does it change with different instances of the same camera type?
- How does it change with different instances of the same lens type?

Also, a way of quantitatively discussing the defect would be nice. For instance, you could take profile lines of different cross sections using a tool such as the ImageAnalyzer.

Philipp
...


Beiträge in dieser blauen Schrift schreibe ich als Moderator. --
I use this blue typeface when I write in my function as a moderator.


#8 sydkugelmass

sydkugelmass

    Erfahrener Benutzer

  • Members
  • 762 posts

Posted 05 June 2011 - 16:04

I have written software to simulate any optical design as long as I have the glass type per element, both radii of curvature and location. (click for a dutch article on that), but I lack the data and software for the sensor, microlenses and cover glass.


We are starting our considerations from not so different points. The conclusions could be coincident. I completely agree with your observation about the morphology of the distribution of the phenomenon wrt the image color content. Having a good simulation program for the optical part, in our problem, may be very good but could require a model-level integration of the 'sensor' structure, taking in account the observational fact that what happens on film is different from what happens on the sensor, using the same lens.

#9 Lindolfi

Lindolfi

    Erfahrener Benutzer

  • Members
  • 870 posts
  • City / Ort:Groningen

Posted 05 June 2011 - 17:20

- Is the defect repeatable if you unmount and remount the same lens to the same body?
- How does it change with different apertures?
- How does it change with different distances between lens and sensor?
- How does it change with different instances of the same camera type?
- How does it change with different instances of the same lens type?

Also, a way of quantitatively discussing the defect would be nice. For instance, you could take profile lines of different cross sections using a tool such as the ImageAnalyzer.


Thanks Pop. I will handle the first three items and produce tint and brightness curves over the diagonal. Can't handle the 4th and 5th item due to the fact that I have only one M9 and one 21/2.8 asph here...

Hopefully such data is useful for coming up with an explanation of the Italian Flag Phenomenon.
Bert
PhotoBlog

#10 giordano

giordano

    Erfahrener Benutzer

  • Members
  • 4,212 posts

Posted 05 June 2011 - 18:35

Sydkugelmass,

"apodyptical": I thought I had a decent vocabulary, but this beats not only me but also every dictionary I have access to. Google found me only one instance, in a message clearly written by someone who wasn't a native speaker of English.

Did you make it up, or what word did you really mean?
John
Pictures at http://jn.smugmug.com

#11 sydkugelmass

sydkugelmass

    Erfahrener Benutzer

  • Members
  • 762 posts

Posted 05 June 2011 - 19:45

Sydkugelmass,

"apodyptical": I thought I had a decent vocabulary, but this beats not only me but also every dictionary I have access to. Google found me only one instance, in a message clearly written by someone who wasn't a native speaker of English.

Did you make it up, or what word did you really mean?


Comes from ancient Greek: apò-deiknumi. An unproofed statement given as soundly proven. I hadn't to use Google nor Wikipedia. It comes from the far past. Have found many mistakes in my English? Please help to correct.

Btw: We are Off Topic.

Errata corrige: apodictical. Greek verb deiknumi does not generate any 'y' when transposed in English. You're right.

Edited by sydkugelmass, 05 June 2011 - 19:49.

  • giordano said thank you to this

#12 Lindolfi

Lindolfi

    Erfahrener Benutzer

  • Members
  • 870 posts
  • City / Ort:Groningen

Posted 05 June 2011 - 20:07

Here are the graphs of the two test images I placed in the first post, with luminance and cyan-magenta content along the diagonal from lower left corner to upper right corner: luminance of 1 is maximum, a cyan-magenta of 0 is no discolouration.
+1 is only magenta, -1 is only cyan.

Posted Image uncoded

Posted Image coded

Software was written in MatLab, calculated over 16 bit images. You can see that the magenta-cyan discolouration in the uncoded image is very pronounced and steady changing from magenta to cyan. With coded lens there is some magenta residue in the both diagonal corners. Vignetting is about halved.

Next step: variation in f-stop to see what it does with the Italian Flag Phenomenon.

Edited by Lindolfi, 05 June 2011 - 20:21.

  • sydkugelmass said thank you to this
Bert
PhotoBlog

#13 Lindolfi

Lindolfi

    Erfahrener Benutzer

  • Members
  • 870 posts
  • City / Ort:Groningen

Posted 05 June 2011 - 20:35

Here is the series of analyses of the uncoded images with the 21/2.8 asph mounted on the M9 set to infinity at various apertures and uncoded

Posted Image at f/16

Posted Image at f/11

Posted Image at f/8

Posted Image at f/5.6

Posted Image at f/4

Posted Image at f/2.8

And here is the analysis of the coded series

Posted Image at f/16

Posted Image at f/11

Posted Image at f/8

Posted Image at f/5.6

http://www.photoplaz...fi/L1017626.png at f/4

http://www.photoplaz...fi/L1017627.png at f/2.8

Conclusion: The Italian Flag Phenomenon becomes slightly stronger when aperture is openened. The corrected image shows a similar trend, which could mean that the firmware does not use the estimated aperture as a variable for the correction, but a standard correction is applied separately for each coded lens, but independent of aperture.

Edited by Lindolfi, 05 June 2011 - 21:34.

Bert
PhotoBlog

#14 pop

pop

    Moderator

  • Moderators
  • 13,821 posts
  • LocationNear Basel
  • City / Ort:near Basel

Posted 05 June 2011 - 22:16

Here's a set of graphs on the very first uncoded sample in post 1. Each graph shows the brightness of each color along a straight line in the image:

Along the vertical middle axis:
Attached File  Vertical_middle.jpg   13.44KB   1074 downloads

Along the horizontal middle axis:
Attached File  Horizontal_middle.jpg   15.46KB   1074 downloads

Diagonal from top left to bottom right:
Attached File  Top_left_to_bottom_right.jpg   16.73KB   1071 downloads

Diagonal from bottom left to top right:
Attached File  Bottom_left_to_top_right.jpg   17.63KB   1073 downloads

Edited by pop, 05 June 2011 - 22:18.

  • Lindolfi said thank you to this

Philipp
...


Beiträge in dieser blauen Schrift schreibe ich als Moderator. --
I use this blue typeface when I write in my function as a moderator.


#15 Lindolfi

Lindolfi

    Erfahrener Benutzer

  • Members
  • 870 posts
  • City / Ort:Groningen

Posted 05 June 2011 - 22:28

Interesting Pop, but from the RGB values it is hard to see the discolouration, since it is the relation between the colours. Therefore I decided to derive the luminance and the magenta-cyan axis from the rgb data. From your graphs you can see it from the way rgb curves cross each other. You also show that the left bottom to top right effect is the largest. Left bottom green curve below and top right red curve below the others. Interesting.

Edited by Lindolfi, 05 June 2011 - 22:32.

Bert
PhotoBlog

#16 pop

pop

    Moderator

  • Moderators
  • 13,821 posts
  • LocationNear Basel
  • City / Ort:near Basel

Posted 05 June 2011 - 22:37

Since the image is supposed to be a neutral and featureless grey area, I personally find it much easier to see the behavior of the three components across the image when graphed this way. Where all three lines coincide, you have a neutral grey. You can see that each color "vignettes" with its own peculiar gradation and that the gradations do not share a common center; however, the curves are quite similar in shape.

@the more mathematically savvy members: Can anyone discuss the individual lines in those graphs? Are those circle segments or what, and what are their apparent parameters?

Edited by pop, 05 June 2011 - 22:56.

Philipp
...


Beiträge in dieser blauen Schrift schreibe ich als Moderator. --
I use this blue typeface when I write in my function as a moderator.


#17 Washington

Washington

    Erfahrener Benutzer

  • Members
  • 2,734 posts

Posted 06 June 2011 - 00:44

Italian Flag Syndrome ???
Oh, when are you guy’s gonna quit picking on Luigi? :)

#18 adan

adan

    Erfahrener Benutzer

  • Members
  • 5,837 posts
  • City / Ort:Denver

Posted 06 June 2011 - 01:41

Several comments (none should be taken as really negative or critical):

1. Red edge. I'm just including that term since it is the one most commonly used on this forum for this problem, and now this thread will show up in a search for "red edge." ;)

2. The one thing (almost) certain about this problem is that it is variable. Some cameras show it, others don't; some show it with some susceptible lenses and not with others. Your results look very similar to what I get with a coded NON-ASPH 21 f/2.8 - but I've tried at least one ASPH 21 f/2.8 that showed a lot less color shift that your example. And my M9 tends to NOT show the cyan shift top and right in most cases.

That raises the question of how much we can tell from an analysis of ONE lens on ONE camera.

3. I'm glad you point out that it is really a magenta/cyan issue - although obviously the exact color shift varies with subject matter and/or WB. I see it most often in blue sky, and since sky already contains blue, the blue component of the magenta shift tends to be less obvious (blue + blue = blue), and the "red" part of the magenta is what remains as noticeable.

4. You quote mjh as saying no explanation has been given. True, in terms of a final and definitive explanation. However, many theories have been proposed - most of them not yet absolutely ruled out. The inherent asymmetry of the Bayer pattern (which Leica themselves mentioned in passing as something they were looking into); imperfect centering of sensors on installation, or of some lenses - and so on.

At first, I wasn't fully persuaded that the Bayer pattern, with just a one-pixel physical separation of red/green or red/blue (diagonally) could produce a color shift area over a hundred pixels wide. With more thought, I see that it would work as a cumulative bias towards one color or the other. And expect it is at least part of the explanation.

At this point, I've decided to quit worrying about it. It isn't something I can fix on my own (in terms of hardware and the original image - yes, I can fix it after the fact). I'm just waiting to see how well the upcoming firmware improves things.

Edited by adan, 06 June 2011 - 01:43.

  • sydkugelmass said thank you to this

#19 Washington

Washington

    Erfahrener Benutzer

  • Members
  • 2,734 posts

Posted 06 June 2011 - 02:47

Andy,
You do understand I was just joking….. but, as for myself, I have never seen it.
I have seen what I would call ‘’normal’’ red edge with some lenses and not with
others of the same focal length. Why, I dunno why, but I create a profile for those
that do and It’s fine. Beats me! Cheers.

#20 zlatkob

zlatkob

    Erfahrener Benutzer

  • Members
  • 1,963 posts
  • City / Ort:New Jersey, USA

Posted 06 June 2011 - 04:24

What I gather from the above is that it seems that something is gradually diminishing red in the upper right corner, causing a shift to cyan, and something is gradually diminishing green in the lower left corner, causing a shift to magenta. That something isn't present in film cameras, so it has to be present in or on the digital sensor. It may be the structure of the pixels or some aspect of the cover glass or both. It may be an unavoidable consequence of trying to correct for worse problems, i.e. a necessary design by-product. Or it may be an unfortunate design flaw. Without an official explanation, we can only guess at the cause. I suspect that engineers who are responsible for the sensor have a pretty good understanding of the cause.




0 user(s) are reading this topic