OpenCV(3.4.11) Error: Requested object was not found.. Please help with this error on Windows 10

Hello im new to OpenCV. I downloaded OpenCV 3.4.12 and extracted it to a folder in my C drive just so I can use this program opencv_annotation.exe

I had the latest openCV 4.5 installed using pip install opencv-python but opencv_annotation.exe is not supported for on OpenCV 4.5… I read you can only use 3.4 opencv for annotation

every time I run this command, i get this error message. I checked my C:\ and I don’t see any folder called Build. Can someone tell me how to fix this?

$ C:/opencv3.4/build/x64/vc15/bin/opencv_annotation.exe --annotations=pos.txt --images=positive/

OpenCV: terminate handler is called! The last OpenCV error is:
OpenCV(3.4.11) Error: Requested object was not found (could not open directory: positive) in glob_rec, file C:\build\3_4_winpack-build-win64-vc15\opencv\modules\core\src\glob.cpp, line 267

yea, halfway correct. (annotation is stiil supported, cascade training is no more)

that’s a simple PATH problem. give an ABSOLUTE path to both options:
$ C:/opencv3.4/build/x64/vc15/bin/opencv_annotation.exe --annotations=c:/wherever/you/want/that/pos.txt --images=c:/wherever/positive/

and NO, it’s not a problem about libs, dlls or your build folder !!

1 Like

that said, unfortunately a lot of folks are trying things with it, that do not make sense at all.

what do you try to detect ? can you show a few example images ?

Thank you! That worked perfectly

Trying out machine learning using this youtube tutorial

can you please answer my last question ?

(might as well be, you fell for the usual silly “youtube clickbait”, and it will NEVER work)

Sorry. Im trying to detect an image on a game screen window like the tutorial above. Since an image isn’t always the same due to lighting, night and day, and as soon as it detects the image to click on it

and what on earth are you trying to detect there ?

I think the 1 pixel dark red circle is difficult to spot.

he circled that red burning torch/flame close to the middle of the picture.


Yes the burning flame… is that the fastest method possible for detecting an object… then clicking on it fast?

classical XY problem here, sadly ;(

(you shold have done research, if cascades are feasible here (95% NO) before looking at vids how to train those…)