ofxOpenCvDnnObjectDetection - compilling issues

Hey all,


Im experimenting with cv and object detection. Ideally I want to create my own image model to use and import it but initially im struggling to compile the example given with this addon. I keep getting an error that I beleive it is to do with the model. I did not understand what to do with the model or how to even link it to the project. I have cloned getWeights.sh and placed it in bin/data.
Any help much appreciated

I re-cloned the repository, downloaded the model via terminal and the files are in the bin/data/dnn all looks good.

It now seems as though theres a file missing opencv/dnn
What do I need to add?

Repository here

my shell scripts download yolov2-tiny so you need to modify to read yolov2.tiny.cfg and yolov2-tiny.weights instead of yolov3-tiny.

1 Like

You need to include ofxOpenCv by the project generator.

1 Like

Thanks for the reply, I appologise for lack of knowledge but how can I make the modification? Do you have any reference I could look at to see where/how to make the correct changes.

OK, I’ll update the repository soon with the modification, keep in touch. back soon.

1 Like

Thanks a lot

Hi, I’ve done updating the repository. clone it again and check the single_image example on the same step in README. I hope it gets through out.

Ive got a linker error, those files are there ive checked, is there an easy fix i can do to resolve?

Hi, At first glance, the link to ofxOpenCv doesn’t seem to be working; check the https://openframeworks.cc/learning/01_basics/how_to_add_addon_to_project/ page to see if you can add the add-on correctly. Please refer to the page at and check if the add-on has been added correctly.

I have checked, the addon is correctly added. I have tried running other skecthes that I have that use ofxOpenCv and they compile just fine.

Strangely I managed to get your previous single image sketch to work by making the alterations to the yolo file call. None of them from the updated repository compile now. They all have the same error. I will investigate ofxOpenCV and see if theres something that has changed.

Hi, I’ve checked your repository and found that your repo works fine. I’ll send a screen shot of your repo is working.

Here is the project file that I changed. check it.

1 Like

yeh I managed to get my repo to work but only single image, so ive noticed a small difference in the addon ofxOpenCv files.
If there is a lib folder I get a compiler linker error

No lib folder like in my repo and it compiles fine.

I have no idea why this folder was left out of my repo, but now when I compile a new sketch the addon has the lib folder and the sketch doesnt work.

Can you open the ofxOpeneCv and have a look at the included folders. Does it include the lib folder?

Yes it does include, otherwise failed. how about to check example’s of ofxOpenCv. Please make sure that the original ofxOpenCv file contains libs, and that you have loaded ofxOpenCv using the project generator.

1 Like

So I did a small test, I ran the ofx example computer vision, it ran fine. I then proceeded to update that example with project generator and now the sketch wont compile.

It looks as though my ofx has a bug so I will delete and re-install.

Thanks for your help and patience, I much appreciate it. FYI im hoping to use your addon for a university research project.

1 Like