Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

TLD tracking too slow

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.
Do anyone know to speed it up?

int main(int argc, char **argv){

    Ptr<Tracker> 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;
}

TLD tracking too slow

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.
Do anyone know to speed it up?

#include <opencv2/opencv.hpp>
#include <opencv2/tracking.hpp>

using namespace std;
using namespace cv;

int main(int argc, char **argv){

    Ptr<Tracker> 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;
}

TLD tracking too slow

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.

Do anyone know to speed it up?

#include <opencv2/opencv.hpp>
#include <opencv2/tracking.hpp>

using namespace std;
using namespace cv;

int main(int argc, char **argv){

    Ptr<Tracker> 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;
}

TLD tracking too slow

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.

Do Does anyone know to speed it up?

#include <opencv2/opencv.hpp>
#include <opencv2/tracking.hpp>

using namespace std;
using namespace cv;

int main(int argc, char **argv){

    Ptr<Tracker> 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;
}