Package org.opencv.ximgproc
Class RICInterpolator
- java.lang.Object
-
- org.opencv.core.Algorithm
-
- org.opencv.ximgproc.SparseMatchInterpolator
-
- org.opencv.ximgproc.RICInterpolator
-
public class RICInterpolator extends SparseMatchInterpolator
Sparse match interpolation algorithm based on modified piecewise locally-weighted affine estimator called Robust Interpolation method of Correspondences or RIC from CITE: Hu2017 and Variational and Fast Global Smoother as post-processing filter. The RICInterpolator is a extension of the EdgeAwareInterpolator. Main concept of this extension is an piece-wise affine model based on over-segmentation via SLIC superpixel estimation. The method contains an efficient propagation mechanism to estimate among the pieces-wise models.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
RICInterpolator(long addr)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RICInterpolator
__fromPtr__(long addr)
protected void
finalize()
float
getAlpha()
setAlpha SEE: setAlphafloat
getFGSLambda()
setFGSLambda SEE: setFGSLambdafloat
getFGSSigma()
setFGSSigma SEE: setFGSSigmaint
getK()
setK SEE: setKfloat
getMaxFlow()
setMaxFlow SEE: setMaxFlowint
getModelIter()
setModelIter SEE: setModelIterboolean
getRefineModels()
setRefineModels SEE: setRefineModelsint
getSuperpixelMode()
setSuperpixelMode SEE: setSuperpixelModeint
getSuperpixelNNCnt()
setSuperpixelNNCnt SEE: setSuperpixelNNCntfloat
getSuperpixelRuler()
setSuperpixelRuler SEE: setSuperpixelRulerint
getSuperpixelSize()
setSuperpixelSize SEE: setSuperpixelSizeboolean
getUseGlobalSmootherFilter()
setUseGlobalSmootherFilter SEE: setUseGlobalSmootherFilterboolean
getUseVariationalRefinement()
setUseVariationalRefinement SEE: setUseVariationalRefinementvoid
setAlpha()
Alpha is a parameter defining a global weight for transforming geodesic distance into weight.void
setAlpha(float alpha)
Alpha is a parameter defining a global weight for transforming geodesic distance into weight.void
setCostMap(Mat costMap)
Interface to provide a more elaborated cost map, i.e.void
setFGSLambda()
Sets the respective fastGlobalSmootherFilter() parameter.void
setFGSLambda(float lambda)
Sets the respective fastGlobalSmootherFilter() parameter.void
setFGSSigma()
Sets the respective fastGlobalSmootherFilter() parameter.void
setFGSSigma(float sigma)
Sets the respective fastGlobalSmootherFilter() parameter.void
setK()
K is a number of nearest-neighbor matches considered, when fitting a locally affine model for a superpixel segment.void
setK(int k)
K is a number of nearest-neighbor matches considered, when fitting a locally affine model for a superpixel segment.void
setMaxFlow()
MaxFlow is a threshold to validate the predictions using a certain piece-wise affine model.void
setMaxFlow(float maxFlow)
MaxFlow is a threshold to validate the predictions using a certain piece-wise affine model.void
setModelIter()
Parameter defining the number of iterations for piece-wise affine model estimation.void
setModelIter(int modelIter)
Parameter defining the number of iterations for piece-wise affine model estimation.void
setRefineModels()
Parameter to choose wether additional refinement of the piece-wise affine models is employed.void
setRefineModels(boolean refineModles)
Parameter to choose wether additional refinement of the piece-wise affine models is employed.void
setSuperpixelMode()
Parameter to choose superpixel algorithm variant to use: - cv::ximgproc::SLICType SLIC segments image using a desired region_size (value: 100) - cv::ximgproc::SLICType SLICO will optimize using adaptive compactness factor (value: 101) - cv::ximgproc::SLICType MSLIC will optimize using manifold methods resulting in more content-sensitive superpixels (value: 102).void
setSuperpixelMode(int mode)
Parameter to choose superpixel algorithm variant to use: - cv::ximgproc::SLICType SLIC segments image using a desired region_size (value: 100) - cv::ximgproc::SLICType SLICO will optimize using adaptive compactness factor (value: 101) - cv::ximgproc::SLICType MSLIC will optimize using manifold methods resulting in more content-sensitive superpixels (value: 102).void
setSuperpixelNNCnt()
Parameter defines the number of nearest-neighbor matches for each superpixel considered, when fitting a locally affine model.void
setSuperpixelNNCnt(int spNN)
Parameter defines the number of nearest-neighbor matches for each superpixel considered, when fitting a locally affine model.void
setSuperpixelRuler()
Parameter to tune enforcement of superpixel smoothness factor used for oversegmentation.void
setSuperpixelRuler(float ruler)
Parameter to tune enforcement of superpixel smoothness factor used for oversegmentation.void
setSuperpixelSize()
Get the internal cost, i.e.void
setSuperpixelSize(int spSize)
Get the internal cost, i.e.void
setUseGlobalSmootherFilter()
Sets whether the fastGlobalSmootherFilter() post-processing is employed.void
setUseGlobalSmootherFilter(boolean use_FGS)
Sets whether the fastGlobalSmootherFilter() post-processing is employed.void
setUseVariationalRefinement()
Parameter to choose wether the VariationalRefinement post-processing is employed.void
setUseVariationalRefinement(boolean use_variational_refinement)
Parameter to choose wether the VariationalRefinement post-processing is employed.-
Methods inherited from class org.opencv.ximgproc.SparseMatchInterpolator
interpolate
-
Methods inherited from class org.opencv.core.Algorithm
clear, empty, getDefaultName, getNativeObjAddr, save
-
-
-
-
Method Detail
-
__fromPtr__
public static RICInterpolator __fromPtr__(long addr)
-
getRefineModels
public boolean getRefineModels()
setRefineModels SEE: setRefineModels- Returns:
- automatically generated
-
getUseGlobalSmootherFilter
public boolean getUseGlobalSmootherFilter()
setUseGlobalSmootherFilter SEE: setUseGlobalSmootherFilter- Returns:
- automatically generated
-
getUseVariationalRefinement
public boolean getUseVariationalRefinement()
setUseVariationalRefinement SEE: setUseVariationalRefinement- Returns:
- automatically generated
-
getAlpha
public float getAlpha()
setAlpha SEE: setAlpha- Returns:
- automatically generated
-
getFGSLambda
public float getFGSLambda()
setFGSLambda SEE: setFGSLambda- Returns:
- automatically generated
-
getFGSSigma
public float getFGSSigma()
setFGSSigma SEE: setFGSSigma- Returns:
- automatically generated
-
getMaxFlow
public float getMaxFlow()
setMaxFlow SEE: setMaxFlow- Returns:
- automatically generated
-
getSuperpixelRuler
public float getSuperpixelRuler()
setSuperpixelRuler SEE: setSuperpixelRuler- Returns:
- automatically generated
-
getK
public int getK()
setK SEE: setK- Returns:
- automatically generated
-
getModelIter
public int getModelIter()
setModelIter SEE: setModelIter- Returns:
- automatically generated
-
getSuperpixelMode
public int getSuperpixelMode()
setSuperpixelMode SEE: setSuperpixelMode- Returns:
- automatically generated
-
getSuperpixelNNCnt
public int getSuperpixelNNCnt()
setSuperpixelNNCnt SEE: setSuperpixelNNCnt- Returns:
- automatically generated
-
getSuperpixelSize
public int getSuperpixelSize()
setSuperpixelSize SEE: setSuperpixelSize- Returns:
- automatically generated
-
setAlpha
public void setAlpha(float alpha)
Alpha is a parameter defining a global weight for transforming geodesic distance into weight.- Parameters:
alpha
- automatically generated
-
setAlpha
public void setAlpha()
Alpha is a parameter defining a global weight for transforming geodesic distance into weight.
-
setCostMap
public void setCostMap(Mat costMap)
Interface to provide a more elaborated cost map, i.e. edge map, for the edge-aware term. This implementation is based on a rather simple gradient-based edge map estimation. To used more complex edge map estimator (e.g. StructuredEdgeDetection that has been used in the original publication) that may lead to improved accuracies, the internal edge map estimation can be bypassed here.- Parameters:
costMap
- a type CV_32FC1 Mat is required. SEE: cv::ximgproc::createSuperpixelSLIC
-
setFGSLambda
public void setFGSLambda(float lambda)
Sets the respective fastGlobalSmootherFilter() parameter.- Parameters:
lambda
- automatically generated
-
setFGSLambda
public void setFGSLambda()
Sets the respective fastGlobalSmootherFilter() parameter.
-
setFGSSigma
public void setFGSSigma(float sigma)
Sets the respective fastGlobalSmootherFilter() parameter.- Parameters:
sigma
- automatically generated
-
setFGSSigma
public void setFGSSigma()
Sets the respective fastGlobalSmootherFilter() parameter.
-
setK
public void setK(int k)
K is a number of nearest-neighbor matches considered, when fitting a locally affine model for a superpixel segment. However, lower values would make the interpolation noticeably faster. The original implementation of CITE: Hu2017 uses 32.- Parameters:
k
- automatically generated
-
setK
public void setK()
K is a number of nearest-neighbor matches considered, when fitting a locally affine model for a superpixel segment. However, lower values would make the interpolation noticeably faster. The original implementation of CITE: Hu2017 uses 32.
-
setMaxFlow
public void setMaxFlow(float maxFlow)
MaxFlow is a threshold to validate the predictions using a certain piece-wise affine model. If the prediction exceeds the treshold the translational model will be applied instead.- Parameters:
maxFlow
- automatically generated
-
setMaxFlow
public void setMaxFlow()
MaxFlow is a threshold to validate the predictions using a certain piece-wise affine model. If the prediction exceeds the treshold the translational model will be applied instead.
-
setModelIter
public void setModelIter(int modelIter)
Parameter defining the number of iterations for piece-wise affine model estimation.- Parameters:
modelIter
- automatically generated
-
setModelIter
public void setModelIter()
Parameter defining the number of iterations for piece-wise affine model estimation.
-
setRefineModels
public void setRefineModels(boolean refineModles)
Parameter to choose wether additional refinement of the piece-wise affine models is employed.- Parameters:
refineModles
- automatically generated
-
setRefineModels
public void setRefineModels()
Parameter to choose wether additional refinement of the piece-wise affine models is employed.
-
setSuperpixelMode
public void setSuperpixelMode(int mode)
Parameter to choose superpixel algorithm variant to use: - cv::ximgproc::SLICType SLIC segments image using a desired region_size (value: 100) - cv::ximgproc::SLICType SLICO will optimize using adaptive compactness factor (value: 101) - cv::ximgproc::SLICType MSLIC will optimize using manifold methods resulting in more content-sensitive superpixels (value: 102). SEE: cv::ximgproc::createSuperpixelSLIC- Parameters:
mode
- automatically generated
-
setSuperpixelMode
public void setSuperpixelMode()
Parameter to choose superpixel algorithm variant to use: - cv::ximgproc::SLICType SLIC segments image using a desired region_size (value: 100) - cv::ximgproc::SLICType SLICO will optimize using adaptive compactness factor (value: 101) - cv::ximgproc::SLICType MSLIC will optimize using manifold methods resulting in more content-sensitive superpixels (value: 102). SEE: cv::ximgproc::createSuperpixelSLIC
-
setSuperpixelNNCnt
public void setSuperpixelNNCnt(int spNN)
Parameter defines the number of nearest-neighbor matches for each superpixel considered, when fitting a locally affine model.- Parameters:
spNN
- automatically generated
-
setSuperpixelNNCnt
public void setSuperpixelNNCnt()
Parameter defines the number of nearest-neighbor matches for each superpixel considered, when fitting a locally affine model.
-
setSuperpixelRuler
public void setSuperpixelRuler(float ruler)
Parameter to tune enforcement of superpixel smoothness factor used for oversegmentation. SEE: cv::ximgproc::createSuperpixelSLIC- Parameters:
ruler
- automatically generated
-
setSuperpixelRuler
public void setSuperpixelRuler()
Parameter to tune enforcement of superpixel smoothness factor used for oversegmentation. SEE: cv::ximgproc::createSuperpixelSLIC
-
setSuperpixelSize
public void setSuperpixelSize(int spSize)
Get the internal cost, i.e. edge map, used for estimating the edge-aware term. SEE: setCostMap- Parameters:
spSize
- automatically generated
-
setSuperpixelSize
public void setSuperpixelSize()
Get the internal cost, i.e. edge map, used for estimating the edge-aware term. SEE: setCostMap
-
setUseGlobalSmootherFilter
public void setUseGlobalSmootherFilter(boolean use_FGS)
Sets whether the fastGlobalSmootherFilter() post-processing is employed.- Parameters:
use_FGS
- automatically generated
-
setUseGlobalSmootherFilter
public void setUseGlobalSmootherFilter()
Sets whether the fastGlobalSmootherFilter() post-processing is employed.
-
setUseVariationalRefinement
public void setUseVariationalRefinement(boolean use_variational_refinement)
Parameter to choose wether the VariationalRefinement post-processing is employed.- Parameters:
use_variational_refinement
- automatically generated
-
setUseVariationalRefinement
public void setUseVariationalRefinement()
Parameter to choose wether the VariationalRefinement post-processing is employed.
-
finalize
protected void finalize() throws java.lang.Throwable
- Overrides:
finalize
in classSparseMatchInterpolator
- Throws:
java.lang.Throwable
-
-