optflow_calcOpticalFlowSparseToDense
import { optflow_calcOpticalFlowSparseToDense } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Fast dense optical flow based on PyrLK sparse matches interpolation.
optflow_calcOpticalFlowSparseToDense(from_: Mat, to: Mat, flow: Mat, grid_step: number, k: number, sigma: number, use_post_proc: boolean, fgs_lambda: number, fgs_sigma: number): void;7 available overloads
optflow_calcOpticalFlowSparseToDense(from_: Mat, to: Mat, flow: Mat): void;optflow_calcOpticalFlowSparseToDense(from_: Mat, to: Mat, flow: Mat, grid_step: number): void;optflow_calcOpticalFlowSparseToDense(from_: Mat, to: Mat, flow: Mat, grid_step: number, k: number): void;optflow_calcOpticalFlowSparseToDense(from_: Mat, to: Mat, flow: Mat, grid_step: number, k: number, sigma: number): void;optflow_calcOpticalFlowSparseToDense(from_: Mat, to: Mat, flow: Mat, grid_step: number, k: number, sigma: number, use_post_proc: boolean): void;optflow_calcOpticalFlowSparseToDense(from_: Mat, to: Mat, flow: Mat, grid_step: number, k: number, sigma: number, use_post_proc: boolean, fgs_lambda: number): void;optflow_calcOpticalFlowSparseToDense(from_: Mat, to: Mat, flow: Mat, grid_step: number, k: number, sigma: number, use_post_proc: boolean, fgs_lambda: number, fgs_sigma: number): void;from_first 8-bit 3-channel or 1-channel image.
tosecond 8-bit 3-channel or 1-channel image of the same size as from
flowOutput destination, filled by the native operation. computed flow image that has the same size as from and CV_32FC2 type
grid_stepstride used in sparse match computation. Lower values usually result in higher quality but slow down the algorithm.
knumber of nearest-neighbor matches considered, when fitting a locally affine model. Lower values can make the algorithm noticeably faster at the cost of some quality degradation.
sigmaparameter defining how fast the weights decrease in the locally-weighted affine fitting. Higher values can help preserve fine details, lower values can help to get rid of the noise in the output flow.
use_post_procdefines whether the ximgproc::fastGlobalSmootherFilter() is used for post-processing after interpolation
fgs_lambdasee the respective parameter of the ximgproc::fastGlobalSmootherFilter()
fgs_sigmasee the respective parameter of the ximgproc::fastGlobalSmootherFilter()
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.