0
嗨,下面的人是我的代碼,我在創建錯誤(const字符串& TrackerMIL),我得到錯誤,因爲在此鏈接完全https://pastebin.com/0x52tJL6,請幫助,爲你們所有人知道我在opencv3中增加了額外的模塊opencv_contrib。請幫助傢伙。由於錯誤使用MIL跟蹤器和跟蹤標題
#include <opencv2/opencv.hpp>
#include <opencv2/tracking/tracking.hpp>
using namespace cv;
using namespace std;
int main(int argc, char **argv)
{
// Set up tracker.
// Instead of MIL, you can also use
// BOOSTING, KCF, TLD, MEDIANFLOW or GOTURN
Ptr<Tracker> Tracker::create(const String& TrackerMIL);
// Read video
VideoCapture video("videos/chaplin.mp4");
// Check video is open
if(!video.isOpened())
{
cout << "Could not read video file" << endl;
return 1;
}
// Read first frame.
Mat frame;
video.read(frame);
// Define an initial bounding box
Rect2d bbox(287, 23, 86, 320);
// Uncomment the line below if you
// want to choose the bounding box
// bbox = selectROI(frame, false);
// Initialize tracker with first frame and bounding box
tracker->init(frame, bbox);
while(video.read(frame))
{
// Update tracking results
tracker->update(frame, bbox);
// Draw bounding box
rectangle(frame, bbox, Scalar(255, 0, 0), 2, 1);
// Display result
imshow("Tracking", frame);
int k = waitKey(1);
if(k == 27) break;
}
return 0;
}
我用create()修正了這個問題;但現在它的這一個:(https://pastebin.com/0kP3zzfi –
即使我包括我的圖書館作爲opencv2_tracking,等它不工作了,我在eclipse ..它的所有在/ usr /本地/包括 –
它的完成,建立finsished ,,現在我正在運行./tracker ..它扔我./tracker:加載共享庫時出錯:libopencv_tracking.so.3.2:無法打開共享對象文件:沒有這樣的文件或目錄 –