fredmiranda.com
Login

Moderated by: Fred Miranda
  New fredmiranda.com Mobile Site
  New Feature: SMS Notification alert
  New Feature: Buy & Sell Watchlist
  

FM Forums | Canon Forum | Join Upload & Sell

  

Archive 2016 · 5D4 DPRAW secondary subframe oddities and "white unbalance"

  
 
cgarcia
Offline
• •
Upload & Sell: Off
p.1 #1 · 5D4 DPRAW secondary subframe oddities and "white unbalance"


Using Imaging's Resource ISO 100 DPRAW sample, which has a lot of uniform grey areas, I have done a detailed analysis of the RAW data in the extra secondary B subframe. Despite the general similarity, there are differences with the sample from kamerabild.se, so I deduce that lighting causes a lot of variation in the B subframe rendition. This poses a huge challenge to anybody trying to normalize the B subframe in order to use some portions or its full area.

Let's summarize what the rare creature the secondary B subframe stored in the DPRAW files is:

  1. Its exposure is not even across the image width ("horizontal vignetting"). The IR sample is around 0.46 EV less exposed at the right. In case the B subframe were used to recover highlights, the right side of the image has an ability beyond that of the left (in this sample about 1.25 EV versus 0.75 EV) and the resulting photo would have different dynamic range left-right wise.
  2. It also has some color cast both at the left and right compared to the main AB frame (the exposure shift compared to AB is not the same in all channels!).
  3. Even worse, this color cast is again variable across the image width ("horizontal white balance shifting"). If we measure the difference between both sides of the B subframe, in the IR sample it spans across several hundred kelvin degree (only the vertical area in the centre of the B subframe matches the AB main frame color balance and the true scene color).
  4. In the IR sample, from top to bottom there is also some slight exposure variation pattern compared to AB, with different shapes at the image left and right, but this time not color-biased.
  5. The A subframe (not directly provided by Canon) has exactly the same features, but in the opposite horizontal direction; so that when combined with B, both cancel out the above described behaviour and the main AB frame becomes totally normal. Magic!

This is the full picture to analyze:

https://lightful.github.io/talk/photo/sensor/IR_DPRAW_thumb.jpg

It has a lot of even gray areas which we'll look at, placed at both sides and at the bottom. The illumination is very uniform (only a subtle 0.05 EV darker at the left). Sometimes there are objects in the image which will cause sharp spikes in the graphs, but overall don't disturb our analysis. Only RAW data is used for the graphs, separately subtracting the black point of each channel (computed from the masked area, which was in the picture but obviously is excluded from the graphs).

We'll start selecting a box of 1x50 pixels height and moving it across the right image column, from top to bottom, calculating its moving average to cancel out the noise variation and the materials texture. That is, each pixel row shown in the graph is in truth the average lighting of that pixel and the 49 bellow it (there are only about 2200 rows in the 5D4 image, because each bayer channel has half the vertical pixels). This is gray (about 3 stops bellow the clipping point) but the color channels don't match because the white balance is not applied in the RAW data. The graph tells that the bottom of the image (right of the graph) is darker:

https://lightful.github.io/talk/photo/sensor/IR_DPRAW_right_vert_overview.png

Well, that graph was only to place us in context. The interesting stuff begins now:

https://lightful.github.io/talk/photo/sensor/IR_DPRAW_right_vert_wb.png

The ratio of the signals in each color channel is constant in the right pixel column of the B subframe. The same applies to any other column. So the white balance doesn't changes vertically. But that doesn't means that it is the same color balance of the main AB frame:

https://lightful.github.io/talk/photo/sensor/IR_DPRAW_right_vert_scaling.png

As the graph above shows, each color channel requires a slightly different scaling factor to place its exposure level to that of the main AB frame. The B subframe color balance does not match the main AB frame. Even the two green channels behave in a different way. The exposure is shift by -1.21 EV in the red channel but about -1.29 EV in one of the green channels. This is the right side of the photo but... how it looks like the left?

https://lightful.github.io/talk/photo/sensor/IR_DPRAW_left_vert_scaling.png

Again, the subimage B color channels require different scalings to be put in par with the main AB frame. But this time, it is the red color the channel requiring most of the adjust (-0.75 EV while the others are only -0.71 EV appart): the red color temperature shifting at the left side jumps to the opposite end compared with the right side.

From the last two graphs we infer that when moving from the right to the left, the exposure in the B subframe changes +0.46 EV in the red channel, but about +0.58 EV in the other channels. Still it is 0.7-0.77 EV darker compared to the main AB frame. The shape of these two last graphs is "complementary" in the right and left sides... a kind of a "W" and a "M" in the vertical direction which can't be a coincidence (surely it is not caused by the photo subject texture, but by how each dual pixel sees the lighting). In fact, the A subframe (not plot here) has at the left the same "W" shape B has at the right (as it should in order to "cancel" B when both are summed).

We already know the story at the left and right, and this is it in the points in between:

https://lightful.github.io/talk/photo/sensor/IR_DPRAW_bottom_horiz_scaling.png

The B subframe scaling factors in the graph above get equal at the center of the image, where there is no color shift compared to the main AB frame (obviously the one with the correct colors). The scaling is also around 2.0 (-1 EV) at the center, which is the overall brightness difference between both images. The color balance is not constant across the B subframe width.

https://lightful.github.io/talk/photo/sensor/IR_DPRAW_bottom_horiz_ratio.png

The graph above shows the ratio between each channel scaling numbers (simply by dividing G1 in the precedent graph by G2, R and B). There is some clear and interesting trend. I suspect that each different photo could have different slopes, caused by the dual pixel response under the actual lighting.

https://lightful.github.io/talk/photo/sensor/IR_DPRAW_bottom_horiz_wb.png

The last graph shows how the color temperature changes from the left to the right in the red component, relative to green (please ignore the spikes caused from the image detail). The main AB frame changes its multiplier from 1.91 to 1.93, which means that the real scene is approximately 100 degree Kelvin cooler at the right. Meanwhile, the B subframe changes its multiplier from 1.97 to 1.87, about 600 kelvin degree, passing from 300 degrees cooler to 300 degrees warmer compared with the real picture.

As a conclusion, the B subframe neither can be used directly as a replacement of the main frame to save a burned photo (at the cost of increased noise and different optical properties) for high quality work. And the existing software can't correct its oddities.

However, using the B subframe for replacing small overexposed areas in the main picture could be doable at present under emergency: the "parallax" effect is minor in many cases, and for portions narrow enough for the horizontal vignetting and color balance shifting being negligible, it could be done manually through selection and replacement of image areas. Prior to merge, AB exposure can be reduced to approximately match B; and maybe, if the difference is noticeable when the crop comes close to either sides of the image, B white balance could be previously touched a bit. Unfortunately, the 5D4 doesn't allows to select RAW writing to a card and DPRAW to the other, so the new format can't be used to store potentially recoverable versions only when strictly needed.

This study has been done with dcraw and my open source tool by running a few commands to generate some spreadsheets and then plotting some graphs in LibreOffice.



Oct 02, 2016 at 03:13 PM





FM Forums | Canon Forum | Join Upload & Sell

    
 

Welcome back
Log in to your account