Jump to content

Towards an explanation of the Italian Flag Phenomenon


Lindolfi

Recommended Posts

This is getting really interesting. More 28mm pinholes please!:)

 

Soon after the M9 came out there was speculation about whether the sensor wasn't exactly centred left-to-right on the optical axis of the lens (in order to make room for the battery housing). I've been wondering if that could be a factor in the IFP - but these shots with a top-to-bottom gradient suggest not.

Link to post
Share on other sites

I had a closer look at the raw file, directly from the camera, because at that point the data has not been demosaiced or gamma corrected yet.

What I found is not a big surprise, but could help as a small step in the direction of understanding what is happening.

The ratio between R,G and B in the middle of the image is taken as a reference.

Blue is the weakest signal, then comes Red and Green has the largest amplitude.

 

What I can see now is starting from the middle of the picture that the proportion Blue/Green becomes higher to the right and lower to the left and this from top to bottom.

The proportion Red/Green starting from the middle gets higher going down and lower going up, and this time from left to right.

 

This of course is exactly what we are seeing, but I think because of that, demosaicing can also be excluded as a possible cause.

 

Hans

Link to post
Share on other sites

I had a closer look at the raw file, directly from the camera, because at that point the data has not been demosaiced or gamma corrected yet.

Hans

 

How did you get the CFA (Color Filter Array) data from the DNG file, Hans?

Link to post
Share on other sites

These are contour plots of the the relative contributions of red, green and blue to the image of the 0.2 mm pinhole located at 28 mm from the sensor. These show that indeed in the central circle the direction of maximal change is vertical, while there is an extra effect along the left-bottom to top-right diagonal outside that circle. (The grainy shape of the contour lines comes from the noise due to the long exposure time through the tiny pinhole). The contourlines are separated by 2.5% contribution to the brightness. A value of 1 is perfectly neutral.

 

pinhole02at28at800RED.png

 

pinhole02at28at800GREEN.png

 

pinhole02at28at800BLUE.png

Edited by Lindolfi
Link to post
Share on other sites

How did you get the CFA (Color Filter Array) data from the DNG file, Hans?

 

I loaded the 36 Mb DNG file in a HEX editor.

Image starts at 34400 Hex.

From there each line has 10.432 bytes.

Total number of lines is 3472.

With these numbers you can calculate the address of each series of point in the image.

First line is B G B G . . .

Second line is G R G R . . .

 

 

Hans

  • Like 1
Link to post
Share on other sites

OK, using the Bayer pattern and combining the R,G and B values using perfect neutral grey in the middle (the R,G and B layers are scaled to get neutral grey in the middle), it appears that the diagonal change is not present in the raw data, only the vertical change. The synthesised image is almost perfectly symmetrical about the vertical midline.

 

Here is the synthesised image from the separate colour components again from the pinhole photo with diameter of 0.2 mm and 28 mm distance to the sensor. Only the colour is shown, the difference in brightness over the image has been removed.

 

syntm9.jpg

Edited by Lindolfi
  • Like 1
Link to post
Share on other sites

Just for illustration purposes, I have produced 3 graphs.

The first one displays the content of the DNG file in line 10 and 11.

The second one shows the content of 2 lines in the midlle of the picture,

and the last one shows the content of the lines 10 and 9 just before the end of the picture.

The upper serie of points shows the magnitude of the Green pixels for 2 lines in succession.

The series of points below the Green points, are showing resp. the magnitude of the Blue in the left part and the Red pixels in the part to the right.

 

The Y axis differs between the images.

 

Be aware that RGB values in the Jpeg image are the result of Demosaicing, color matrix and white balance conversion and gamma correction.

So the relation with the RGB values in the Jpeg and in the DNG file are not at all simple.

 

Hans

 

Welcome, dear visitor! As registered member you'd see an image here…

Simply register for free here – We are always happy to welcome new members!

 

 

  • Like 2
Link to post
Share on other sites

Thanks. With these graphs you show the same as in my synthesised image: For instance the red component is symmetrical from left to right but not from top to bottom.The right hand side lower curve is symmetrical in bell shape, but changes in amplitude from top to bottom (highest in your third graph).

Link to post
Share on other sites

Now that we agree on the fact that there is no red edge on the left side in the raw data, the quest for the explanation of the Italian Flag Phenomenon splits up into two questions:

 

[1] Why is there a hot area in terms of magenta and red in the lower middle part of the image? (this question can also be formulated as: "Why is there an area with lack of green in the lower middle part of the image")

 

[2] Why is this colour pattern further expanded with an extra hot area in terms of red and magenta in the lower left corner after demosaicing, white balance correction and gamma correction?

 

I think we should start with the first question.

Link to post
Share on other sites

The major optical thing in the M9 house that is vertically different is the lightmeter in the bottom of the house. To make certain that has nothing to do with it, I covered it, making a pinhole exposure and comparing with a non-covered lightmeter exposure: Result: the raw data is identical. So the three lenses of the lightmeter unit have nothing to do with it.

 

Another thing that needs consideration: The sensor with cover glass looks green. Now that presumably has to do with the fact there are twice as many green sensitive wells as there are blue and red sensitive wells. However, the cover glass may also have something to do with the colour you see. Does anybode have data on the properties of that cover glass. It is an IR filter and thicker than in the M8 to be able to handle the infrared light better than the M8 did. That is what we know from the interview with Stephan Daniel from Leica. But does it have any other filtering properties?

Edited by Lindolfi
  • Like 1
Link to post
Share on other sites

Lindolfi and Hans

 

Wonderful work. Do I understand correctly - the color data you are analyzing comes from images through a pinhole aperture? How much does the difference between pinhole and "normal" or wide-angle lens account for the difference between italian flag and what you're seeing?

 

Christian

Link to post
Share on other sites

There is essentially no difference in discolouration pattern between a pinhole at 28 mm and a 21/2.8 Elmarit at f/16 (which has a back principal plane at 28.6 mm from the sensor).

 

To show this here the images and colour analyses

 

pinholeat28nocode.jpg

pinhole

 

21asphat16nocode.jpg

21/28 asph at f/16

 

pinholeat28nocodeRED.png

pinhole

 

21asphat16nocodeRED.png

21/28 asph at f/16

 

 

pinholeat28nocodeGREEN.png

pinhole

 

21asphat16nocodeGREEN.png

21/28 asph at f/16

 

pinholeat28nocodeBLUE.png

pinhole

 

21asphat16nocodeBLUE.png

21/28 asph at f/16

 

Note: these are colour analyses of the by LightRoom loaded DNG files, not from the data in the raw part of the DNG file. So this is what you get normally without using lenscoding on the M9.

Edited by Lindolfi
Link to post
Share on other sites

Yes. As I have shown, there is a slight dependency on aperture. Italian Flag Phenomenon increases slightly with larger opening. But on the whole the pattern is the same. Vignetting has to do with an increase in obliqueness of the rays, but also with the apparent shape of the aperture as seen from the sides of the sensor: It becomes more narrow and deformed. (See the exellent book by Leslie Stroebel "View Camera Technique"). Italian Flag Phenomenon has only to do with the obliqueness of the rays. Vignetting occurs on film the same way as on a sensor; Italian Flag Phenomenon does not.

Link to post
Share on other sites

Presently, we have cleaned up some things in the discussion. The sum up about Italian Flag Phenomenon (IFP)

 

1] IFP has nothing to do with the optics other than the bundle of lightrays coming onto the sensor: Only the angle of a ray of light matters and where it lands on the sensor. This was shown with the pinhole experiments

 

2] Most of the variation of IFP observed by users has to do with the different optics used: they have different locations of the back principal plane and thus difference in lightray angle regime on the sensor.

 

3] Part of the IFP occurs in the conversion of the raw data in the DNG to the RGB values.Part of it occurs during capture by the sensor. This needs to be further explored by doing a hand-coded demosaic on the raw data of the DNG. (In fact you can explain the final IFP by performing a left-to-right "correction" on top of the top-to-bottom discolouration from the sensor: Where does that left-to-right "correction" happen in the loading process of the raw data from the DNG?)

 

4] There is most likely no shift of microlens layer relative to the colour well layer in the center of the sensor, so that the chromatic aberation of the microlens layer can not be responsible for the IFP. This needs to be further explored by better micro photography of the sensor.

Edited by Lindolfi
  • Like 1
Link to post
Share on other sites

Here is an interesting experiment: A 15 mm shifted pinhole, shifted to the left of the center of the camera (when standing behind the camera), which means a shift of 15 mm to the right in the image from the sensor

 

shiftedpinhole15mm.jpg

 

 

shiftedpinhole15mmRED.png

 

 

shiftedpinhole15mmGREEN.png

 

 

shiftedpinhole15mmBLUE.png

 

 

What you see is that the Italian Flag Phenomenon shifts with the pinhole. There is nothing special about the location on the sensor, only the angle of the lightrays and their direction (3 o'clock, 9 o'clock etc..) matter!

This may be a mayor lead to the correct explanation.

 

Here is the result of a shift in the other direction: 15 mm to the right

 

 

shiftedpinhole15mmR.jpg

 

 

shiftedpinhole15mmRRED.png

 

 

shiftedpinhole15mmRGREEN.png

 

 

shiftedpinhole15mmRBLUE.png

Edited by Lindolfi
  • Like 1
Link to post
Share on other sites

I was a bit surprised by the bad quality of the data in the graphs from the DNG files that I posted.

So I did the whole thing all over. First I found that the ISO value was too high, which caused the noise that was visible in the images.

Second the illumination was not as uniform a it could have been,

 

Therefore I show the results again, but now from an image taken at ISO 160 and with the best possible lighting situation.

 

The image itself is also displayed. The IFP now looks a bit less severe, although it is still there

 

 

 

Welcome, dear visitor! As registered member you'd see an image here…

Simply register for free here – We are always happy to welcome new members!

 

  • Like 1
Link to post
Share on other sites

The last experiment with the shifted pinhole, points in the direction of the following hypothesis:

 

The different colour wells are different in sensitivity to light coming from dfferent directions at the same angle of incidence.

 

For instance the green sensitive colour wells are less sensitive to light coming in obliquely form the top than from the bottom. This may have to do with the presence of electronics next to each light sensitive unit under the colour filter or a difference in the filters themselves, top or bottom edge in terms of reflectivity.

 

Look at the second image on this page http://www.siliconimaging.com/RGB%20Bayer.htm the colour wells do not look four sided symmetric.

 

This can only be an explanation if the different colour wells (for red green and blue) act differently in their directionality response to incoming light rays.

 

 

If this is correct, neither the cover glass, nor the micro lens layer is relevant for the Italian Flag Phenomenon.

 

It may well be that IFP it has become very clear in the M9 since it is specialized to work with wide angle lenses with a short distance of the back principle plane to the sensor. Many sensors may have the same property, but no one has tested them with very oblique rays. Time for some shifted pinhole experiments with other sensors?

Edited by Lindolfi
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...