|
OpenCV 2.4.3 (RC) | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opencv.contrib.StereoVar
public class StereoVar
Class for computing stereo correspondence using the variational matching algorithm
class StereoVar
// C++ code:
StereoVar();
StereoVar(int levels, double pyrScale,
int nIt, int minDisp, int maxDisp,
int poly_n, double poly_sigma, float fi,
float lambda, int penalization, int cycle,
int flags);
virtual ~StereoVar();
virtual void operator()(InputArray left, InputArray right, OutputArray disp);
int levels;
double pyrScale;
int nIt;
int minDisp;
int maxDisp;
int poly_n;
double poly_sigma;
float fi;
float lambda;
int penalization;
int cycle;
int flags;...
};
The class implements the modified S. G. Kosov algorithm [Publication] that differs from the original one as follows:
Field Summary | |
---|---|
static int |
CYCLE_O
|
static int |
CYCLE_V
|
protected long |
nativeObj
|
static int |
PENALIZATION_CHARBONNIER
|
static int |
PENALIZATION_PERONA_MALIK
|
static int |
PENALIZATION_TICHONOV
|
static int |
USE_AUTO_PARAMS
|
static int |
USE_EQUALIZE_HIST
|
static int |
USE_INITIAL_DISPARITY
|
static int |
USE_MEDIAN_FILTERING
|
static int |
USE_SMART_ID
|
Constructor Summary | |
---|---|
|
StereoVar()
The constructor The first constructor initializes StereoVar with all the default
parameters. |
|
StereoVar(int levels,
double pyrScale,
int nIt,
int minDisp,
int maxDisp,
int poly_n,
double poly_sigma,
float fi,
float lambda,
int penalization,
int cycle,
int flags)
The constructor The first constructor initializes StereoVar with all the default
parameters. |
protected |
StereoVar(long addr)
|
Method Summary | |
---|---|
void |
compute(Mat left,
Mat right,
Mat disp)
|
protected void |
finalize()
|
int |
get_cycle()
|
float |
get_fi()
|
int |
get_flags()
|
float |
get_lambda()
|
int |
get_levels()
|
int |
get_maxDisp()
|
int |
get_minDisp()
|
int |
get_nIt()
|
int |
get_penalization()
|
int |
get_poly_n()
|
double |
get_poly_sigma()
|
double |
get_pyrScale()
|
void |
set_cycle(int cycle)
|
void |
set_fi(float fi)
|
void |
set_flags(int flags)
|
void |
set_lambda(float lambda)
|
void |
set_levels(int levels)
|
void |
set_maxDisp(int maxDisp)
|
void |
set_minDisp(int minDisp)
|
void |
set_nIt(int nIt)
|
void |
set_penalization(int penalization)
|
void |
set_poly_n(int poly_n)
|
void |
set_poly_sigma(double poly_sigma)
|
void |
set_pyrScale(double pyrScale)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CYCLE_O
public static final int CYCLE_V
protected final long nativeObj
public static final int PENALIZATION_CHARBONNIER
public static final int PENALIZATION_PERONA_MALIK
public static final int PENALIZATION_TICHONOV
public static final int USE_AUTO_PARAMS
public static final int USE_EQUALIZE_HIST
public static final int USE_INITIAL_DISPARITY
public static final int USE_MEDIAN_FILTERING
public static final int USE_SMART_ID
Constructor Detail |
---|
public StereoVar()
The constructor
The first constructor initializes StereoVar
with all the default
parameters. So, you only have to set StereoVar.maxDisp
and / or
StereoVar.minDisp
at minimum. The second constructor enables
you to set each parameter to a custom value.
public StereoVar(int levels, double pyrScale, int nIt, int minDisp, int maxDisp, int poly_n, double poly_sigma, float fi, float lambda, int penalization, int cycle, int flags)
The constructor
The first constructor initializes StereoVar
with all the default
parameters. So, you only have to set StereoVar.maxDisp
and / or
StereoVar.minDisp
at minimum. The second constructor enables
you to set each parameter to a custom value.
levels
- The number of pyramid layers, including the initial image.
levels=1 means that no extra layers are created and only the original images
are used. This parameter is ignored if flag USE_AUTO_PARAMS is set.pyrScale
- Specifies the image scale (<1) to build the pyramids for each
image. pyrScale=0.5 means the classical pyramid, where each next layer is
twice smaller than the previous. (This parameter is ignored if flag
USE_AUTO_PARAMS is set).nIt
- The number of iterations the algorithm does at each pyramid level.
(If the flag USE_SMART_ID is set, the number of iterations will be
redistributed in such a way, that more iterations will be done on more
coarser levels.)minDisp
- Minimum possible disparity value. Could be negative in case
the left and right input images change places.maxDisp
- Maximum possible disparity value.poly_n
- Size of the pixel neighbourhood used to find polynomial
expansion in each pixel. The larger values mean that the image will be
approximated with smoother surfaces, yielding more robust algorithm and more
blurred motion field. Typically, poly_n = 3, 5 or 7poly_sigma
- Standard deviation of the Gaussian that is used to smooth
derivatives that are used as a basis for the polynomial expansion. For
poly_n=5 you can set poly_sigma=1.1, for poly_n=7 a good value would be
poly_sigma=1.5fi
- The smoothness parameter, ot the weight coefficient for the
smoothness term.lambda
- The threshold parameter for edge-preserving smoothness. (This
parameter is ignored if PENALIZATION_CHARBONNIER or PENALIZATION_PERONA_MALIK
is used.)penalization
- Possible values: PENALIZATION_TICHONOV - linear
smoothness; PENALIZATION_CHARBONNIER - non-linear edge preserving smoothness;
PENALIZATION_PERONA_MALIK - non-linear edge-enhancing smoothness. (This
parameter is ignored if flag USE_AUTO_PARAMS is set).cycle
- Type of the multigrid cycle. Possible values: CYCLE_O and
CYCLE_V for null- and v-cycles respectively. (This parameter is ignored if
flag USE_AUTO_PARAMS is set).flags
- The operation flags; can be a combination of the following:
protected StereoVar(long addr)
Method Detail |
---|
public void compute(Mat left, Mat right, Mat disp)
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public int get_cycle()
public float get_fi()
public int get_flags()
public float get_lambda()
public int get_levels()
public int get_maxDisp()
public int get_minDisp()
public int get_nIt()
public int get_penalization()
public int get_poly_n()
public double get_poly_sigma()
public double get_pyrScale()
public void set_cycle(int cycle)
public void set_fi(float fi)
public void set_flags(int flags)
public void set_lambda(float lambda)
public void set_levels(int levels)
public void set_maxDisp(int maxDisp)
public void set_minDisp(int minDisp)
public void set_nIt(int nIt)
public void set_penalization(int penalization)
public void set_poly_n(int poly_n)
public void set_poly_sigma(double poly_sigma)
public void set_pyrScale(double pyrScale)
|
Official OpenCV 2.4 Documentation | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |