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 protectedRICInterpolator(long addr)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RICInterpolator__fromPtr__(long addr)protected voidfinalize()floatgetAlpha()setAlpha SEE: setAlphafloatgetFGSLambda()setFGSLambda SEE: setFGSLambdafloatgetFGSSigma()setFGSSigma SEE: setFGSSigmaintgetK()setK SEE: setKfloatgetMaxFlow()setMaxFlow SEE: setMaxFlowintgetModelIter()setModelIter SEE: setModelIterbooleangetRefineModels()setRefineModels SEE: setRefineModelsintgetSuperpixelMode()setSuperpixelMode SEE: setSuperpixelModeintgetSuperpixelNNCnt()setSuperpixelNNCnt SEE: setSuperpixelNNCntfloatgetSuperpixelRuler()setSuperpixelRuler SEE: setSuperpixelRulerintgetSuperpixelSize()setSuperpixelSize SEE: setSuperpixelSizebooleangetUseGlobalSmootherFilter()setUseGlobalSmootherFilter SEE: setUseGlobalSmootherFilterbooleangetUseVariationalRefinement()setUseVariationalRefinement SEE: setUseVariationalRefinementvoidsetAlpha()Alpha is a parameter defining a global weight for transforming geodesic distance into weight.voidsetAlpha(float alpha)Alpha is a parameter defining a global weight for transforming geodesic distance into weight.voidsetCostMap(Mat costMap)Interface to provide a more elaborated cost map, i.e.voidsetFGSLambda()Sets the respective fastGlobalSmootherFilter() parameter.voidsetFGSLambda(float lambda)Sets the respective fastGlobalSmootherFilter() parameter.voidsetFGSSigma()Sets the respective fastGlobalSmootherFilter() parameter.voidsetFGSSigma(float sigma)Sets the respective fastGlobalSmootherFilter() parameter.voidsetK()K is a number of nearest-neighbor matches considered, when fitting a locally affine model for a superpixel segment.voidsetK(int k)K is a number of nearest-neighbor matches considered, when fitting a locally affine model for a superpixel segment.voidsetMaxFlow()MaxFlow is a threshold to validate the predictions using a certain piece-wise affine model.voidsetMaxFlow(float maxFlow)MaxFlow is a threshold to validate the predictions using a certain piece-wise affine model.voidsetModelIter()Parameter defining the number of iterations for piece-wise affine model estimation.voidsetModelIter(int modelIter)Parameter defining the number of iterations for piece-wise affine model estimation.voidsetRefineModels()Parameter to choose wether additional refinement of the piece-wise affine models is employed.voidsetRefineModels(boolean refineModles)Parameter to choose wether additional refinement of the piece-wise affine models is employed.voidsetSuperpixelMode()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).voidsetSuperpixelMode(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).voidsetSuperpixelNNCnt()Parameter defines the number of nearest-neighbor matches for each superpixel considered, when fitting a locally affine model.voidsetSuperpixelNNCnt(int spNN)Parameter defines the number of nearest-neighbor matches for each superpixel considered, when fitting a locally affine model.voidsetSuperpixelRuler()Parameter to tune enforcement of superpixel smoothness factor used for oversegmentation.voidsetSuperpixelRuler(float ruler)Parameter to tune enforcement of superpixel smoothness factor used for oversegmentation.voidsetSuperpixelSize()Get the internal cost, i.e.voidsetSuperpixelSize(int spSize)Get the internal cost, i.e.voidsetUseGlobalSmootherFilter()Sets whether the fastGlobalSmootherFilter() post-processing is employed.voidsetUseGlobalSmootherFilter(boolean use_FGS)Sets whether the fastGlobalSmootherFilter() post-processing is employed.voidsetUseVariationalRefinement()Parameter to choose wether the VariationalRefinement post-processing is employed.voidsetUseVariationalRefinement(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)
-
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.
-
getK
public int getK()
setK SEE: setK- Returns:
- automatically generated
-
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
-
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
-
getSuperpixelSize
public int getSuperpixelSize()
setSuperpixelSize SEE: setSuperpixelSize- Returns:
- automatically generated
-
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.
-
getSuperpixelNNCnt
public int getSuperpixelNNCnt()
setSuperpixelNNCnt SEE: setSuperpixelNNCnt- Returns:
- automatically generated
-
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
-
getSuperpixelRuler
public float getSuperpixelRuler()
setSuperpixelRuler SEE: setSuperpixelRuler- Returns:
- automatically generated
-
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
-
getSuperpixelMode
public int getSuperpixelMode()
setSuperpixelMode SEE: setSuperpixelMode- 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.
-
getAlpha
public float getAlpha()
setAlpha SEE: setAlpha- Returns:
- automatically generated
-
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.
-
getModelIter
public int getModelIter()
setModelIter SEE: setModelIter- Returns:
- automatically generated
-
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.
-
getRefineModels
public boolean getRefineModels()
setRefineModels SEE: setRefineModels- Returns:
- automatically generated
-
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.
-
getMaxFlow
public float getMaxFlow()
setMaxFlow SEE: setMaxFlow- Returns:
- automatically generated
-
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.
-
getUseVariationalRefinement
public boolean getUseVariationalRefinement()
setUseVariationalRefinement SEE: setUseVariationalRefinement- Returns:
- automatically generated
-
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.
-
getUseGlobalSmootherFilter
public boolean getUseGlobalSmootherFilter()
setUseGlobalSmootherFilter SEE: setUseGlobalSmootherFilter- Returns:
- automatically generated
-
setFGSLambda
public void setFGSLambda(float lambda)
Sets the respective fastGlobalSmootherFilter() parameter.- Parameters:
lambda- automatically generated
-
setFGSLambda
public void setFGSLambda()
Sets the respective fastGlobalSmootherFilter() parameter.
-
getFGSLambda
public float getFGSLambda()
setFGSLambda SEE: setFGSLambda- Returns:
- automatically generated
-
setFGSSigma
public void setFGSSigma(float sigma)
Sets the respective fastGlobalSmootherFilter() parameter.- Parameters:
sigma- automatically generated
-
setFGSSigma
public void setFGSSigma()
Sets the respective fastGlobalSmootherFilter() parameter.
-
getFGSSigma
public float getFGSSigma()
setFGSSigma SEE: setFGSSigma- Returns:
- automatically generated
-
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalizein classSparseMatchInterpolator- Throws:
java.lang.Throwable
-
-