CamShift
import { CamShift } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Finds an object center, size, and orientation.
Note: - (Python) A sample explaining the camshift tracking algorithm can be found at opencv_source_code/samples/python/snippets/camshift.py
CamShift(probImage: Mat, window: Rect, criteria: TermCriteria): [RotatedRect, Rect];probImageBack projection of the object histogram. See calcBackProject.
windowInput/output value, modified by the native operation. Initial search window.
criteriaStop criteria for the underlying meanShift. returns (in old interfaces) Number of iterations CAMSHIFT took to converge The function implements the CAMSHIFT object tracking algorithm [Bradski98] . First, it finds an object center using meanShift and then adjusts the window size and finds the optimal rotation. The function returns the rotated rectangle structure that includes the object position, size, and orientation. The next position of the search window can be obtained with RotatedRect::boundingRect()
See the OpenCV sample camshiftdemo.c that tracks colored objects.
The [RotatedRect, Rect] 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.