ximgproc_RICInterpolator
import { ximgproc_RICInterpolator } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Native object: release it with using or delete(). Factories can return null; check before calling methods. Inherits ximgproc_SparseMatchInterpolator.
Sparse match interpolation algorithm based on modified piecewise locally-weighted affine estimator called Robust Interpolation method of Correspondences or RIC from [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.
Constructors and members
clone
Create another handle to the same native object. This retains the object without copying its pixels or algorithm state; dispose both handles separately.
clone(): this;The this result.
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 [Hu2017] uses 32.
setK(k: number): void;2 available overloads
setK(): void;setK(k: number): void;kk argument (number).
getK
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 [Hu2017] uses 32. See: setK
getK(): number;The number result.
setCostMap
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.
See: cv::ximgproc::createSuperpixelSLIC
setCostMap(costMap: Mat): void;costMapa type CV_32FC1 Mat is required.
setSuperpixelSize
Get the internal cost, i.e. edge map, used for estimating the edge-aware term. See: setCostMap
setSuperpixelSize(spSize: number): void;2 available overloads
setSuperpixelSize(): void;setSuperpixelSize(spSize: number): void;spSizesp size argument (number).
getSuperpixelSize
Get the internal cost, i.e. edge map, used for estimating the edge-aware term. See: setCostMap See: setSuperpixelSize
getSuperpixelSize(): number;The number result.
setSuperpixelNNCnt
Parameter defines the number of nearest-neighbor matches for each superpixel considered, when fitting a locally affine model.
setSuperpixelNNCnt(spNN: number): void;2 available overloads
setSuperpixelNNCnt(): void;setSuperpixelNNCnt(spNN: number): void;spNNsp nn argument (number).
getSuperpixelNNCnt
Parameter defines the number of nearest-neighbor matches for each superpixel considered, when fitting a locally affine model. See: setSuperpixelNNCnt
getSuperpixelNNCnt(): number;The number result.
setSuperpixelRuler
Parameter to tune enforcement of superpixel smoothness factor used for oversegmentation. See: cv::ximgproc::createSuperpixelSLIC
setSuperpixelRuler(ruler: number): void;2 available overloads
setSuperpixelRuler(): void;setSuperpixelRuler(ruler: number): void;rulerruler argument (number).
getSuperpixelRuler
Parameter to tune enforcement of superpixel smoothness factor used for oversegmentation. See: cv::ximgproc::createSuperpixelSLIC See: setSuperpixelRuler
getSuperpixelRuler(): number;The number result.
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
setSuperpixelMode(mode: number): void;2 available overloads
setSuperpixelMode(): void;setSuperpixelMode(mode: number): void;modemode argument (number).
getSuperpixelMode
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 See: setSuperpixelMode
getSuperpixelMode(): number;The number result.
setAlpha
Alpha is a parameter defining a global weight for transforming geodesic distance into weight.
setAlpha(alpha: number): void;2 available overloads
setAlpha(): void;setAlpha(alpha: number): void;alphaalpha argument (number).
getAlpha
Alpha is a parameter defining a global weight for transforming geodesic distance into weight. See: setAlpha
getAlpha(): number;The number result.
setModelIter
Parameter defining the number of iterations for piece-wise affine model estimation.
setModelIter(modelIter: number): void;2 available overloads
setModelIter(): void;setModelIter(modelIter: number): void;modelItermodel iter argument (number).
getModelIter
Parameter defining the number of iterations for piece-wise affine model estimation. See: setModelIter
getModelIter(): number;The number result.
setRefineModels
Parameter to choose wether additional refinement of the piece-wise affine models is employed.
setRefineModels(refineModles: boolean): void;2 available overloads
setRefineModels(): void;setRefineModels(refineModles: boolean): void;refineModlesrefine modles argument (boolean).
getRefineModels
Parameter to choose wether additional refinement of the piece-wise affine models is employed. See: setRefineModels
getRefineModels(): boolean;The boolean result.
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.
setMaxFlow(maxFlow: number): void;2 available overloads
setMaxFlow(): void;setMaxFlow(maxFlow: number): void;maxFlowmax flow argument (number).
getMaxFlow
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. See: setMaxFlow
getMaxFlow(): number;The number result.
setUseVariationalRefinement
Parameter to choose wether the VariationalRefinement post-processing is employed.
setUseVariationalRefinement(use_variational_refinement: boolean): void;2 available overloads
setUseVariationalRefinement(): void;setUseVariationalRefinement(use_variational_refinement: boolean): void;use_variational_refinementuse variational refinement argument (boolean).
getUseVariationalRefinement
Parameter to choose wether the VariationalRefinement post-processing is employed. See: setUseVariationalRefinement
getUseVariationalRefinement(): boolean;The boolean result.
setUseGlobalSmootherFilter
Sets whether the fastGlobalSmootherFilter() post-processing is employed.
setUseGlobalSmootherFilter(use_FGS: boolean): void;2 available overloads
setUseGlobalSmootherFilter(): void;setUseGlobalSmootherFilter(use_FGS: boolean): void;use_FGSuse fgs argument (boolean).
getUseGlobalSmootherFilter
Sets whether the fastGlobalSmootherFilter() post-processing is employed. See: setUseGlobalSmootherFilter
getUseGlobalSmootherFilter(): boolean;The boolean result.
setFGSLambda
Sets the respective fastGlobalSmootherFilter() parameter.
setFGSLambda(lambda: number): void;2 available overloads
setFGSLambda(): void;setFGSLambda(lambda: number): void;lambdalambda argument (number).
getFGSLambda
Sets the respective fastGlobalSmootherFilter() parameter. See: setFGSLambda
getFGSLambda(): number;The number result.
setFGSSigma
Sets the respective fastGlobalSmootherFilter() parameter.
setFGSSigma(sigma: number): void;2 available overloads
setFGSSigma(): void;setFGSSigma(sigma: number): void;sigmasigma argument (number).
getFGSSigma
Sets the respective fastGlobalSmootherFilter() parameter. See: setFGSSigma
getFGSSigma(): number;The number result.
These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.