Package gov.nih.mipav.model.algorithms
Class AlgorithmSimulatedExposureFusion
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.AlgorithmSimulatedExposureFusion
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleprivate doubleOriginal code from dispersionMap.m, multiscaleBlending.m, remapFun.m, robustNormalization.m, runsef.m, and sef.m located at https://github.com/chlsl/simulated-exposure-fusion-ipol was written by Charles Hessel and is being ported to Java with his permission.private doubleprivate doublefinal intfinal intfinal intfinal intfinal intfinal intprivate doubleprivate doubleprivate intprivate doubleprivate intprivate intprivate intprivate intprivate intFields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStoppedFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionAlgorithmSimulatedExposureFusion(ModelImage destImg, ModelImage srcImg, double alpha, double beta, int nScales, int M, double med, double lambda) -
Method Summary
Modifier and TypeMethodDescriptiondouble[][]copyMakeBorder(double[][] src, int top, int bottom, int left, int right, int borderType, double borderValue) private double[]dg(double[] t, int k) private double[]dh(double[] t, int k) private double[]dhs(double[] t, int k) private double[][]downsample(double[][] I, double[][] filter) private double[]f(double[] t, int k) private double[][]filter2Same(double[][] img, double[][] win) private double[]fs(double[] t, int k) private double[]g(double[] t, int k) (package private) Vector<double[][]> gaussian_pyramid(double[][] I, int nlev) private double[]h(double[] t, int k) private double[]hs(double[] t, int k) (package private) Vector<double[][]> laplacian_pyramid(double[][] I, int nlev) private double[][]multiscaleBlending(double[][][] seq, double[][][] W, int nScales) private double[][]private doubler(int k) private double[][]reconstruct_laplacian_pyramid(Vector<double[][]> pyr) voidActually runs the algorithm.private double[][]upsample(double[][] I, int[] odd, double[][] filter) Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, finalize, 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, windowOpenedMethods 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, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Field Details
-
alpha
private double alphaOriginal code from dispersionMap.m, multiscaleBlending.m, remapFun.m, robustNormalization.m, runsef.m, and sef.m located at https://github.com/chlsl/simulated-exposure-fusion-ipol was written by Charles Hessel and is being ported to Java with his permission. This method was first described in the following paper: HESSEL, Charles, MOREL, Jean-Michel, An Extended Exposure Fusion and its Application to Single Image Contrast Enhancement. In: 2020 IEEE Winter Conference on Applications of Computer Vision (WACV). IEEE, 2020. For robustNormalization.m refer to: Charles Hessel, An Implementation of the Exposure Fusion Algorithm, Image Processing On Line, 8 (2018), pp. 369–387. https://doi.org/10.5201/ipol.2018.230 The code provided by Charles Hessel makes use of downsample.m, gaussian_pyramid.m, laplacian_pyramid.m, pyramid_filter.m, reconstruct_laplacian_pyramid.m, and upsample.m, which is from code located at https://github.com/Mericam/exposure-fusion that is covered under the BSD-2-Clause license: Copyright (c) 2015, Tom Mertens, tom.mertens@gmail.com All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Implementation of Exposure Fusion in Matlab, as described in: "Exposure Fusion", Tom Mertens, Jan Kautz and Frank Van Reeth In proceedings of Pacific Graphics 2007 "Exposure Fusion: A Simple and Practical Alternative to High Dynamic Range Photography. " Tom Mertens, Jan Kautz and Frank Van Reeth In Computer Graphics Forum, 28 (1) 161 - 171, 2009 This code was originally written by Tom Mertens at Hasselt University, August 2007. Uploaded to GitHub in February 2015 Author and main contact: Tom Mertens, tom.mertens@gmail.com -
beta
private double beta -
nScales
private int nScales -
M
private int M -
med
private double med -
lambda
private double lambda -
Nx
private int Nx -
Mp
private int Mp -
Ns
private int Ns -
N
private int N -
a
private double a -
b
private double b -
epsilon
private double epsilon -
BORDER_CONSTANT
public final int BORDER_CONSTANT- See Also:
-
BORDER_REPLICATE
public final int BORDER_REPLICATE- See Also:
-
BORDER_REFLECT
public final int BORDER_REFLECT- See Also:
-
BORDER_WRAP
public final int BORDER_WRAP- See Also:
-
BORDER_REFLECT_101
public final int BORDER_REFLECT_101- See Also:
-
BORDER_DEFAULT
public final int BORDER_DEFAULT- See Also:
-
-
Constructor Details
-
AlgorithmSimulatedExposureFusion
public AlgorithmSimulatedExposureFusion() -
AlgorithmSimulatedExposureFusion
public AlgorithmSimulatedExposureFusion(ModelImage destImg, ModelImage srcImg, double alpha, double beta, int nScales, int M, double med, double lambda)
-
-
Method Details
-
runAlgorithm
public void runAlgorithm()Description copied from class:AlgorithmBaseActually runs the algorithm. Implemented by inheriting algorithms.- Specified by:
runAlgorithmin classAlgorithmBase
-
multiscaleBlending
private double[][] multiscaleBlending(double[][][] seq, double[][][] W, int nScales) -
reconstruct_laplacian_pyramid
-
laplacian_pyramid
-
upsample
private double[][] upsample(double[][] I, int[] odd, double[][] filter) -
gaussian_pyramid
-
downsample
private double[][] downsample(double[][] I, double[][] filter) -
copyMakeBorder
public double[][] copyMakeBorder(double[][] src, int top, int bottom, int left, int right, int borderType, double borderValue) -
filter2Same
private double[][] filter2Same(double[][] img, double[][] win) -
pyramid_filter
private double[][] pyramid_filter() -
f
private double[] f(double[] t, int k) -
fs
private double[] fs(double[] t, int k) -
r
private double r(int k) -
g
private double[] g(double[] t, int k) -
h
private double[] h(double[] t, int k) -
hs
private double[] hs(double[] t, int k) -
dg
private double[] dg(double[] t, int k) -
dh
private double[] dh(double[] t, int k) -
dhs
private double[] dhs(double[] t, int k)
-