Package gov.nih.mipav.model.algorithms
Class libdt
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.libdt
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class libdt extends AlgorithmBase
libdt - OpenCV library for Dynamic Textures - version 1.0 Copyright (c) 2011-2014 Antoni B. Chan, Adeel Mumtaz, City University of Hong Kong All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. 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. 3. Neither name of copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 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 REGENTS 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. Modeling, clustering, and segmenting video with mixtures of dynamic textures. Antoni B. Chan and Nuno Vasconcelos, IEEE Trans. on Pattern Analysis and Machine Intelligence (TPAMI), 30(5):909-926, May 2008. Clustering Dynamic Textures with the Hierarchical EM Algorithm for Modeling Video. Adeel Mumtaz, Emanuele Coviello, Gert R.G. Lanckriet, and Antoni B. Chan, IEEE Trans. on Pattern Analysis and Machine Intelligence (TPAMI), 35(7):1606-1621, Jul 2013. [appendix] A Scalable and Accurate Descriptor for Dynamic Textures using Bag of System Trees. Adeel Mumtaz, Emanuele Coviello, Gert R.G. Lanckriet, and Antoni B. Chan, IEEE Trans. on Pattern Analysis and Machine Intelligence (TPAMI), 37(4):697-712, Apr 2015. [appendix]
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
libdt.ConfigFile
static class
libdt.cov_reg_type
regularization method.static class
libdt.cov_type
type of covariance matrix.class
libdt.CovMatrix
(package private) class
libdt.DatDescriptor
Structure to represent Dat file Descriptor parametersclass
libdt.Dytex
Dynamic Texture class.(package private) class
libdt.DytexKalmanFilter
class for running the Kalman filter for dynamic texture inference.class
libdt.DytexMix
class
libdt.DytexOptions
class
libdt.DytexRegOptions
Class for specifying the regularization methods for a Dytex.class
libdt.DytexSplitParams
(package private) class
libdt.EMOptions
(package private) class
libdt.Estats
(package private) static class
libdt.fill_type
class
libdt.HEMOptions
private class
libdt.indexValueComparator
private class
libdt.indexValueItem
static class
libdt.kf_mode
class
libdt.Mat
(package private) static class
libdt.norm_type
Normalization mode for each patch.(package private) class
libdt.PatchBatchExtractor
Class for extracting spatio-temporal patches (cubes) from a video (batch mode).(package private) class
libdt.PatchExtractor
Class for extracting spatio-temporal patches (cubes) from a video (online mode).(package private) class
libdt.PatchOptions
Class for specifying spatio-temporal patches (cubes).(package private) class
libdt.Range
static class
libdt.Split_crit
static class
libdt.Split_mode
static class
libdt.Split_vars
static class
libdt.Verbose_mode
(package private) class
libdt.VidSegm
(package private) class
libdt.VidSeqSegmParams
static class
libdt.Ymean_type
Options for modeling the observation mean, Ymean.
-
Field Summary
Fields Modifier and Type Field Description private byte[]
byteDoubleBuffer
byte array for double *private byte[]
byteIntBuffer
byte array for int *private byte[]
byteLongBuffer
byte array for long *private int
CV_64F
private int
CV_64FC
private int
CV_64FC1
private int
CV_64FC3
private int
CV_8U
private int
CV_8UC
private int
CV_8UC1
private int
CV_REDUCE_AVG
private int
CV_REDUCE_MAX
private int
CV_REDUCE_MIN
private int
CV_REDUCE_SUM
private boolean
debug
private boolean
endian
private libdt.Mat[][]
g_mask_lut
private double[][]
g_rgbtable
private int
MAXCOL
private java.io.RandomAccessFile
raFile
-
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 libdt()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) boolean
addFrames(libdt.PatchExtractor pe, libdt.Mat[] invid)
(package private) void
annotateVideos()
(package private) void
calculate(libdt.CovMatrix cov, libdt.Mat data, boolean use_unbiased)
(package private) int
checkOptionInStr(java.lang.String str, java.lang.String opt)
libdt.Mat
clone(libdt.Mat A)
libdt.Mat
col(libdt.Mat A, int colNum)
(package private) void
colorMask(libdt.Mat[] img, libdt.Mat[] mask, libdt.Mat oimg, int border)
private void
computeAggregateStats(libdt.Estats Estat, libdt.Mat W)
private void
computeEll(libdt.Estats Estat)
(package private) void
computePrecisionRecall()
(package private) double
computeVariance3dDouble(libdt.Mat[] input)
(package private) libdt.Mat
convertmovie(libdt.Mat[] Y, int[] sx, int[] sy, int[] sc, int[] cnorm)
private void
copyFromSrcColRange(libdt.Mat A, libdt.Mat B, int inclusiveStart, int exclusiveEnd)
private void
copyTo(libdt.Mat[] A, libdt.Mat[] B)
private void
copyTo(libdt.Mat A, libdt.Mat B)
private void
copyToDstColRange(libdt.Mat A, libdt.Mat B, int inclusiveStart, int exclusiveEnd)
int
countNonZero(libdt.Mat A)
private libdt.Mat[]
create(int frames, int rows, int cols, int type)
libdt.Mat
divide(libdt.Mat A, double q)
libdt.Mat
divide(libdt.Mat A, libdt.Mat B)
(package private) void
dumpMatSize(libdt.Mat[] m)
void
dytex_kalman(libdt.Mat[] Y2, libdt.Dytex dt, java.lang.String opt, java.util.Vector<libdt.Mat> xt, libdt.Mat[] Vt, libdt.Mat[] Vt1, libdt.Mat L)
private void
dytex_mix_split(libdt.DytexMix dtm, libdt.DytexSplitParams splitopt, int[] ctg, int[] csp)
private void
dytex_perturb(libdt.Dytex dtp, double pert, libdt.Split_mode mode, libdt.Split_vars vars)
libdt.Mat
elementTimes(libdt.Mat A, libdt.Mat B)
(package private) java.util.Vector<libdt.Mat>
extractY(libdt.Mat[] Yin, java.util.Vector<java.lang.Integer> inds)
private libdt.Mat
frame(libdt.Mat vid, int f)
void
getClasses(libdt.DytexMix dtm, java.util.Vector<libdt.Mat> Y, libdt.Mat LLm)
void
getClasses(libdt.DytexMix dtm, java.util.Vector<libdt.Mat> Y, java.util.Vector<java.lang.Integer> classes)
libdt.cov_reg_type
getCov_reg_type(int cov_reg_code)
libdt.cov_type
getCov_type(int cov_code)
double
getDouble(boolean bigEndian)
Reads eight unsigned bytes from file.int
getInt(boolean bigEndian)
Reads four signed bytes from file.libdt.norm_type
getNorm_type(int norm_code)
(package private) java.util.Vector<libdt.Mat[]>
getPatches(libdt.PatchExtractor pe)
(package private) java.util.Vector<java.lang.Integer>
getTagVids(java.util.Vector<java.lang.Integer> trainVidIds, java.lang.String tag, java.util.Vector<java.util.Vector<java.lang.String>> annlist)
private java.lang.String
getTime()
libdt.Ymean_type
getYmean_type(int Ymean_code)
private libdt.Dytex
init_multiple_dt(libdt.DytexMix dtm)
(package private) libdt.Dytex
initcluster_doretto(java.util.Vector<libdt.Mat> Y, libdt.DytexOptions param)
private boolean
inp_minbnd(double[][] arr, double min_bnd)
private boolean
inp_minbnd(double[] arr, double min_bnd)
(package private) libdt.CovMatrix
inv(libdt.CovMatrix cov)
(package private) void
learnBaseDTM()
(package private) void
learnBaseDTMBoS()
(package private) void
learnDTM(libdt.VidSegm tvs, java.lang.String vpath, boolean dosegm)
(package private) void
learnLeastSquares(libdt.Dytex mydt, java.util.Vector<libdt.Mat> videos)
(package private) void
learnTagDTM()
(package private) void
learnWithSplitting(libdt.DytexMix dtm, java.util.Vector<libdt.Mat[]> Yin, libdt.EMOptions emopt)
(package private) libdt.Mat[]
loaddat(java.lang.String filename, java.lang.String opt)
(package private) libdt.DatDescriptor
loaddatinfo(java.lang.String filename, int verbose)
(package private) double
logdetiid(libdt.Mat Q, double r, int C)
(package private) libdt.Mat
logtrick(libdt.Mat lA)
(package private) libdt.Mat
mask2Border(libdt.Mat mask, int border, byte[] mask_flag)
(package private) libdt.Mat[]
maxvotefilt(libdt.Mat[] I, int sx, int sy, int sz, int numclass)
(package private) double
meanOfStdVector(java.util.Vector<java.lang.Double> v)
(package private) double
minOfStdVector(java.util.Vector<java.lang.Double> v)
libdt.Mat
minus(libdt.Mat A, double b)
libdt.Mat
minus(libdt.Mat A, libdt.Mat B)
(package private) void
mulTransposed(libdt.Mat src, libdt.Mat dst, boolean transposeFirst)
(package private) double
norm2(libdt.Mat[] vid)
libdt.Mat
plus(libdt.Mat A, double b)
libdt.Mat
plus(libdt.Mat A, libdt.Mat B)
(package private) java.util.Vector<java.lang.Double>
plus(java.util.Vector<java.lang.Double> a, java.util.Vector<java.lang.Double> b)
(package private) void
postmultiply(libdt.CovMatrix cov, libdt.Mat src, libdt.Mat dst)
private void
ppertC(libdt.Mat C, libdt.Mat S0, double pert)
(package private) void
printResults()
(package private) void
processNextPatch(libdt.PatchExtractor pe)
(package private) void
processVideoTesting(libdt.Dytex dt, libdt.Mat vin, libdt.Mat Yout)
(package private) void
processVideoTraining(libdt.Dytex mydt, libdt.Mat vin, libdt.Mat Yout, libdt.Mat Yout_mean)
void
read(libdt.CovMatrix cm)
void
read(libdt.Dytex dt)
void
read(libdt.DytexMix dtm)
void
read(libdt.DytexOptions opt)
void
read(java.lang.String name, boolean[] val)
void
read(java.lang.String name, byte[] val)
void
read(java.lang.String name, double[] val)
void
read(java.lang.String name, int[] val)
void
read(java.lang.String name, libdt.Mat mtx)
void
read(java.lang.String name, java.util.Vector<java.lang.Integer> vec)
void
read(javax.vecmath.Point3i p)
(package private) void
readGtruthFile(java.lang.String fpath, java.util.Vector<java.lang.String> vlist, java.util.Vector<java.util.Vector<java.lang.String>> annlist, java.util.Vector<java.lang.String> taglist)
void
readHeader(java.lang.String str)
(package private) void
readTrialInfo(java.lang.String fpath, java.util.Vector<java.util.Vector<java.lang.Integer>> trainVidIds, java.util.Vector<java.util.Vector<java.lang.Integer>> testVidIds)
(package private) void
readVecDouble(java.lang.String name, java.util.Vector<java.lang.Double> vec)
void
readVectorString(java.lang.String name, java.util.Vector<java.lang.String> vec)
(package private) void
readVecVecDouble(java.lang.String name, java.util.Vector<java.util.Vector<java.lang.Double>> vec)
private void
reduce(libdt.Mat[] vid, libdt.Mat out, int reduceOp)
private void
reduce(libdt.Mat src, libdt.Mat dst, int dim, int rtype)
private libdt.DytexMix
reduceWithSplitting(libdt.DytexMix dtm, libdt.HEMOptions hopt)
private void
regularize(libdt.CovMatrix cov)
private void
regularize(libdt.Dytex dy, boolean regA)
libdt.Mat[]
repeat(libdt.Mat img, int nf)
void
repeat(libdt.Mat src, int ny, int nx, libdt.Mat dst)
private void
resize(java.util.Vector<libdt.Mat> matVec, int n)
private void
resizeDouble(java.util.Vector<java.lang.Double> doubleVec, int n)
void
runAlgorithm()
#include#include #include #include #include #include #include #include "opencv/cv.h" #include "opencv/cxcore.h" #include "opencv/highgui.h" #include "options.h" #include "utils/libutils.h" #include "stats/libstats.h" #include "video/libvideo.h" #include "dytex/libdytex.h" #include "platInd/platInd.hpp" #include "bufferer/Bufferer.hpp" using namespace cv; using namespace std; (package private) void
runEM(libdt.DytexMix dtm, java.util.Vector<libdt.Mat[]> Yin, libdt.EMOptions emopt)
private void
runHEM(libdt.DytexMix dtm, libdt.DytexMix hembest, libdt.HEMOptions hopt, java.util.Vector<java.lang.Integer> classes)
(package private) void
scaleRows(libdt.Mat m, libdt.Mat w)
(package private) libdt.Mat[]
segm_mask(libdt.PatchBatchExtractor pbe, java.util.Vector<java.lang.Integer> oldclasses)
(package private) libdt.Mat[]
segm_mask(libdt.VidSegm vs)
(package private) libdt.Mat[]
segmentVideo(libdt.VidSegm vs, libdt.Mat[] vid, int stepxy, int stepz, int filtxy, int filtz, libdt.Mat[] osmaskout)
void
segmentVideoSequence(libdt.VidSegm vs, java.util.Vector<java.lang.String> paths, int stepxy, int stepz, int filtxy, int filtz, java.lang.String vidPath2)
private void
setRegularizer(libdt.CovMatrix cov, libdt.cov_reg_type regopt, double regval)
private void
setRegularizer(libdt.Dytex dy, libdt.DytexRegOptions dtreg)
(package private) void
setupKFB(libdt.DytexMix dtm, int tau)
(package private) java.lang.String[]
strtok2(java.lang.String str, java.lang.String del)
(package private) libdt.Mat[]
subvid(libdt.Mat[] vid, int frange_start_inclusive, int frange_end_exclusive)
(package private) libdt.Mat[]
subvid(libdt.Mat[] vid, int zstart, int zend, int ystart, int yend, int xstart, int xend)
(package private) libdt.Mat[]
subvid(libdt.Mat[] vid, libdt.Range box_z, libdt.Range box_y, libdt.Range box_x)
double
sum(libdt.Mat A)
void
test_BoSClassification()
void
test_HEM()
void
test_HEMDTM()
int
test_videoSegm(java.lang.String paramFile)
libdt.Mat[]
times(libdt.Mat[] A, double q)
libdt.Mat
times(libdt.Mat A, double q)
libdt.Mat
times(libdt.Mat A, libdt.Mat B)
(package private) libdt.Mat
toFullMatrix(libdt.CovMatrix cov)
(package private) long
total(libdt.Mat vid)
(package private) long
total(libdt.Mat[] vid)
double
trace(libdt.Mat A)
libdt.Mat
transpose(libdt.Mat A)
(package private) libdt.Mat
vectorize(libdt.Mat vid, boolean flag_col)
void
write(libdt.CovMatrix cm)
void
write(libdt.Dytex dt)
void
write(libdt.DytexMix dtm)
void
write(libdt.DytexOptions opt)
void
write(java.lang.String name, boolean val)
void
write(java.lang.String name, byte val)
void
write(java.lang.String name, double val)
void
write(java.lang.String name, int val)
void
write(java.lang.String name, libdt.Mat mtx)
void
write(java.lang.String name, java.util.Vector<java.lang.Integer> vec)
void
write(javax.vecmath.Point3i p)
void
writeDouble(double data, boolean bigEndian)
Writes a double as eight bytes to a file.long
writeHeader(java.lang.String str)
void
writeInt(int data, boolean bigEndian)
Writes an int as four bytes to a file.void
writeLong(long data, boolean bigEndian)
Writes a long as eight bytes to a file.void
writeSize(long spos)
void
writeVecDouble(java.lang.String name, java.util.Vector<java.lang.Double> vec)
void
writeVecVecDouble(java.lang.String name, java.util.Vector<java.util.Vector<java.lang.Double>> vec)
private double
zabs(double zr, double zi)
zabs computes the absolute value or magnitude of a double precision complex variable zr + j*zi.-
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
-
raFile
private java.io.RandomAccessFile raFile
-
endian
private boolean endian
-
byteIntBuffer
private final byte[] byteIntBuffer
byte array for int *
-
byteDoubleBuffer
private final byte[] byteDoubleBuffer
byte array for double *
-
byteLongBuffer
private final byte[] byteLongBuffer
byte array for long *
-
CV_8U
private final int CV_8U
- See Also:
- Constant Field Values
-
CV_8UC1
private final int CV_8UC1
- See Also:
- Constant Field Values
-
CV_8UC
private final int CV_8UC
- See Also:
- Constant Field Values
-
CV_64F
private final int CV_64F
- See Also:
- Constant Field Values
-
CV_64FC1
private final int CV_64FC1
- See Also:
- Constant Field Values
-
CV_64FC
private final int CV_64FC
- See Also:
- Constant Field Values
-
CV_64FC3
private final int CV_64FC3
- See Also:
- Constant Field Values
-
CV_REDUCE_SUM
private final int CV_REDUCE_SUM
- See Also:
- Constant Field Values
-
CV_REDUCE_AVG
private final int CV_REDUCE_AVG
- See Also:
- Constant Field Values
-
CV_REDUCE_MAX
private final int CV_REDUCE_MAX
- See Also:
- Constant Field Values
-
CV_REDUCE_MIN
private final int CV_REDUCE_MIN
- See Also:
- Constant Field Values
-
MAXCOL
private final int MAXCOL
- See Also:
- Constant Field Values
-
g_mask_lut
private libdt.Mat[][] g_mask_lut
-
g_rgbtable
private double[][] g_rgbtable
-
debug
private boolean debug
-
-
Method Detail
-
runAlgorithm
public void runAlgorithm()
#include#include #include #include #include #include #include #include "opencv/cv.h" #include "opencv/cxcore.h" #include "opencv/highgui.h" #include "options.h" #include "utils/libutils.h" #include "stats/libstats.h" #include "video/libvideo.h" #include "dytex/libdytex.h" #include "platInd/platInd.hpp" #include "bufferer/Bufferer.hpp" using namespace cv; using namespace std; - Specified by:
runAlgorithm
in classAlgorithmBase
-
getTime
private java.lang.String getTime()
-
test_HEM
public void test_HEM()
-
reduceWithSplitting
private libdt.DytexMix reduceWithSplitting(libdt.DytexMix dtm, libdt.HEMOptions hopt)
-
runHEM
private void runHEM(libdt.DytexMix dtm, libdt.DytexMix hembest, libdt.HEMOptions hopt, java.util.Vector<java.lang.Integer> classes)
-
computeAggregateStats
private void computeAggregateStats(libdt.Estats Estat, libdt.Mat W)
-
computeEll
private void computeEll(libdt.Estats Estat)
-
subvid
libdt.Mat[] subvid(libdt.Mat[] vid, int zstart, int zend, int ystart, int yend, int xstart, int xend)
-
subvid
libdt.Mat[] subvid(libdt.Mat[] vid, libdt.Range box_z, libdt.Range box_y, libdt.Range box_x)
-
logdetiid
double logdetiid(libdt.Mat Q, double r, int C)
-
create
private libdt.Mat[] create(int frames, int rows, int cols, int type)
-
setRegularizer
private void setRegularizer(libdt.Dytex dy, libdt.DytexRegOptions dtreg)
-
setRegularizer
private void setRegularizer(libdt.CovMatrix cov, libdt.cov_reg_type regopt, double regval)
-
regularize
private void regularize(libdt.Dytex dy, boolean regA)
-
zabs
private double zabs(double zr, double zi)
zabs computes the absolute value or magnitude of a double precision complex variable zr + j*zi.- Parameters:
zr
- doublezi
- double- Returns:
- double
-
regularize
private void regularize(libdt.CovMatrix cov)
-
inp_minbnd
private boolean inp_minbnd(double[] arr, double min_bnd)
-
inp_minbnd
private boolean inp_minbnd(double[][] arr, double min_bnd)
-
init_multiple_dt
private libdt.Dytex init_multiple_dt(libdt.DytexMix dtm)
-
dytex_mix_split
private void dytex_mix_split(libdt.DytexMix dtm, libdt.DytexSplitParams splitopt, int[] ctg, int[] csp)
-
dytex_perturb
private void dytex_perturb(libdt.Dytex dtp, double pert, libdt.Split_mode mode, libdt.Split_vars vars)
-
copyToDstColRange
private void copyToDstColRange(libdt.Mat A, libdt.Mat B, int inclusiveStart, int exclusiveEnd)
-
copyFromSrcColRange
private void copyFromSrcColRange(libdt.Mat A, libdt.Mat B, int inclusiveStart, int exclusiveEnd)
-
getYmean_type
public libdt.Ymean_type getYmean_type(int Ymean_code)
-
getCov_type
public libdt.cov_type getCov_type(int cov_code)
-
getCov_reg_type
public libdt.cov_reg_type getCov_reg_type(int cov_reg_code)
-
toFullMatrix
libdt.Mat toFullMatrix(libdt.CovMatrix cov)
-
inv
libdt.CovMatrix inv(libdt.CovMatrix cov)
-
postmultiply
void postmultiply(libdt.CovMatrix cov, libdt.Mat src, libdt.Mat dst)
-
sum
public double sum(libdt.Mat A)
-
countNonZero
public int countNonZero(libdt.Mat A)
-
trace
public double trace(libdt.Mat A)
-
read
public void read(libdt.DytexMix dtm)
-
write
public void write(libdt.DytexMix dtm)
-
read
public void read(java.lang.String name, java.util.Vector<java.lang.Integer> vec)
-
readVecDouble
void readVecDouble(java.lang.String name, java.util.Vector<java.lang.Double> vec)
-
writeVecDouble
public void writeVecDouble(java.lang.String name, java.util.Vector<java.lang.Double> vec)
-
readVecVecDouble
void readVecVecDouble(java.lang.String name, java.util.Vector<java.util.Vector<java.lang.Double>> vec)
-
writeVecVecDouble
public void writeVecVecDouble(java.lang.String name, java.util.Vector<java.util.Vector<java.lang.Double>> vec)
-
readVectorString
public void readVectorString(java.lang.String name, java.util.Vector<java.lang.String> vec)
-
write
public void write(java.lang.String name, java.util.Vector<java.lang.Integer> vec)
-
read
public void read(libdt.Dytex dt)
-
write
public void write(libdt.Dytex dt)
-
read
public void read(libdt.CovMatrix cm)
-
write
public void write(libdt.CovMatrix cm)
-
read
public void read(java.lang.String name, double[] val)
-
write
public void write(java.lang.String name, double val)
-
writeDouble
public final void writeDouble(double data, boolean bigEndian) throws java.io.IOException
Writes a double as eight bytes to a file.- Parameters:
data
- Data to be written to file.bigEndian
-true
indicates big endian byte order,false
indicates little endian.- Throws:
java.io.IOException
- if there is an error writing the file
-
writeLong
public final void writeLong(long data, boolean bigEndian) throws java.io.IOException
Writes a long as eight bytes to a file.- Parameters:
data
- Data to be written to file.bigEndian
-true
indicates big endian byte order,false
indicates little endian.- Throws:
java.io.IOException
- if there is an error writing the file
-
read
public void read(java.lang.String name, libdt.Mat mtx)
-
write
public void write(java.lang.String name, libdt.Mat mtx)
-
read
public void read(javax.vecmath.Point3i p)
-
write
public void write(javax.vecmath.Point3i p)
-
read
public void read(java.lang.String name, boolean[] val)
-
write
public void write(java.lang.String name, boolean val)
-
read
public void read(libdt.DytexOptions opt)
-
write
public void write(libdt.DytexOptions opt)
-
read
public void read(java.lang.String name, int[] val)
-
write
public void write(java.lang.String name, int val)
-
writeSize
public void writeSize(long spos)
-
read
public void read(java.lang.String name, byte[] val)
-
write
public void write(java.lang.String name, byte val)
-
readHeader
public void readHeader(java.lang.String str)
-
writeHeader
public long writeHeader(java.lang.String str)
-
writeInt
public final void writeInt(int data, boolean bigEndian) throws java.io.IOException
Writes an int as four bytes to a file.- Parameters:
data
- Data to be written to file.bigEndian
-true
indicates big endian byte order,false
indicates little endian.- Throws:
java.io.IOException
- if there is an error writing the file
-
resize
private void resize(java.util.Vector<libdt.Mat> matVec, int n)
-
resizeDouble
private void resizeDouble(java.util.Vector<java.lang.Double> doubleVec, int n)
-
getInt
public final int getInt(boolean bigEndian) throws java.io.IOException
Reads four signed bytes from file.- Parameters:
bigEndian
-true
indicates big endian byte order,false
indicates little endian.- Returns:
- The value of the integer read from the file.
- Throws:
java.io.IOException
- if there is an error reading the file
-
getDouble
public final double getDouble(boolean bigEndian) throws java.io.IOException
Reads eight unsigned bytes from file.- Parameters:
bigEndian
-true
indicates big endian byte order,false
indicates little endian.- Returns:
- The value of the double read from the file.
- Throws:
java.io.IOException
- if there is an error reading the file
-
test_videoSegm
public int test_videoSegm(java.lang.String paramFile)
-
getNorm_type
public libdt.norm_type getNorm_type(int norm_code)
-
learnDTM
void learnDTM(libdt.VidSegm tvs, java.lang.String vpath, boolean dosegm)
-
loaddat
libdt.Mat[] loaddat(java.lang.String filename, java.lang.String opt)
-
checkOptionInStr
int checkOptionInStr(java.lang.String str, java.lang.String opt)
-
loaddatinfo
libdt.DatDescriptor loaddatinfo(java.lang.String filename, int verbose)
-
strtok2
java.lang.String[] strtok2(java.lang.String str, java.lang.String del)
-
getPatches
java.util.Vector<libdt.Mat[]> getPatches(libdt.PatchExtractor pe)
-
addFrames
boolean addFrames(libdt.PatchExtractor pe, libdt.Mat[] invid)
-
processNextPatch
void processNextPatch(libdt.PatchExtractor pe)
-
norm2
double norm2(libdt.Mat[] vid)
-
total
long total(libdt.Mat vid)
-
total
long total(libdt.Mat[] vid)
-
computeVariance3dDouble
double computeVariance3dDouble(libdt.Mat[] input)
-
dumpMatSize
void dumpMatSize(libdt.Mat[] m)
-
meanOfStdVector
double meanOfStdVector(java.util.Vector<java.lang.Double> v)
-
minOfStdVector
double minOfStdVector(java.util.Vector<java.lang.Double> v)
-
learnWithSplitting
void learnWithSplitting(libdt.DytexMix dtm, java.util.Vector<libdt.Mat[]> Yin, libdt.EMOptions emopt)
-
runEM
void runEM(libdt.DytexMix dtm, java.util.Vector<libdt.Mat[]> Yin, libdt.EMOptions emopt)
-
extractY
java.util.Vector<libdt.Mat> extractY(libdt.Mat[] Yin, java.util.Vector<java.lang.Integer> inds)
-
initcluster_doretto
libdt.Dytex initcluster_doretto(java.util.Vector<libdt.Mat> Y, libdt.DytexOptions param)
-
learnLeastSquares
void learnLeastSquares(libdt.Dytex mydt, java.util.Vector<libdt.Mat> videos)
-
processVideoTraining
void processVideoTraining(libdt.Dytex mydt, libdt.Mat vin, libdt.Mat Yout, libdt.Mat Yout_mean)
-
calculate
void calculate(libdt.CovMatrix cov, libdt.Mat data, boolean use_unbiased)
-
dytex_kalman
public void dytex_kalman(libdt.Mat[] Y2, libdt.Dytex dt, java.lang.String opt, java.util.Vector<libdt.Mat> xt, libdt.Mat[] Vt, libdt.Mat[] Vt1, libdt.Mat L)
-
setupKFB
void setupKFB(libdt.DytexMix dtm, int tau)
-
processVideoTesting
void processVideoTesting(libdt.Dytex dt, libdt.Mat vin, libdt.Mat Yout)
-
segm_mask
libdt.Mat[] segm_mask(libdt.PatchBatchExtractor pbe, java.util.Vector<java.lang.Integer> oldclasses)
-
segmentVideoSequence
public void segmentVideoSequence(libdt.VidSegm vs, java.util.Vector<java.lang.String> paths, int stepxy, int stepz, int filtxy, int filtz, java.lang.String vidPath2)
-
segmentVideo
libdt.Mat[] segmentVideo(libdt.VidSegm vs, libdt.Mat[] vid, int stepxy, int stepz, int filtxy, int filtz, libdt.Mat[] osmaskout)
-
getClasses
public void getClasses(libdt.DytexMix dtm, java.util.Vector<libdt.Mat> Y, libdt.Mat LLm)
-
getClasses
public void getClasses(libdt.DytexMix dtm, java.util.Vector<libdt.Mat> Y, java.util.Vector<java.lang.Integer> classes)
-
segm_mask
libdt.Mat[] segm_mask(libdt.VidSegm vs)
-
test_HEMDTM
public void test_HEMDTM()
-
learnBaseDTM
void learnBaseDTM()
-
learnTagDTM
void learnTagDTM()
-
readGtruthFile
void readGtruthFile(java.lang.String fpath, java.util.Vector<java.lang.String> vlist, java.util.Vector<java.util.Vector<java.lang.String>> annlist, java.util.Vector<java.lang.String> taglist)
-
readTrialInfo
void readTrialInfo(java.lang.String fpath, java.util.Vector<java.util.Vector<java.lang.Integer>> trainVidIds, java.util.Vector<java.util.Vector<java.lang.Integer>> testVidIds)
-
getTagVids
java.util.Vector<java.lang.Integer> getTagVids(java.util.Vector<java.lang.Integer> trainVidIds, java.lang.String tag, java.util.Vector<java.util.Vector<java.lang.String>> annlist)
-
annotateVideos
void annotateVideos()
-
computePrecisionRecall
void computePrecisionRecall()
-
printResults
void printResults()
-
plus
java.util.Vector<java.lang.Double> plus(java.util.Vector<java.lang.Double> a, java.util.Vector<java.lang.Double> b)
-
test_BoSClassification
public void test_BoSClassification()
-
learnBaseDTMBoS
void learnBaseDTMBoS()
-
-