This tutorial describes the image matching parameters Apply masks to Key/Tie points and describes the cases, where Tie point masking may be reasonable.


  • If Apply masks to Key points selected - masked areas are excluded from feature detection procedure independently for each photo. This behavior is equal to old Constrain features by the mask parameter. 

  • If Apply masks to Tie points selected - certain tie points are excluded from the alignment procedure. Effectively this implies that if some area is masked at least on a single photo, relevant key points on the rest of the photos picturing the same area will be also ignored during the alignment procedure (a tie point is a set of key points that have been matched as projections of the same 3D point on different images). This can be useful to suppress background in turntable-like shooting scenarios with few or even with a single mask. Two examples of difficult fo alignment turntable-like datasets will be discussed below. 


Banana on the table

One of the ways to photography a small object is to put a camera on a tripod, place the object on a table in front of the camera and take a photo, then rotate the object so that the camera sees the object from a different angle and take a photo and so on. You can also take a photo of the background (brown desk and white box) without an object (banana) - this will be helpful while processing the whole data. 


Note:

  • in this dataset, for the best result, we would recommend reshooting the object so that it occupies most of the frame.


Banana dataset (44 photos, 158 Mb) looks like this:



Please note that except for the static background this dataset also has another suboptimality: the photos were taken from significantly long distance and with small zoom, as a result, the banana was scanned with less number of pixels as it can be scanned with proper distance and/or zoom. 


  • Apply masks to None 

If you run Workflow > Align Photos... without masks (or with Apply masks to None, which effectively is the same option), you will find cameras incorrectly aligned with respect to the brown desk and white box from the background. All photo positions are recognized as being the same, since the camera, in fact, was at the same place on the tripod: 



  • Apply masks to Tie points

If you just fully mask background only photo (which doesn't observe object) using Rectangle Selection and afterward align photos with parameter Apply masks to Tie points, all cameras (except the photo of the background) will be aligned: 


Note:

  • photo of the background (without object) is not mandatory. You can mask the background on one of the photos observing the object and all cameras will be also aligned. Just don't forget to use the Apply masks to Tie points feature and try to mask the background on the photo that observes as much of the background as possible. Sometimes you will need to mask more than one photo because in some cases there is no single photo observing the whole background surface at once. 


Oenochoe on the bedsheet

Another example is the oenochoe dataset (80 photos). 

Note:

  • this dataset doesn't contain the photo of the background without the object, because the photos were taken from different positions and with different view angles, and as a result, the photos observe different parts of the background;
  • except for static background this dataset has another suboptimality - lighting conditions could have been better. In an ideal case, you need uniform diffuse light.


  • Apply masks to None 

If you just run Workflow > Align Photos..., you will see cameras aligned relative to the white background bedsheet: 

To avoid this, you need to mask the background surface. It is enough to mask the background with Intelligent Scissors on only two photos - a photo with the bedsheet's upper part and the photo with the bedsheet's bottom part. 

Note:

  • a single mask is not enough, because there is no single camera observing full bedsheet at once:

  • Apply masks to Tie points 

With just two masks and parameter Apply masks to Tie points all 80 photos were successfully aligned: