shinestacker

Alignment and registration

Automatically align, scale, tanslate and rotate or apply full perspective correction.

All constants described below are contained in the object constants, imported as:

from shinestacker.config.constants import constants

Alignment actions can be added to a job as follows:

job.add_action(Actions("align", [AlignFrames(*options)])

Arguments for the constructor AlignFrames of are:

matching_config (optional, default; None): a dictionary specifying the following parameters, with the corresponding default values:

matching_config= {
    'match_method': constants.MATCHING_KNN,
    'flann_idx_kdtree': 2,
    'flann_trees': 5,
    'flann_checks': 50,
    'threshold': 0.75
}

Parallel processing

A class AlignFramesParallel implements alignment using parallel processing. This class has extra parameters, in addition to the above ones:

Automatic selection of processing strategy

A class AlignFramesAuto implements alignment with either sequential or parallel processing, and automatically tunes parallel processing parameters. This class has extra parameters, in addition to the above ones:

Allowed configurations

⚠️ Not all combinations of detector, descriptor and match methods are allowed. Combinations that are not allowed give raise to an exception. This is automatically prevented if one works with the GUI, but may occur when using python scripting. Below the table of the allowed combination with a comparison of CPU performances.

CPU performances

⏳ Below the time performances for alignment of two of the sample images with 2000×1300 resolution for allowed configuration combinations, from fastest to slowest. Note that slower may be more precise.

Time (s) Detector Descriptor Match method
0.0250 SURF ORB NORM_HAMMING
0.0347 SURF BRISK NORM_HAMMING
0.0469 ORB ORB NORM_HAMMING
0.0471 ORB BRISK NORM_HAMMING
0.1001 BRISK BRISK NORM_HAMMING
0.1199 BRISK ORB NORM_HAMMING
0.1604 SURF SIFT KNN
0.1966 BRISK SIFT KNN
0.2121 ORB SIFT KNN
0.2738 AKAZE AKAZE NORM_HAMMING
0.2863 AKAZE ORB NORM_HAMMING
0.2887 AKAZE BRISK NORM_HAMMING
0.4075 AKAZE SIFT KNN
0.4397 SIFT SIFT KNN

References

For a detailed review of the various image registration methods, see the publication below: