Jump to: navigation, search

Difference between revisions of "Using Anti-Ghost"

(Choosing images)
m (Manually Adjusting Anti-Ghost)
 
(19 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<div style="float:right">__TOC__</div>
+
__TOC__
 
+
 
+
 
== The concept ==
 
== The concept ==
  
Line 58: Line 56:
  
  
=== Mask edition tool (Giga only) ===
+
=== Mask edition tool ===
 +
 
 +
[[Image:Icon attention.png|16px|Warning]] [[Image:Logo-Autopano-Giga-2010-32px.png|20px|Autopano Giga]] '''Autopano Giga only'''
  
 
Now we will keep all pictures and act with markers of mask tools to guide anti-ghost choices.
 
Now we will keep all pictures and act with markers of mask tools to guide anti-ghost choices.
Line 64: Line 64:
 
Mask tool is often confused with a painter tool, but it's not. Is more powerful on simple case but can be less intuitive in hard cases (see next session).
 
Mask tool is often confused with a painter tool, but it's not. Is more powerful on simple case but can be less intuitive in hard cases (see next session).
  
=== Color Correction influence ===
 
  
When there is not as much overlap as in the previous example, it is not possible to delete an image in its entirety to guide Anti-Ghost: <br/>
+
Just add few green markers on the biker you want to keep.  
In the picture below, a moving flag is situated in an area of overlap.  Unlike the previous example, it is not possible to delete an image without drastically altering the overall panorama.
+
  
 
{|
 
{|
 
|-
 
|-
| [[Image:tutorial2-flag.gif|left|thumb|800px]]
+
| [[Image:smartcut-marker-green.png|left|thumb|900px]]
 
|}
 
|}
  
Here is the rendering obtained when color correction is not applied:  <br/>
+
If you don't mind which biker to keep but you know that you don't want a particular one use red marker.
  
Anti-Ghost chose to keep the flag from the image of the zenith (image 7), whereas we would prefer to keep the one from the central image (image 1). <br/>
+
{|
In addition, this cutting selection does not compensate for the fit error around the flagpole.
+
|-
 +
| [[Image:smartcut-marker-red.png|left|thumb|900px]]
 +
|}
 +
 
 +
This tool is powerful because it does not require a lot work to select or erase an object.
  
 
{|
 
{|
 
|-
 
|-
| [[Image:tutorial2-flag.jpg|left|thumb|800px]]
+
| [[Image:smartcut-marker-result.png|left|thumb|900px]]
 
|}
 
|}
  
This time, if we apply color correction, Anti-Ghost’s choices are different and yield the visual result we expected:
+
As said before this tools is really efficient on ''simple'' case. For smart cutting algorithm, a simple case is when objects can be entirely kept or remove without contradiction (on object is already cut on full input picture, two kept objects are overlapped...).
 +
<br/><br/>
 +
==== More difficult cases ====
 +
 
 +
When we want to keep overlapped a painted tool can be more intuitive but it's not impossible to use the mask tool of Autopano.
 +
 
 +
To illustrate difficult cases, we just take two picture of previous project. We want to keep the yellow biker of the first picture and the black one of the second picture.
 +
 +
{|
 +
|
 +
| [[Image:smartcut-hard-marker1.png|left|thumb|500px]]
 +
| [[Image:smartcut-hard-marker2.png|left|thumb|500px]]
 +
|}
 +
 
 +
We obtain this result.
  
 
{|
 
{|
 
|-
 
|-
| [[Image:tutorial2-flag-color.jpg|left|thumb|800px]]
+
| [[Image:smartcut-hard-result.png|left|thumb|500px]]
 
|}
 
|}
  
It’s partly by chance that color correction makes it possible to keep the right flag.  But what’s interesting here is to understand how color correction influenced Anti-Ghost’s choice: <br/>
+
We can remark that black biker of the first picture is not entirely removed. It just because this solution does not exist, we don't have alternative choice for the wheel.
In order to select the best cutting path, the algorithm is based on analysis of the differences between the images. When there are differences in exposure and/or white balance between two images, Anti-Ghost is forced to find the cutting path in the places where the images are alike. <br/>
+
  
In the first example, without color correction, the hue of the sky in the zenith (image 7) is quite different from the hue in the central image (image 1). Therefore it’s less of a problem to make a cutting error involving a few pixels around the flagpole than to keep compounding differences by trying to blend the sky. <br/>
+
The simple solution for keeping the two bikers does not exits because they are overlapped. In this case, it's important to guide the smart cutting and indicate where we want to do the cut. This done by the close green markers : the first one on the short of the yellow biker and the second one on the wheel of black biker. To guide for keeping close object of different pictures allow to guide where the cut must be done.
  
In the second example, color correction makes it possible to harmonize the hues in the sky, meaning it’s less of a problem to cut in the sky.  Anti-Ghost chooses to cut the sky rather than cutting around the flagpole, where the adjustment error is now more difficult.
 
  
 +
==== Mistakes to avoid ====
 +
Classic mistake is to consider markers as «pinholes» on a layer mask. Anti-ghost is a smart and complex algorithm that detects paths in the image, only few markers properly placed are required. If results are not what you expected, try to move the markers to a more relevant place.
  
 +
[[Image:Anti-Ghost through transparency painting bad markers.jpg|frame|none|'''Bad markers positions''']]
 +
[[Image:Anti-Ghost through transparency painting good markers.jpg|frame|none|'''Good markers positions''']]
 +
<br/>
 
=== Adding an alpha layer ===
 
=== Adding an alpha layer ===
  
Using the same example, let’s imagine that even with color correction, Anti-ghost still doesn’t keep the “right” flag. <br/>
+
For very difficult case or users who prefer use a painter-like tool, it's possible to use external painter tool for guiding smart cutting:
The idea is to get rid of the data superimposed on the object we want to keep. Thus, Anti-Ghost will have no other option than to keep it and find the best cutting path around this object.
+
[[Anti-Ghost through transparency painting]]
 +
<br/><br/>
 +
=== Color Correction influence ===
  
 +
When there is not as much overlap as in the previous example, it is not possible to delete an image in its entirety to guide Anti-Ghost: <br/>
 +
In the picture below, a moving flag is situated in an area of overlap.  Unlike the previous example, it is not possible to delete an image without drastically altering the overall panorama.
  
Here, the zenith (Image 7) has been modified.  An alpha layer has been painted over the area that is expected to overlap the flag in the central image (Image 1) and converted to a format that supports transparency (tif or png, for instance). <br/>
+
{|
Note:  Be careful, because some image editors lose EXIF information, you will need to set it manually in '''Image Properties''' (in this example, fisheye information may be lost).
+
|-
 +
| [[Image:tutorial2-flag.gif|left|thumb|800px]]
 +
|}
 +
 
 +
Here is the rendering obtained when color correction is not applied:  <br/>
 +
 
 +
Anti-Ghost chose to keep the flag from the image of the zenith (image 7), whereas we would prefer to keep the one from the central image (image 1). <br/>
 +
In addition, this cutting selection does not compensate for the fit error around the flagpole.
  
 
{|
 
{|
 
|-
 
|-
| [[Image:tutorial2-flag-alpha.png|left|thumb|400px]]
+
| [[Image:tutorial2-flag.jpg|left|thumb|800px]]
 
|}
 
|}
  
Here is the stitching when the original zenith is replaced by the one with the alpha painted in.
+
This time, if we apply color correction, Anti-Ghost’s choices are different and yield the visual result we expected:
  
 
{|
 
{|
 
|-
 
|-
| [[Image:tutorial2-flag-corrected.jpg|left|thumb|800px]]
+
| [[Image:tutorial2-flag-color.jpg|left|thumb|800px]]
 
|}
 
|}
  
It is not always easy to spot overlap zones in the initial images (not distorted by the assembly). We plan to add a tool to be directly integrated into Autopano that will guide Anti-Ghost’s selections.
+
It’s partly by chance that color correction makes it possible to keep the right flag.  But what’s interesting here is to understand how color correction influenced Anti-Ghost’s choice: <br/>
 +
In order to select the best cutting path, the algorithm is based on analysis of the differences between the images. When there are differences in exposure and/or white balance between two images, Anti-Ghost is forced to find the cutting path in the places where the images are alike. <br/>
 +
 
 +
In the first example, without color correction, the hue of the sky in the zenith (image 7) is quite different from the hue in the central image (image 1). Therefore it’s less of a problem to make a cutting error involving a few pixels around the flagpole than to keep compounding differences by trying to blend the sky. <br/>
 +
 
 +
In the second example, color correction makes it possible to harmonize the hues in the sky, meaning it’s less of a problem to cut in the sky.  Anti-Ghost chooses to cut the sky rather than cutting around the flagpole, where the adjustment error is now more difficult.
 +
<br/><br/>
  
 
== Using Gigapixel ==
 
== Using Gigapixel ==
Line 164: Line 200:
  
  
[[Technical Support]] / [[Autopano Pro Documentation]] / [[Autopano Giga Documentation]]
+
[[Documentation]] / [[Autopano Documentation]]
  
 
[[fr:Utiliser l'Anti-fantôme]]
 
[[fr:Utiliser l'Anti-fantôme]]
  
 
[[Category:Autopano Case studies]]
 
[[Category:Autopano Case studies]]

Latest revision as of 08:34, 10 August 2016

The concept

Anti-Ghost is the smart image-cutting algorithm (first appeared in Autopano 2.5).


During the blend of stitched images, the layered pixels are not necessarily identical.
This can be caused by stitching problems (when nodal point is not respected, when lens distortion is hard to correct...) and/or from objects in the picture moving between shots.

The Anti-Ghost is designed to find a cutting path between images in order to avoid blending pixels that don’t match.
The “smart” part is choosing a cut that preserves the integrity of the photographed subjects as much as possible.


Introduction

This new algorithm replaces the cutting step performed by Smartblend before Autopano 2.5 was released.
The results are not always perfect (or don’t always look quite as we expected), we will show a few possibilities that can help guide cutting decisions.
The giga-advantage of the new algorithm is that it can handle Gigapixel images, which Smartblend can’t do. The last part will illustrate this using the image Paris 26 gigapixels.


Manually Adjusting Anti-Ghost

For illustrating anti-ghost adjustments, we will work with following project which represent a biker in action with a lot of de-ghosting possibilities.

Smartcut-project.gif

Following picture is the default rendering computed by Autopano. We can't really said why a biker is kept and not another one but proposed result do not have ghosting issue.

Smartcut-default.png

Even if the result is satisfying, we will show how to guide Autopano in his choices.

Choosing images

When there are sufficient areas of overlap, it is often useful to delete certain images in order to facilitate Anti-Ghost’s selections.

Tutorial2-trial-250-corrected.gif


With fewer constraints to reconcile, the panorama now appears as expected.

Tutorial2-trial-corrected.jpg


Mask edition tool

Warning Autopano Giga Autopano Giga only

Now we will keep all pictures and act with markers of mask tools to guide anti-ghost choices.

Mask tool is often confused with a painter tool, but it's not. Is more powerful on simple case but can be less intuitive in hard cases (see next session).


Just add few green markers on the biker you want to keep.

Smartcut-marker-green.png

If you don't mind which biker to keep but you know that you don't want a particular one use red marker.

Smartcut-marker-red.png

This tool is powerful because it does not require a lot work to select or erase an object.

Smartcut-marker-result.png

As said before this tools is really efficient on simple case. For smart cutting algorithm, a simple case is when objects can be entirely kept or remove without contradiction (on object is already cut on full input picture, two kept objects are overlapped...).

More difficult cases

When we want to keep overlapped a painted tool can be more intuitive but it's not impossible to use the mask tool of Autopano.

To illustrate difficult cases, we just take two picture of previous project. We want to keep the yellow biker of the first picture and the black one of the second picture.

Smartcut-hard-marker1.png
Smartcut-hard-marker2.png

We obtain this result.

Smartcut-hard-result.png

We can remark that black biker of the first picture is not entirely removed. It just because this solution does not exist, we don't have alternative choice for the wheel.

The simple solution for keeping the two bikers does not exits because they are overlapped. In this case, it's important to guide the smart cutting and indicate where we want to do the cut. This done by the close green markers : the first one on the short of the yellow biker and the second one on the wheel of black biker. To guide for keeping close object of different pictures allow to guide where the cut must be done.


Mistakes to avoid

Classic mistake is to consider markers as «pinholes» on a layer mask. Anti-ghost is a smart and complex algorithm that detects paths in the image, only few markers properly placed are required. If results are not what you expected, try to move the markers to a more relevant place.

Bad markers positions
Good markers positions


Adding an alpha layer

For very difficult case or users who prefer use a painter-like tool, it's possible to use external painter tool for guiding smart cutting: Anti-Ghost through transparency painting

Color Correction influence

When there is not as much overlap as in the previous example, it is not possible to delete an image in its entirety to guide Anti-Ghost:
In the picture below, a moving flag is situated in an area of overlap. Unlike the previous example, it is not possible to delete an image without drastically altering the overall panorama.

Tutorial2-flag.gif

Here is the rendering obtained when color correction is not applied:

Anti-Ghost chose to keep the flag from the image of the zenith (image 7), whereas we would prefer to keep the one from the central image (image 1).
In addition, this cutting selection does not compensate for the fit error around the flagpole.

Tutorial2-flag.jpg

This time, if we apply color correction, Anti-Ghost’s choices are different and yield the visual result we expected:

Tutorial2-flag-color.jpg

It’s partly by chance that color correction makes it possible to keep the right flag. But what’s interesting here is to understand how color correction influenced Anti-Ghost’s choice:
In order to select the best cutting path, the algorithm is based on analysis of the differences between the images. When there are differences in exposure and/or white balance between two images, Anti-Ghost is forced to find the cutting path in the places where the images are alike.

In the first example, without color correction, the hue of the sky in the zenith (image 7) is quite different from the hue in the central image (image 1). Therefore it’s less of a problem to make a cutting error involving a few pixels around the flagpole than to keep compounding differences by trying to blend the sky.

In the second example, color correction makes it possible to harmonize the hues in the sky, meaning it’s less of a problem to cut in the sky. Anti-Ghost chooses to cut the sky rather than cutting around the flagpole, where the adjustment error is now more difficult.

Using Gigapixel

As stated in the introduction, the new Anti-Ghost can be applied to Gigapixel images. We rendered the image Paris 26 Gigapixels, originally created with Autopano 2.0, using Autopano 2.5.
This image will soon be available on a new site. Meanwhile, here are some screenshots of the new rendering.
You can try finding these screenshots in the original image if you would like to compare the results: Paris 26 Gigapixels


The first two captures illustrate Anti-Ghost’s effectiveness. Vehicles and people were retained in their entirety. Blurry zones appearing in the rendering created with Autopano 2.0 are gone.

Tutorial2-paris-cars.png
Tutorial2-paris-workers.png


This last screenshot shows that some errors still remain. This is generally because some problems still can’t be solved:

The front end of an object appears in a non-overlapping zone (which must be retained) but the other end doesn’t appear in the adjacent image because in a Gigapixel image, the time gap between shots of adjacent images can be very long.

Tutorial2-paris-ghost.png








Documentation / Autopano Documentation