Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to run GOTURN on windows +VS2015+opencv3.2+opencv_cotrib3.2

I used cmake to build opencv3.2+opencv_contrib3.2 on VS2015 windows.I can run KCF well,but failed to goturn.When I follow the question http://answers.opencv.org/question/123871/where-to-place-the-pretrained-data-for-goturn-tracker/ ,I can not success.If I want to run goturn, what I need to do?

How to run GOTURN on windows +VS2015+opencv3.2+opencv_cotrib3.2

I used cmake to build opencv3.2+opencv_contrib3.2 on VS2015 windows.I can run KCF well,but failed to goturn.When I follow the question http://answers.opencv.org/question/123871/where-to-place-the-pretrained-data-for-goturn-tracker/ ,I can not success.If I want to run goturn, what I need to do?
code:

include <opencv2 core="" utility.hpp="">

include <opencv2 tracking.hpp="">

include <opencv2 videoio.hpp="">

include <opencv2 highgui.hpp="">

include <iostream>

include <cstring>

using namespace std; using namespace cv;

int main() {

Rect2d roi;
Mat frame;

Ptr<Tracker> tracker = Tracker::create("GOTURN");

std::string video = "E:\\test1.mp4";
VideoCapture cap(video);

cap >> frame;
roi = selectROI("tracker", frame);

if (roi.width == 0 || roi.height == 0)
    return 0;
tracker->init(frame, roi);

printf("Start the tracking process\n");
for (;; ) {

    cap >> frame;
    if (frame.rows == 0 || frame.cols == 0)
        break;
    tracker->update(frame, roi);
    rectangle(frame, roi, Scalar(255, 0, 0), 2, 1);
    imshow("tracker", frame);   
    if (waitKey(1) == 27)
        break;
}

return 0;

}

How to run GOTURN on windows +VS2015+opencv3.2+opencv_cotrib3.2

I used cmake to build opencv3.2+opencv_contrib3.2 on VS2015 windows.I can run KCF well,but failed to goturn.When I follow the question http://answers.opencv.org/question/123871/where-to-place-the-pretrained-data-for-goturn-tracker/ ,I can not success.If I want to run goturn, what I need to do?
code:

include <opencv2 core="" utility.hpp="">

include <opencv2 tracking.hpp="">

include <opencv2 videoio.hpp="">

include <opencv2 highgui.hpp="">

include <iostream>

include <cstring>

using namespace std; using namespace cv;

int main() {

Rect2d roi;
Mat frame;

Ptr<Tracker> tracker = Tracker::create("GOTURN");

std::string video = "E:\\test1.mp4";
VideoCapture cap(video);

cap >> frame;
roi = selectROI("tracker", frame);

if (roi.width == 0 || roi.height == 0)
    return 0;
tracker->init(frame, roi);

printf("Start the tracking process\n");
for (;; ) {

    cap >> frame;
    if (frame.rows == 0 || frame.cols == 0)
        break;
    tracker->update(frame, roi);
    rectangle(frame, roi, Scalar(255, 0, 0), 2, 1);
    imshow("tracker", frame);   
    if (waitKey(1) == 27)
        break;
}

return 0;

}

How to run GOTURN on windows +VS2015+opencv3.2+opencv_cotrib3.2

I used cmake to build opencv3.2+opencv_contrib3.2 on VS2015 windows.I can run KCF well,but failed to goturn.When I follow the question http://answers.opencv.org/question/123871/where-to-place-the-pretrained-data-for-goturn-tracker/ ,I can not success.If I want to run goturn, what I need to do?
code:

include <opencv2 core="" utility.hpp="">

include <opencv2 tracking.hpp="">

include <opencv2 videoio.hpp="">

include <opencv2 highgui.hpp="">

include <iostream>

include <cstring>

#include <opencv2/core/utility.hpp>  
#include <opencv2/tracking.hpp>  
#include <opencv2/videoio.hpp>  
#include <opencv2/highgui.hpp>  
#include <iostream>  
#include <cstring>  

using namespace std;
using namespace cv;

