Filtering tie points computed with MicMac

Tapioca is a tool available in the free, open source photogrammetry software MicMac, which computes tie points for a set of images.
Sometimes, it can be interesting to reduce the density of the tie points, while preserving their homogeneity in the images. This is the purpose of this program.

For each pair of images, the program divides the 1st image into nb_sect_x * nb_sect_y sectors, then randomly selects max_pts tie points at most in each sector.
Optionally, a mask can be applied to remove tie points from selected areas. (With the --max_pts parameter high enough, the program can be used for masking only.)

Download (GPL-3.0 license - v1.3 - June 2021)

Usage

filtertieptstapioca1.3.py [-h] [--homol_dir DIR_NAME]
[--use_masks SUFFIX] [-v]
images nb_sect_x max_pts

Positional arguments

images regular expression for image selection (ex: "^DSC0976[0-9]\.JPG$")
nb_sect_x nb of sectors in x direction. The sectors will be square.
max_pts max nb of points to keep, per sector. The selection is random.

Optional arguments

-h, --help show this help message and exit
--homol_dir DIR_NAME name of the tie point directory from Tapioca (default: 'Homol'). Tie points must be in txt format.
--use_masks SUFFIX if provided, mask files (TIFF binary image) will be used to remove tie points from selected areas. For example, the suffix 'Masq' will tell the program to use the mask file DSC09751_Masq.tif for the image DSC09751.JPG, if it exists.
-v, --verbose verbose mode

Changelog

v1.3
  • catches an error when using BigTiff images
v1.2
  • no more crash when no tie point file is found
v1.1