spmallick / learnopencv

Learn OpenCV : C++ and Python Examples
https://www.learnopencv.com/
20.67k stars 11.52k forks source link

opencv4 doesn't have TrackerBoost::create() function not found as well as for TLD and MEDIANFLOW #833

Open johncblacker opened 1 year ago

johncblacker commented 1 year ago

I'm trying to build your code on a raspberry pi with opencv4 and it won't compile because of errors with BOOSTING, TLD and MEDIANFLOW types of trackers. Also, the statement: bool ok = tracker->update(frame, bbox);

Errors during compile with: tracker.cpp:83:42: error: cannot bind non-const lvalue reference of type ‘cv::Rect&’ {aka ‘cv::Rect&’} to an rvalue of type ‘cv::Rect

Is there an update to fix these errors?

brmarkus commented 1 year ago

Can you provide more details about your environment, please? What versions (Operating System, OpenCV, build tools) do you use? Natively, in a container, in a virt-env? Is there a specific sample code you are referring to? Python, C, C++? Make, CMake?

johncblacker commented 1 year ago

Raspberry pi 4 with bullseye os, opencv 4.5.1 c++10, looked in the header file and it appears they only support CSRT and KCF with this version and I don't want to downgrade.