Package gov.nih.mipav.model.algorithms
Class AlgorithmPhaseCongruency
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.AlgorithmPhaseCongruency
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmPhaseCongruency extends AlgorithmBase
Ported from Peter Kovesi's MATLAB code for Phase Congruency Available from: http://www.csse.uwa.edu.au/~pk/research/matlabfns/PhaseCongruency/phasecong3.m and: http://www.csse.uwa.edu.au/~pk/research/matlabfns/FrequencyFilt/lowpassfilter.m in reference to the method lowpassFilter(); % References: % % Peter Kovesi, "Image Features From Phase Congruency". Videre: A % Journal of Computer Vision Research. MIT Press. Volume 1, Number 3, % Summer 1999 http://mitpress.mit.edu/e-journals/Videre/001/v13.html % % Peter Kovesi, "Phase Congruency Detects Corners and % Edges". Proceedings DICTA 2003, Sydney Dec 10-12 % Copyright (c) 1996-2010 Peter Kovesi % Centre for Exploration Targeting % The University of Western Australia % peter.kovesi at uwa edu au % % Permission is hereby granted, free of charge, to any person obtaining a copy % of this software and associated documentation files (the "Software"), to deal % in the Software without restriction, subject to the following conditions: % % The above copyright notice and this permission notice shall be included in % all copies or substantial portions of the Software. % % The Software is provided "as is", without warranty of any kind.
-
-
Field Summary
Fields Modifier and Type Field Description private double
cutOff
private double
epsilon
private double[]
ft
private int
g
private int
height
private double
k
private int
length
private double[]
m
private double[]
M
private int
minWaveLength
private double
mult
private int
noiseMethod
private int
norient
private int
nscale
private double[]
or
private double
sigmaOnf
private double
T
private int
width
-
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStopped
-
-
Constructor Summary
Constructors Constructor Description AlgorithmPhaseCongruency(ModelImage src)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finalize()
Calls garbage collector to release system resources.private double
findMedian(double[] array)
double[]
getCorners()
double[]
getEdges()
double[]
getFeatureType()
double[]
getOrientations()
private double[]
ifftShift(double[] array)
private double[]
lowpassFilter(int n)
private double
rayleighmode(double[] array)
void
runAlgorithm()
Actually runs the algorithm.void
setArguments(int _nscale, int _norient, int _minWaveLength, double _mult, double _sigmaOnf, double _k, double _cutOff, int _g, int _noiseMethod)
% Arguments: % Default values Description % % nscale 4 - Number of wavelet scales, try values 3-6 % norient 6 - Number of filter orientations-
Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, generateProgressValues, getDestImage, getElapsedTime, getMask, getMaxProgressValue, getMinProgressValue, getNumberOfThreads, getProgress, getProgressChangeListener, getProgressChangeListeners, getProgressModulus, getProgressStep, getProgressValues, getSrcImage, isCompleted, isImage25D, isMultiThreadingEnabled, isRunningInSeparateThread, isThreadStopped, linkProgressToAlgorithm, linkProgressToAlgorithm, makeProgress, notifyListeners, removeListener, removeProgressChangeListener, run, setCompleted, setImage25D, setMask, setMaxProgressValue, setMinProgressValue, setMultiThreadingEnabled, setNumberOfThreads, setProgress, setProgressModulus, setProgressStep, setProgressValues, setProgressValues, setRunningInSeparateThread, setSrcImage, setStartTime, setThreadStopped, startMethod, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
nscale
private int nscale
-
norient
private int norient
-
minWaveLength
private int minWaveLength
-
mult
private double mult
-
sigmaOnf
private double sigmaOnf
-
k
private double k
-
cutOff
private double cutOff
-
g
private int g
-
noiseMethod
private int noiseMethod
-
epsilon
private double epsilon
-
width
private int width
-
height
private int height
-
length
private int length
-
M
private double[] M
-
m
private double[] m
-
or
private double[] or
-
ft
private double[] ft
-
T
private double T
-
-
Constructor Detail
-
AlgorithmPhaseCongruency
public AlgorithmPhaseCongruency(ModelImage src)
-
-
Method Detail
-
finalize
public void finalize()
Description copied from class:AlgorithmBase
Calls garbage collector to release system resources.- Overrides:
finalize
in classAlgorithmBase
-
setArguments
public void setArguments(int _nscale, int _norient, int _minWaveLength, double _mult, double _sigmaOnf, double _k, double _cutOff, int _g, int _noiseMethod)
% Arguments: % Default values Description % % nscale 4 - Number of wavelet scales, try values 3-6 % norient 6 - Number of filter orientations. % minWaveLength 3 - Wavelength of smallest scale filter. % mult 2.1 - Scaling factor between successive filters. % sigmaOnf 0.55 - Ratio of the standard deviation of the Gaussian % describing the log Gabor filter's transfer function % in the frequency domain to the filter center frequency. % k 2.0 - No of standard deviations of the noise energy beyond % the mean at which we set the noise threshold point. % You may want to vary this up to a value of 10 or % 20 for noisy images % cutOff 0.5 - The fractional measure of frequency spread % below which phase congruency values get penalized. % g 10 - Controls the sharpness of the transition in % the sigmoid function used to weight phase % congruency for frequency spread. % noiseMethod -1 - Parameter specifies method used to determine % noise statistics. % -1 use median of smallest scale filter responses % -2 use mode of smallest scale filter responses % 0+ use noiseMethod value as the fixed noise threshold
-
runAlgorithm
public void runAlgorithm()
Description copied from class:AlgorithmBase
Actually runs the algorithm. Implemented by inheriting algorithms.- Specified by:
runAlgorithm
in classAlgorithmBase
-
getEdges
public double[] getEdges()
-
getCorners
public double[] getCorners()
-
getOrientations
public double[] getOrientations()
-
getFeatureType
public double[] getFeatureType()
-
lowpassFilter
private double[] lowpassFilter(int n)
-
findMedian
private double findMedian(double[] array)
-
rayleighmode
private double rayleighmode(double[] array)
-
ifftShift
private double[] ifftShift(double[] array)
-
-