1 | initial version |
https://docs.opencv.org/master/javadoc/org/opencv/tracking/TrackerKCF.html
2 | No.2 Revision |
https://docs.opencv.org/master/javadoc/org/opencv/tracking/TrackerKCF.html
indeed, there are no java samples, but something like this should get you started:
Tracker tracker = TrackerKCF.create();
// later:
Rect2d roi = new Rect2d(11,12,100,100);
tracker.init(image, roi);
// then:
boolean ok = tracker.update(image, roi);
// if it returns false (object lost), you have to create a new Tracker, with a new ROI
3 | No.3 Revision |
https://docs.opencv.org/master/javadoc/org/opencv/tracking/TrackerKCF.html
indeed, there are no java samples, but something like this should get you started:
import org.opencv.tracking.*;
Tracker tracker = TrackerKCF.create();
// later:
Rect2d roi = new Rect2d(11,12,100,100);
tracker.init(image, roi);
// then:
boolean ok = tracker.update(image, roi);
// if it returns false (object lost), you have to create a new Tracker, with a new ROI
4 | No.4 Revision |
https://docs.opencv.org/master/javadoc/org/opencv/tracking/TrackerKCF.html
indeed, there are no java samples, but something like this should get you started:
import org.opencv.tracking.*;
Tracker tracker = TrackerKCF.create();
// later:
then:
Rect2d roi = new Rect2d(11,12,100,100);
tracker.init(image, roi);
// then:
later:
boolean ok = tracker.update(image, roi);
// if it returns false (object lost), you have to create a new Tracker, with a new ROI