How to load any of this tracking algorithm in opencvjs(BOOSTING, MIL, KCF, TLD, MEDIANFLOW, GOTURN, MOSSE or CSRT)
Hello,
I wanted to load any of these tracking algorithms in javascript using opencvjs. please suggest me or giving some links to do the same. (We do have opencv.js compiled file and it has all these tracking algortihms)
I tried to refer this c++ and Python code link :
https://www.learnopencv.com/object-tr...
But getting error when initialized with below code
code:
let video = document.getElementById('videoInput');
let cap = new cv.VideoCapture(video);
// take first frame of the video
let frame = new cv.Mat(video.height, video.width, cv.CV_8UC4);
cap.read(frame);
// hardcode the initial location of window
let trackWindow = new cv.Rect(150, 60, 125, 125);
let tracker_c = cv.TrackerKCF_create();
// set up the ROI for tracking
let roi = frame.roi(trackWindow);
Errror:
TypeError: cv.TrackerKCF_create is not a function
how do you know ? you can only use a small subset of opencv from js, see here, what is currently inside
@berak, We have followed opencv steps and compiled our own opencvjs file using ecmascript.
our embindgen.py consist of following tracking algorithms.
And trying to load below javascript function:
But getting error as: