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:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmSimulatedExposureFusion extends AlgorithmBase
-
-
Field Summary
Fields Modifier and Type Field Description private double
a
private double
alpha
Original 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 double
b
private double
beta
int
BORDER_CONSTANT
int
BORDER_DEFAULT
int
BORDER_REFLECT
int
BORDER_REFLECT_101
int
BORDER_REPLICATE
int
BORDER_WRAP
private double
epsilon
private double
lambda
private int
M
private double
med
private int
Mp
private int
N
private int
Ns
private int
nScales
private int
Nx
-
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 AlgorithmSimulatedExposureFusion()
AlgorithmSimulatedExposureFusion(ModelImage destImg, ModelImage srcImg, double alpha, double beta, int nScales, int M, double med, double lambda)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[][]
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) java.util.Vector<double[][]>
gaussian_pyramid(double[][] I, int nlev)
private double[]
h(double[] t, int k)
private double[]
hs(double[] t, int k)
(package private) java.util.Vector<double[][]>
laplacian_pyramid(double[][] I, int nlev)
private double[][]
multiscaleBlending(double[][][] seq, double[][][] W, int nScales)
private double[][]
pyramid_filter()
private double
r(int k)
private double[][]
reconstruct_laplacian_pyramid(java.util.Vector<double[][]> pyr)
void
runAlgorithm()
Actually 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, 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
-
alpha
private double alpha
Original 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:
- Constant Field Values
-
BORDER_REPLICATE
public final int BORDER_REPLICATE
- See Also:
- Constant Field Values
-
BORDER_REFLECT
public final int BORDER_REFLECT
- See Also:
- Constant Field Values
-
BORDER_WRAP
public final int BORDER_WRAP
- See Also:
- Constant Field Values
-
BORDER_REFLECT_101
public final int BORDER_REFLECT_101
- See Also:
- Constant Field Values
-
BORDER_DEFAULT
public final int BORDER_DEFAULT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AlgorithmSimulatedExposureFusion
public AlgorithmSimulatedExposureFusion()
-
AlgorithmSimulatedExposureFusion
public AlgorithmSimulatedExposureFusion(ModelImage destImg, ModelImage srcImg, double alpha, double beta, int nScales, int M, double med, double lambda)
-
-
Method Detail
-
runAlgorithm
public void runAlgorithm()
Description copied from class:AlgorithmBase
Actually runs the algorithm. Implemented by inheriting algorithms.- Specified by:
runAlgorithm
in classAlgorithmBase
-
multiscaleBlending
private double[][] multiscaleBlending(double[][][] seq, double[][][] W, int nScales)
-
reconstruct_laplacian_pyramid
private double[][] reconstruct_laplacian_pyramid(java.util.Vector<double[][]> pyr)
-
laplacian_pyramid
java.util.Vector<double[][]> laplacian_pyramid(double[][] I, int nlev)
-
upsample
private double[][] upsample(double[][] I, int[] odd, double[][] filter)
-
gaussian_pyramid
java.util.Vector<double[][]> gaussian_pyramid(double[][] I, int nlev)
-
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)
-
-