PTAPicker

Control Point Detection Software

Current Version: 1.00, May 2013 (version history)

Introduction. PTAPicker is a Windows command line program that detects control points (common features in overlapping images) from a set of input images. It is part of (and distributed with PTAssembler). PTAPicker offers the user a choice of several different detection algorithms, none of which are encumbered with legal patents. This page gives an overview of PTAPicker, its program options and presents a comparison with some other control point detector programs.

screenshot of PTAssembler
PTAssembler showing 2 images with control points detected by PTAPicker.

Overview of Control Point Detection Algorithm. PTAPicker takes a set of images as input, and produces a file with a list of control points that can be opened by PTAssembler (and possibly other programs) as its output. In order to understand some of PTAPicker's options, a basic understanding of how PTAPicker's control point detection algorithm works is useful. In brief, the algorithm works follows:

Input -> Feature detection -> Description -> Matching -> Filtering/Checking -> Thinning -> Output

The main steps of the algorithm are described below:

  1. Feature Detection. In this stage, PTAPicker scans each image, and looks for "features". A feature could be any point in the image, but in this context refers to a point that is distinctive in some fashion. For example, a point that is much brighter than adjacent points (such as a star in the sky, or a point of light in a dark scene), might be a good feature. PTAPicker offers the ability to choose from several different types of feature detectors, and these detectors all identify different regions as features. The number of features that are detected depend on the size of the image, the subject matter, the type of detector used and its configuration. In some cases, several thousand features may be detected; in others only a handful (or none) may be detected.
  2. Feature Description. Having detected a number of features in each image, PTAPicker "describes" the features. Like the detection stage, this can also be done in a number of different ways, and PTAPicker offers several different "descriptors" to perform this task. All of the descriptors "describe" a feature using a sequence of numbers. Ideally, each description should be sufficiently unique as to allow for easy differentiation between descriptions. Ideally, descriptors would be similar to telephone numbers in that no two people can share the same number. In practice, descriptors are not so unique, and different features are sometimes described in very similar ways. Conversely, the same feature that appears in two different images may be described quite differently depending on how each image is scaled, rotated, illuminated, distorted, etc.
  3. Feature Matching. Once all of the features in all images have been described, this stage attempts to find matching features in pairs of images. PTAPicker compares each image against every other image in the input set to look for matches, i.e. features that are characterized by the same (or very similar) descriptors. If two images overlap, then one would expect to find some features in the two images that are described the same way (or very close to the same way). When these matching features are found they are recorded as matches or "candidate control points".
  4. Filtering and Checking. The next stage of the algorithm is to validate the candidate control points, and reject any candidate control points that are likely to be incorrect. In practice, feature description and matching is a less-than-perfect science, and sometimes two different features may be described sufficiently similarly that they end up being "matched" to each other and identified as a candidate control point. Because a computer does not see images that same way as a human, the computer may identify matches that are obviously incorrect to a human (e.g. matching a feature on a car in one image to a feature on a building in another image). The filtering and checking stage applies a number of different tests to try and determine if any of the candidate control points are incorrect and should be eliminated. One important test that PTAPicker applies is called RANSAC. It attempts to determine which candidate control points are incorrect by looking for control points that appear to be positioned in regions of the image that are distant from control points that appear to be positioned correctly.
  5. Thinning. The last stage is only used if the number of control points that are produced after the previous stage exceeds the number requested by the user. If so, some control points are discarded. PTAPicker discards control points that are close to each other, trying to keep control points that are spread across different areas of the image.

PTAPicker Usage and Options. PTAPicker can be used by PTAssembler or invoked directly from the command line. Program usage and options are summarized here. More information about each option is presented later in the document.

 Usage:

  PTAPicker [options] [input files]

 Options:

  -c       Use color descriptors
  -d NAME  Specify detector name (see below)
  -D NAME  Specify descriptor name (see below)
  -f n     Maximum number of features to retain after detection (e.g. 2048)
  -g n     Number of regions each axis is subdivided before matching (e.g. 1)
  -i n     Number of times to downsize image before processing (e.g. 2)
  -j n     Downsize until longer dimension is less than n pixels (e.g. 1200)
  -k n     Maximum number of control points to create per image pair (e.g. 30)
  -m NAME  Specify matcher name (see below)
  -n n     Number of threads to execute in parallel (e.g. 2)
  -o FILE  Specify output filename
  -p FILE  Specify input PTAssembler project filename
  -q n     Number of matches to use for RANSAC
  -r RECT  Rectangular area specifying sub-region of image (see below)
  -t n     Maximum allowable pixel error during RANSAC (e.g. 3.0)
  --a n    Maximum control point angular change in degrees (e.g. 20)
  --c n    Maximum homography angular change in degrees (e.g. 20)
  --l n    Maximum homography line length ratio (e.g. 1.2)
  --p n    Maximum homography perspective (e.g. 0.01)
  --r n    Maximum homography rectangle area ratio (e.g. 6.0)
  --t n    Feature Detection Threshold (e.g 20)
  --x n    RANSAC threshold expansion factor (e.g. 3.0)

 Notes:

  * Input files can be images (e.g. JPEG, TIFF) or (using the -p option) a
    PTAssembler project file that contains a list of images.

  * Options -i or -j cannot be specified together.  If so, -i is ignored.

  * The -r RECT option can be used to specify a region-of-interest (ROI)
    within an image to process.  If specified, only the ROI is searched
    for control points.  A RECT is specified as follows (see below for
    usage example):

      x:y:width:height:imageNumber

    where:

      x = The x coordinate of the top-left corner of the ROI
      y = The y coordinate of the top-left corner of the ROI
      width = The width of the ROI
      height = The height of the ROI
      imageNumber = The image number for the ROI (images are numbered
        in the order in which they are present on the command line or
        project file, starting at number zero).

    If the imageNumber parameter is missing, the ROI is applied to all
    images specified on the command line or in the project.


 Usage Examples:

   PTAPicker -o out.txt image_a.jpg image_b.jpg
   PTAPicker -o out.txt -p ptasmblr.ptp
   PTAPicker -d ORB -D BRISK -o out.txt -n 4 -k 50 -p ptasmblr.ptp
   PTAPicker -o out.txt -r 900:0:300:200:0 -r 0:0:300:200:1 img0.tif img1.tif


 Detector Names:

   BRISK: Binary Robust Invariant Scalable Keypoints
   Dense: Dense Feature Detector
   FAST: Features from Accelerated Segment Test
   GFTT: Good Features To Track Detector
   HARRIS: Good Features To Track Detector with Harris detector enabled
   MSER: Maximally Stable Extremal Regions
   ORB: Oriented FAST and Rotated BRIEF
   STAR: StarFeatureDetector
   SimpleBlob: Simple Blob Detector

 Descriptor Names:

   BRIEF: Binary Robust Independent Elementary Features
   BRISK: Binary Robust Invariant Scalable Keypoints
   FREAK: Fast Retina Keypoint
   ORB: Oriented FAST and Rotated BRIEF

 Matcher Names:

   BruteForce: (L2 Norm)
   BruteForce-L1: (L1 Norm)
   BruteForce-Hamming: Hamming distance
   BruteForce-Hamming(2): Hamming distance (used with ORB when WTA_K==3)
   FlannBased: Fast Library for Approximate Nearest Neighbors

Helpful Hints and Information. PTAPicker's central task is accurately identifying valid control points while simultaneously rejecting incorrectly identified invalid control points. And, if possible, do it quickly! Almost all of PTAPicker's options are targeted towards adjusting the tradeoff between the acceptance of valid control points, the rejection of invalid control points, and the time spent doing so. PTAPicker's default choices should work well for most "real-world" images, but the information in this section should allow you to make adjustments if the results are not satisfactory.