lenscorrection
Class Distortion_Correction

java.lang.Object
  extended by lenscorrection.Distortion_Correction
All Implemented Interfaces:
ij.plugin.PlugIn

public class Distortion_Correction
extends java.lang.Object
implements ij.plugin.PlugIn


Nested Class Summary
static class Distortion_Correction.BasicParam
           
static class Distortion_Correction.PluginParam
           
static class Distortion_Correction.PointMatchCollectionAndAffine
           
 
Field Summary
static Distortion_Correction.BasicParam p
           
static Distortion_Correction.PluginParam sp
           
 
Constructor Summary
Distortion_Correction()
           
 
Method Summary
protected  java.lang.String correctImages()
           
static NonLinearTransform createInverseDistortionModel(java.util.Collection<Distortion_Correction.PointMatchCollectionAndAffine> pointMatches, int dimension, double lambda, int imageWidth, int imageHeight)
          Estimates a polynomial distortion model for a set of corresponding points and returns the inverse of this model which then may be used to undo the distortion.
protected static NonLinearTransform distortionCorrection(double[][] hack1, double[][] hack2, double[][] transformParams, int dimension, double lambda, int w, int h)
           
 void evaluateCorrection(java.util.List<java.util.List<mpicbg.models.PointMatch>> inliers)
           
protected  double[] evaluateCorrectionXcorr(int index, java.lang.String directory)
           
protected  void extractSIFTPoints(int index, java.util.List<mpicbg.imagefeatures.Feature>[] siftFeatures, java.util.List<java.util.List<mpicbg.models.PointMatch>> inliers, java.util.List<mpicbg.models.AbstractAffineModel2D<?>> models)
           
protected static void extractSIFTPointsThreaded(int index, java.util.List<mpicbg.imagefeatures.Feature>[] siftFeatures, java.util.List<mpicbg.models.PointMatch>[] inliers, mpicbg.models.AbstractAffineModel2D<?>[] models)
           
 void getTransform(double[][] points1, double[][] points2, double[][] transformParams)
           
 void run(java.lang.String arg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

p

public static final Distortion_Correction.BasicParam p

sp

public static final Distortion_Correction.PluginParam sp
Constructor Detail

Distortion_Correction

public Distortion_Correction()
Method Detail

run

public void run(java.lang.String arg)
Specified by:
run in interface ij.plugin.PlugIn

evaluateCorrection

public void evaluateCorrection(java.util.List<java.util.List<mpicbg.models.PointMatch>> inliers)

extractSIFTPoints

protected void extractSIFTPoints(int index,
                                 java.util.List<mpicbg.imagefeatures.Feature>[] siftFeatures,
                                 java.util.List<java.util.List<mpicbg.models.PointMatch>> inliers,
                                 java.util.List<mpicbg.models.AbstractAffineModel2D<?>> models)

createInverseDistortionModel

public static NonLinearTransform createInverseDistortionModel(java.util.Collection<Distortion_Correction.PointMatchCollectionAndAffine> pointMatches,
                                                              int dimension,
                                                              double lambda,
                                                              int imageWidth,
                                                              int imageHeight)
Estimates a polynomial distortion model for a set of corresponding points and returns the inverse of this model which then may be used to undo the distortion.

Parameters:
matches -
affines - a list of affines in the same order as matches that transfer a match collection into a common image frame
dimension - the order of the polynomial model
lambda - regularization factor
imageWidth -
imageHeight -
Returns:
a polynomial distortion model to undo the distortion

distortionCorrection

protected static NonLinearTransform distortionCorrection(double[][] hack1,
                                                         double[][] hack2,
                                                         double[][] transformParams,
                                                         int dimension,
                                                         double lambda,
                                                         int w,
                                                         int h)

correctImages

protected java.lang.String correctImages()

evaluateCorrectionXcorr

protected double[] evaluateCorrectionXcorr(int index,
                                           java.lang.String directory)

getTransform

public void getTransform(double[][] points1,
                         double[][] points2,
                         double[][] transformParams)

extractSIFTPointsThreaded

protected static void extractSIFTPointsThreaded(int index,
                                                java.util.List<mpicbg.imagefeatures.Feature>[] siftFeatures,
                                                java.util.List<mpicbg.models.PointMatch>[] inliers,
                                                mpicbg.models.AbstractAffineModel2D<?>[] models)