Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 600

TLD tracking too slow

$
0
0
Hello, i am using the Tracking module in OpenCV to track several objects. I tried few algorithms (MIL, MEDIANFLOW, TLD, ...) and the TLD is looking like the most accurate one. But it is very slow (every frame takes about 1 second to calculate). The resolution is 640 x 480. Does anyone know to speed it up? #include #include using namespace std; using namespace cv; int main(int argc, char **argv){ Ptr tracker = Tracker::create("TLD"); VideoCapture cap(0); Mat frame; cap >> frame; Rect2d bbox; bbox = selectROI("tracker", frame, false); tracker->init(frame, bbox); while (true) { cap >> frame; tracker->update(frame, bbox); rectangle(frame, bbox, Scalar(255, 0, 0), 2, 1); imshow("Tracking", frame); waitKey(1); } return 0; }

Viewing all articles
Browse latest Browse all 600

Trending Articles