optflow_calcOpticalFlowSF1
import { optflow_calcOpticalFlowSF1 } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Calculate an optical flow using "SimpleFlow" algorithm.
Note: - An example using the simpleFlow algorithm can be found at samples/simpleflow_demo.cpp
optflow_calcOpticalFlowSF1(from_: Mat, to: Mat, flow: Mat, layers: number, averaging_block_size: number, max_flow: number, sigma_dist: number, sigma_color: number, postprocess_window: number, sigma_dist_fix: number, sigma_color_fix: number, occ_thr: number, upscale_averaging_radius: number, upscale_sigma_dist: number, upscale_sigma_color: number, speed_up_thr: number): void;from_First 8-bit 3-channel image.
toSecond 8-bit 3-channel image of the same size as prev
flowOutput destination, filled by the native operation. computed flow image that has the same size as prev and type CV_32FC2
layersNumber of layers
averaging_block_sizeSize of block through which we sum up when calculate cost function for pixel
max_flowmaximal flow that we search at each level
sigma_distvector smooth spatial sigma parameter
sigma_colorvector smooth color sigma parameter
postprocess_windowwindow size for postprocess cross bilateral filter
sigma_dist_fixspatial sigma for postprocess cross bilateralf filter
sigma_color_fixcolor sigma for postprocess cross bilateral filter
occ_thrthreshold for detecting occlusions
upscale_averaging_radiuswindow size for bilateral upscale operation
upscale_sigma_distspatial sigma for bilateral upscale operation
upscale_sigma_colorcolor sigma for bilateral upscale operation
speed_up_thrthreshold to detect point with irregular flow - where flow should be recalculated after upscale
See [Tao2012] . And site of project - http://graphics.berkeley.edu/papers/Tao-SAN-2012-05/.
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.