Advanced color correction

From Autopano

Jump to: navigation, search

Contents

temp storage area

OLD Tutorial - Layered PSD edition

So, we will start this tutorial with a rendering of your last panorama in PSD file format with layers output activated. This will render every individual pictures each on an individual layer, on the top of the blended panorama.

In photoshop, you will get something like that :

Image:tutorial-layered-psd-edition-1.png

You can see on Layer 0, the full blended panorama. On layer 1 to 3, you can see each individual pictures rendered alone (but with color correction, filter, level still applied on them).

Alpha in layers

Now, alpha. What's that ? Each individual layer have embedded alphas in the layer. It tells the layer where original pixels where located.

Let's make a right click on the layer and use "Select Layer Transparency".

Image:tutorial-layered-psd-edition-2.png

You can see that the selection border is around the picture. It's accurately the transformed edge of original picture.

Why working this way ? Let's see it advantages when editing the panorama.

Edition

Let's see edition with a Panotools type of layer output. The limit of each individual picture in a mask associated with the picture. Pixels outside picture are black. So when editing the mask (by using black or white brush painting for example) can give such results : Some black pixels are revealed because you painted outside the original mask.

Image:tutorial-layered-psd-edition-3.png

The Autopano Pro style. Just add a white or black mask revealing either the picture or nothing. Then paint in the mask. Even if you paint beyong the limit of the picture, something appears, because outside the limit, pixels are transparent, not black. So you cannot see them. It far easier to paint ghost this way.

Image:tutorial-layered-psd-edition-4.png

My advice : for a quick and perfect edition.

  • **1. Know what you need to edit** : disable every layer just leaving the full blended output activated. Then pass through every layer to look which one is really needed and which one can be removed. Clean what you can.
  • **2. Masking** : For the layer you something from, add a black layer. Use the brush tool to paint white on the mask. It will reveal what is the layer. I am personnaly using a wacom tablet with this dynamic brush configuration : Shape Dynamic, size jitter => control off | Other Dynamic, opacity jitter => pen pressure). It allows a fine control over the mask painting.


Advanced color correction

So, let's dig into this feature of Autopano Pro and explains what is really behind both mode "Standard color correction" and "Advanced color correction".

I will use an user provided sample to illustrate this article.

Blending

Before to start the discussion, we'll need to explain a little what is the blending. This pass of the algorithm is just at the end of the process.

| | **No blend** | **Linear blend** | | **No color correction** | This is me typing trying to understand more about HDR........A little confusing so far. Haven't seen any final pictures yet, have only read about how wonderfull it's supposed to be. I'm trying to find out! | Template:Tutorials:tutorial-advanced-color-linear-blend.png | | **Color corrected** | Template:Tutorials:tutorial-advanced-color-no-blend-color.png | Template:Tutorials:tutorial-advanced-color-linear-blend-color.png |

The blending is the way you choose the final value of a pixel in a location where many pictures are overlapping. The easiest algorithm is just to choose the value of one picture and nothing from others pictures. This is the "no blend" mode. You can see that only one picture is displayed on overlapping zone. Another way to calculate the final pixel value on an overlapping zone is to use something like a mean of every pixels values, it will give a good average between every pictures values. That's the "linear blend" mode. It's just a bit more complicated than a mean but I will not disclose the full algorithm to achieve a good linear blend. There are more advanced blending sheme, like the multiband blend algorithm. This one decompose the picture using high and low filter, blend them appart and recompose every layers. Theorical background is the same as for enblend plugin for panotools even if our implementation is far different.

So let's keep the blending process apart and start to use color correction on the panorama.

Standard color mode

So, color mode is disactivated and the panorama look like that with linear blend Template:Tutorials:tutorial-advanced-color-step-0.jpg

The panorama look like that with no blend at all : Template:Tutorials:tutorial-advanced-color-step-1.jpg

Let's use the standard color correction which should be used only where small difference of exposure are occuring (it's not the case here, but we'll use it anyway). I used this setting of anchors : Template:Tutorials:tutorial-advanced-color-step-2.jpg

Please note, that after activation of standard color correction, some zone in the picture are really overburned. Why ? We'll see it with the histogram.

Histogram

Let's have a look the histogram. BTW : the histogram is working like photoshop level in two pass : first pass applied on each individual channel (red, green, blue) and a common final pass for every color. This isn't well known and is in fact the cause of many misunderstanding of the level tool. It's not a single operation on pixel, it's a double operation on pixel.

So what we need to know is value of input pixels : there are only available through individual channel. Let's choose one, the red for example. Now, the magic : Template:Tutorials:tutorial-advanced-color-step-3.png

The two sliders indicates the previous extend of pictures before color correction. It correspond to the display of the panorama (first slider, give 0 in 8bits rgb (pure black), second slider gives 255 in 8bits, pure white).

Now, as we have activated the color correction and solved the equation of luminosity, we achieved to get a better than 8bits dynamic extend. The histogram goes behond 255 maximum value. We achieved to get a higher dynamic range.

Let play with the "Auto color" button to tell the histogram to use the maximum extend of dynamic range. It will place automatically every channel min and max slider to value near edge of the histogram. "Auto color" doesn't apply on RGB but on individual channel (same behaviour as in photoshop). Template:Tutorials:tutorial-advanced-color-step-4.png

Final Picture analysis

Let's see now the result on the panorama with no blend. We didn't get anymore any overburned zone as now, we are using in the levels, the full new dynamic range of the picture : Template:Tutorials:tutorial-advanced-color-step-5.jpg

If we turn on again the linear blend, we can see this : Template:Tutorials:tutorial-advanced-color-step-6.jpg

You can see in the ellipse zone that the blend is not really good along edges where a big difference of exposure is occuring. That's why HDRI mode is so usefull.

HDR color correction

Let's do the same with HDR color correction. I went to the level and use the reset button to clear my settings and engage the HDR color correction.

You can notice than when you enter the HDR mode, levels aren't available any more. Of course, this tool cannot cope with really high dynamic range pictures. Instead of this tool, there's a slider which tells where the window of [0..255] for display is located over the full dynamic range of the HDR color corrected panorama.

Template:Tutorials:tutorial-advanced-color-hdr-cursor.swf?508x508

If we look at each pictures individually, they have a 8bits extend in RGB value, but in the real world, the extend depends on the way each photo were shoot (aperture, films, speed, etc). Finally, it gives an extend on real values. Each picture is contributing to the panorama dynamic range, like illustrated below : Template:Tutorials:tutorial-advanced-color-contributions.png

Last thing that is needed to get the panorama right is to use a tone mapper. Theses kind of filter transforms a HDR picture into a low dynamic range picture. After such a filter, you'll have again access to the level tools.

Template:Tutorials:tutorial-advanced-color-step-7.jpg

Details analysis

You can have a close look at the zone which gave problems in standard color correction mode : Template:Tutorials:tutorial-advanced-color-analysis0.png

Even if it really better than in standard mode, we can still see a square where it's not really good. Why ? Here's the explaination. We don't have any well exposed source for this zone. Just have a look a the arrangement of picture for this zone. To be able to get a good final panorama, you should have at least every pixel well exposed once (source pixel for the square are comming from two over exposed pictures) :

Template:Tutorials:tutorial-advanced-color-analysis.gif

Personal tools