Missing Trackers

Hi, so I’m new to using libraries and such as a whole but after my installation I am having issues with opening videos (the test for open video fails) and some trackers don’t exist like “TrackerKCF()”.

OpenCV 4.5.4
VS Code 2019 (Currnet)
Win 10 - mingw64 compiler

there was some recent api refactoring,
but they are all still there
(assuming, you build the opencv libs with contrib modules)

Ah, so it id need to rebuild opencv libs than because the version I grabbed didn’t have this folder. Would that lead to “VideoCapture” failing to function properly?

make sure, you have absolutely the same version for both repos !

no, unrelated. and you need to explain, what the problem is, please.

VideoCapture cap("testV.mp4");
  if(!cap.isOpened())
  {
	  cout << "we ain't happy\n";
	  return 0;
  }

This is my code and it returns false, which means that the function isn’t loading the video (as far as I understand).

Also, libraries I am including are:

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

possible reasons:

  • path to video file is wrong
  • opencv_videoio_ffmpeg454_64.dll not found on the PATH
1 Like

Dam, I was just missing a single .dll in my bin folder for my file. That worked, I’m sorry. The interesting bit is uhm, I have to have the .dll in the bin folder of my code location. Is that an error on path in my VS Code task file?

1 Like

i have no idea, how VSCode handles such things.
when in doubt, skip your ide (extra complication !), and run from a simple console.

I would if I had a better grasp on coding and setting up libraries… If I was really smart I would have done this in python and saved myself the pain but I’m just a baby. Do you know how I would package and run this on another computer using only the .exe file?

(or with it’s need .dll files and what not)

that’s an illusion, sorry to say so.
you can reduce the dependancies by building a single openv_world lib or even static libs instead of dll’s, but you still need the ffmpeg dll, and, as long as you try with mngw, their c-runtime dll(s)

1 Like

I think that is probably a bit over my head at the moment, I need to get there eventually but not yet. Thanks for the help, it’s been wonderful!

Sorry about not being concise.