mpicbg.ij.blockmatching
Class BlockMatching

java.lang.Object
  extended by mpicbg.ij.blockmatching.BlockMatching

public class BlockMatching
extends Object

Methods for establishing block-based correspondences for given sets of source Points.

Version:
0.1b
Author:
Stephan Saalfeld

Method Summary
protected static float blockMean(FloatProcessor fp, int tx, int ty, int blockWidth, int blockHeight)
          Estimate the mean intensity of a block.
protected static float blockVariance(FloatProcessor fp, int tx, int ty, int blockWidth, int blockHeight, float mean)
          Estimate the intensity variance of a block.
static void findMatches(FloatProcessor source, FloatProcessor target, FloatProcessor sourceMask, FloatProcessor targetMask, Model<?> initialModel, Class<? extends AbstractAffineModel2D<?>> localModelClass, float maxEpsilon, float maxScale, float minR, float rodR, float maxCurvatureR, int meshResolution, float alpha, Collection<PointMatch> sourceMatches)
           
static Shape illustrateMatches(Collection<PointMatch> matches)
          Create a Shape that illustrates a Collection of PointMatches.
static void matchByMaximalPMCC(FloatProcessor source, FloatProcessor target, FloatProcessor sourceMask, FloatProcessor targetMask, double scale, CoordinateTransform transform, int blockRadiusX, int blockRadiusY, int searchRadiusX, int searchRadiusY, float minR, float rod, float maxCurvature, Collection<? extends Point> sourcePoints, Collection<PointMatch> sourceMatches, ErrorStatistic observer)
          Estimate point correspondences for a Collection of Points among two images that are approximately related by an InvertibleCoordinateTransform using the Pearson product-moment correlation coefficient (PMCC) r of pixel intensities as similarity measure.
static void matchByMaximalPMCC(FloatProcessor source, FloatProcessor target, FloatProcessor sourceMask, FloatProcessor targetMask, float scale, CoordinateTransform transform, int blockRadiusX, int blockRadiusY, int searchRadiusX, int searchRadiusY, Collection<? extends Point> sourcePoints, Collection<PointMatch> sourceMatches, ErrorStatistic observer)
          Estimate point correspondences for a Collection of Points among two images that are approximately related by an InvertibleCoordinateTransform using the Pearson product-moment correlation coefficient (PMCC) r of pixel intensities as similarity measure.
protected static void matchByMaximalPMCC(FloatProcessor source, FloatProcessor target, int blockRadiusX, int blockRadiusY, int searchRadiusX, int searchRadiusY, float minR, float rod, float maxCurvature, Collection<PointMatch> query, Collection<PointMatch> results)
           
static void matchByMinimalSquareDifference(FloatProcessor source, FloatProcessor target, InvertibleCoordinateTransform transform, int blockRadiusX, int blockRadiusY, int searchRadiusX, int searchRadiusY, Collection<? extends Point> sourcePoints, Collection<PointMatch> sourceMatches)
          Estimate point correspondences for a Collection of Points among two images that are approximately related by an InvertibleCoordinateTransform using the square difference of pixel intensities as a similarity measure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

blockMean

protected static float blockMean(FloatProcessor fp,
                                 int tx,
                                 int ty,
                                 int blockWidth,
                                 int blockHeight)
Estimate the mean intensity of a block.
Note:
Make sure that the block is fully contained in the image, this will not be checked by the method for efficiency reasons.

Parameters:
fp -
tx -
ty -
blockWidth -
blockHeight -
Returns:

blockVariance

protected static float blockVariance(FloatProcessor fp,
                                     int tx,
                                     int ty,
                                     int blockWidth,
                                     int blockHeight,
                                     float mean)
Estimate the intensity variance of a block.
Note:
Make sure that the block is fully contained in the image, this will not be checked by the method for efficiency reasons.

Parameters:
fp -
tx -
ty -
blockWidth -
blockHeight -
Returns:

matchByMinimalSquareDifference

public static void matchByMinimalSquareDifference(FloatProcessor source,
                                                  FloatProcessor target,
                                                  InvertibleCoordinateTransform transform,
                                                  int blockRadiusX,
                                                  int blockRadiusY,
                                                  int searchRadiusX,
                                                  int searchRadiusY,
                                                  Collection<? extends Point> sourcePoints,
                                                  Collection<PointMatch> sourceMatches)
Estimate point correspondences for a Collection of Points among two images that are approximately related by an InvertibleCoordinateTransform using the square difference of pixel intensities as a similarity measure.

Parameters:
source -
target -
transform - transfers source into target approximately
blockRadiusX - horizontal radius of a block
blockRadiusY - vertical radius of a block
searchRadiusX - horizontal search radius
searchRadiusY - vertical search radius
sourcePoints -
sourceMatches -

matchByMaximalPMCC

protected static void matchByMaximalPMCC(FloatProcessor source,
                                         FloatProcessor target,
                                         int blockRadiusX,
                                         int blockRadiusY,
                                         int searchRadiusX,
                                         int searchRadiusY,
                                         float minR,
                                         float rod,
                                         float maxCurvature,
                                         Collection<PointMatch> query,
                                         Collection<PointMatch> results)
                                  throws InterruptedException,
                                         ExecutionException
Throws:
InterruptedException
ExecutionException

matchByMaximalPMCC

public static void matchByMaximalPMCC(FloatProcessor source,
                                      FloatProcessor target,
                                      FloatProcessor sourceMask,
                                      FloatProcessor targetMask,
                                      double scale,
                                      CoordinateTransform transform,
                                      int blockRadiusX,
                                      int blockRadiusY,
                                      int searchRadiusX,
                                      int searchRadiusY,
                                      float minR,
                                      float rod,
                                      float maxCurvature,
                                      Collection<? extends Point> sourcePoints,
                                      Collection<PointMatch> sourceMatches,
                                      ErrorStatistic observer)
                               throws InterruptedException,
                                      ExecutionException
Estimate point correspondences for a Collection of Points among two images that are approximately related by an InvertibleCoordinateTransform using the Pearson product-moment correlation coefficient (PMCC) r of pixel intensities as similarity measure. Only correspondence candidates with r >= a given threshold are accepted.

Parameters:
source -
target -
sourceMask -
targetMask -
scale - [0,1]
transform - transfers source into target approximately
blockRadiusX - horizontal radius of a block
blockRadiusY - vertical radius of a block
searchRadiusX - horizontal search radius
searchRadiusY - vertical search radius
minR - minimal accepted Cross-Correlation coefficient
rod -
sourcePoints -
sourceMatches -
observer -
Throws:
InterruptedException
ExecutionException

matchByMaximalPMCC

public static void matchByMaximalPMCC(FloatProcessor source,
                                      FloatProcessor target,
                                      FloatProcessor sourceMask,
                                      FloatProcessor targetMask,
                                      float scale,
                                      CoordinateTransform transform,
                                      int blockRadiusX,
                                      int blockRadiusY,
                                      int searchRadiusX,
                                      int searchRadiusY,
                                      Collection<? extends Point> sourcePoints,
                                      Collection<PointMatch> sourceMatches,
                                      ErrorStatistic observer)
                               throws InterruptedException,
                                      ExecutionException
Estimate point correspondences for a Collection of Points among two images that are approximately related by an InvertibleCoordinateTransform using the Pearson product-moment correlation coefficient (PMCC) r of pixel intensities as similarity measure. Only correspondence candidates with r >= a given threshold are accepted.

Parameters:
scaledSource -
target -
scale - [0,1]
transform - transfers source into target approximately
scaledBlockRadiusX - horizontal radius of a block
scaledBlockRadiusY - vertical radius of a block
scaledSearchRadiusX - horizontal search radius
scaledSearchRadiusY - vertical search radius
minR - minimal accepted Cross-Correlation coefficient
sourcePoints -
sourceMatches -
Throws:
InterruptedException
ExecutionException

findMatches

public static void findMatches(FloatProcessor source,
                               FloatProcessor target,
                               FloatProcessor sourceMask,
                               FloatProcessor targetMask,
                               Model<?> initialModel,
                               Class<? extends AbstractAffineModel2D<?>> localModelClass,
                               float maxEpsilon,
                               float maxScale,
                               float minR,
                               float rodR,
                               float maxCurvatureR,
                               int meshResolution,
                               float alpha,
                               Collection<PointMatch> sourceMatches)
                        throws InterruptedException,
                               ExecutionException
Throws:
InterruptedException
ExecutionException

illustrateMatches

public static Shape illustrateMatches(Collection<PointMatch> matches)
Create a Shape that illustrates a Collection of PointMatches.

Returns:
the illustration


Copyright © 2007-2016 Fiji. All Rights Reserved.