cv; int main() {

{
Rect2d roi;
Mat frame;
Ptr<Tracker> tracker = Tracker::create("GOTURN");
std::string video = "E:\\test1.mp4";
VideoCapture cap(video);
cap >> frame;
roi = selectROI("tracker", frame);
if (roi.width == 0 || roi.height == 0)
return 0;
tracker->init(frame, roi);
printf("Start the tracking process\n");
for (;; ) {
cap >> frame;
if (frame.rows == 0 || frame.cols == 0)
break;
tracker->update(frame, roi);
rectangle(frame, roi, Scalar(255, 0, 0), 2, 1);
imshow("tracker", frame);
if (waitKey(1) == 27)
break;
}
return 0;

}

How to run GOTURN on windows +VS2015+opencv3.2+opencv_cotrib3.2

I used cmake to build opencv3.2+opencv_contrib3.2 on VS2015 windows.I can run KCF well,but failed to goturn.When I follow the question http://answers.opencv.org/question/123871/where-to-place-the-pretrained-data-for-goturn-tracker/ ,I can not success.If I want to run goturn, what I need to do?
code:

#include <opencv2/core/utility.hpp>  
#include <opencv2/tracking.hpp>  
#include <opencv2/videoio.hpp>  
#include <opencv2/highgui.hpp>  
#include <iostream>  
#include <cstring>  

using namespace std;
using namespace cv;

int main() {

Rect2d roi;
Mat frame;

Ptr<Tracker> tracker = Tracker::create("GOTURN");

std::string video = "E:\\test1.mp4";
VideoCapture cap(video);

cap >> frame;
roi = selectROI("tracker", frame);

if (roi.width == 0 || roi.height == 0)
    return 0;
tracker->init(frame, roi);

printf("Start the tracking process\n");
for (;; ) {

    cap >> frame;
    if (frame.rows == 0 || frame.cols == 0)
        break;
    tracker->update(frame, roi);
    rectangle(frame, roi, Scalar(255, 0, 0), 2, 1);
    imshow("tracker", frame);   
    if (waitKey(1) == 27)
        break;
}

return 0;

}

error is:OpenCV Error:Unspecified error <failed:fs.is_open().can not="" open="" "goturn.prototext"="">in cv::dnn::ReadProtoFromTxetFile,file D:\opencv3.2\opencv_contrib-3.2.0\modules\dnn\src\caffe\caffe_io.cpp,line 1077 D:\opencv3.2\opencv_contrib-3.2.0\modules\dnn\src\caffe\caffe_io.cpp,line 1077:error:<-2>FAILED:fs.is_open().Can not open "goturn.prototext">in cv::dnn::ReadProtoFromTxetFile OpenCV Error :Unspecified error<goturn network="" loading="" error...&gt;in="" cv::gtr::initimpl,file="" gtrtracker.cpp,line="" 117&lt;="" p="">

How to run GOTURN on windows +VS2015+opencv3.2+opencv_cotrib3.2

I used cmake to build opencv3.2+opencv_contrib3.2 on VS2015 windows.I can run KCF well,but failed to goturn.When I follow the question http://answers.opencv.org/question/123871/where-to-place-the-pretrained-data-for-goturn-tracker/ ,I can not success.If I want to run goturn, what I need to do?
code:

#include <opencv2/core/utility.hpp>  
#include <opencv2/tracking.hpp>  
#include <opencv2/videoio.hpp>  
#include <opencv2/highgui.hpp>  
#include <iostream>  
#include <cstring>  

using namespace std;
using namespace cv;

int main() {

Rect2d roi;
Mat frame;

Ptr<Tracker> tracker = Tracker::create("GOTURN");

std::string video = "E:\\test1.mp4";
VideoCapture cap(video);

cap >> frame;
roi = selectROI("tracker", frame);

if (roi.width == 0 || roi.height == 0)
    return 0;
tracker->init(frame, roi);

printf("Start the tracking process\n");
for (;; ) {

    cap >> frame;
    if (frame.rows == 0 || frame.cols == 0)
        break;
    tracker->update(frame, roi);
    rectangle(frame, roi, Scalar(255, 0, 0), 2, 1);
    imshow("tracker", frame);   
    if (waitKey(1) == 27)
        break;
}

return 0;

}

error is:OpenCV Error:Unspecified error <failed:fs.is_open().can not="" open="" "goturn.prototext"="">in cv::dnn::ReadProtoFromTxetFile,file D:\opencv3.2\opencv_contrib-3.2.0\modules\dnn\src\caffe\caffe_io.cpp,line 1077 D:\opencv3.2\opencv_contrib-3.2.0\modules\dnn\src\caffe\caffe_io.cpp,line 1077:error:<-2>FAILED:fs.is_open().Can not open "goturn.prototext">in cv::dnn::ReadProtoFromTxetFile OpenCV Error :Unspecified error<goturn network="" loading="" error...&gt;in="" cv::gtr::initimpl,file="" gtrtracker.cpp,line="" 117&lt;="" p="">