Interpolation and blenders
Interpolation is a technique aiming at avoiding artifact formation when applying a geometrical transformation to an image. Note: no interpolation is needed when altering the Levels of an image. It becomes necessary when applying a 10° rotation to an image.
Looking at the example diagram, we can see what is implied when rotating an image. We see that for the resulting image (after rotation, right image) several pixels of the original image contribute to one pixel of the resulting image (i.e. one cell of the straight grid intersects with several pixels of the rotated image). The way to approach and process each pixel's contribution to the transformed image is called interpolation.
Quite a few interpolators are available. A very detailed study of the different types of interpolations can be found on the interpolators quality tests page of Helmut Derch's web-site, creator of panotools. http://www.path.unimelb.edu.au/~dersch/interpolator/interpolator.html.
When creating Autopano Pro we made the choice of integrating only the useful interpolators.
- Nearest neighbor: to be used for testing purposes only because of the large amount of artifacts it produces. As a tradeoff it’s the fastest of all.
- Bilinear: represents a decent quality/speed ratio.
- Bicubic: if you don’t know which one to pick this is the one you should be using. Any differences from Bilinear will be hardly visible to the naked eye, but can be seen on highly contrasted lines. It is the default recommended setting.
- Bicubic Sharper: same formula as Bicubic with some strength added (same as bicubic, only a touch stronger). This sampling mode is the same as the one found in the "Image Size" dialog, in the "Resample Image" drop-down of Adobe Photoshop.
- Bicubic smoother: same formula as Bicubic with less strength (same as bicubic only a touch lighter). This sampling mode is the same as the one found in the "Image Size" dialog, in the "Resample Image" drop-down of Adobe Photoshop.
- Spline36: the use of this powerful interpolator is to be reserved for cases where heavy post-processing will take place. To the naked eye, there is absolutely no visible difference with Bicubic.
- Spline64: more powerful, slower but generally even better than Spline36 (if you can “see” the difference!). Same as for the Spline36 interpolator: to be reserved for cases where heavy post-processing, including reprojection and successive image transformations will take place.
Run your mouse pointer over the buttons corresponding to the various interpolation modes to see a preview of the results obtained with the different modes. The example image is an extreme case, as it contains very sharp edges, allowing us to gain a better visual understanding. You will hardly ever run into that kind of sharp edges in a digital photograph coming out of your camera.
A blender is an algorithm aiming at blending two images (or more) together. The goal of the blender is to produce a resulting image where no transition can be seen between the original source images.
The following blenders are available in Autopano Pro:
- None: no blending is performed; the "top picture" is used. The stitching seams are obviously visible (geometry and/or brightness).
- Linear: : this mode is very fast and can be a good compromise between quality and speed if you are not too demanding on quality.
- Multiband: this slower mode will produce much better results than the "Linear" mode. The transitional areas between images will hardly visible. However this mode does not take into account objects that could have moved from one shot to another and some “ghosting” can occur.
- Smartblend: this blender combines a Multiband blender and picture analysis engine in order to identify common objects present in the source images (a moving object, a strong line,…). Based on the results of this analysis, Smartblend tries to keep the features common between images (edges, lines, curves,…) and automatically discard objects that have moved between shots. Even though much slower than the other algorithms, this blender produces a much higher rendering quality.
Be aware: this blender is not HDR compatible yet.
The following animations will allow you to visualize the various results produced by each blender, with and without color correction, on the same set of source images.
What we can deduce playing with the buttons, being often true but not always…, is :
- Smartblend, very often, is the best blender: it does a better job at harmonizing the colors, even when no color correction is applied. It prevents “ghosting”, and produces a sharper image than Multiband.
- In some cases Multiband is better (large uniform areas like the sky).
- Keep in mind that if you are working with a large panorama, Smartblend can take a considerable amount of time to blend the panorama, while Multiband will do the job much quicker.
This paragraph talks about the configuration parameters available since v1.4.2 of Autopano Pro in smartblend blender. You have to know that smartblend is using a pyramidal blender like in a multi-band approach, plus a seams detection algorithm that will find where to cut pictures.
How to access Smartblend parameters
This parameter indicates the number of stages the blender should use. It's not coded as a pyramid level but as a stop condition. When reaching this value (in pixels), it stops the building of the pyramid for the blending. So, if you have 4096, the blender will not do any level of the pyramid as the end condition is reach at first stage. The default value is 4 pixels. That's really short but allow to have large color equalization over large areas.
This value tells how sharp the transition has to be done between both pictures. It's not exactly like the first parameter as it doesn't work on pyramid number of levels but directly on images and how they are blended together at each pyramid stage. This value in fact allows a kind a linear blend on the transition zone.