optflow_calcOpticalFlowSF
import { optflow_calcOpticalFlowSF } 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_calcOpticalFlowSF(from_: Mat, to: Mat, flow: Mat, layers: number, averaging_block_size: number, max_flow: 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
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.