OpenFrameWorks with ofxCv in the QTCreator

Hello.
Today we’ll talk about an amazing toolkit Openframeworks.
I installed it (stable 0.9.8 version) on Ubuntu 16.04 without any problems (see instruction, but don’t forget to run the install_codecs.sh script).


I decided to use QT Creator IDE (version 4.1 or 4.2 is recommended), witch can be configured.
But I don’t want to use a default ofxOpenCv addon. Instead I want to use the ofcCv addon, witch allows me to use OpenCv functions. So I go to Github and download (you can clone) a stable version. Unzip it to your OF addon’s folder and rename a folder to ofxCv.
Now you can run QTCreator and create a new project:

Then do steps like me:

Attention! The path should be like OF/apps/myApps.


Select some needed addons.


Ok. That’s all.

Now let’s add the ofxCv addon. Se the yourApp.qbs file:

We should add:

and

Add image variables to ofApp.h in public:

Now we can use the OpenCV functions in our program. Go to pfApp.cpp and add:

If you like the post you can donate:
BTC: 17h8xfX11tZWZ5fbDR58MCVhCrAjjL31w7
LTC: LTJj6LS3n8fndcoeysDVMDzH1u9Amg581C
DGE: D7XqBhykUDmb7JLMVkT3QLd7yAJ241zyGM
ETH: 0xc189c61c20960cbcb57cd040c67f421180966967
ZEC: t1VnhNCzArY8yS8U37jshYYkcMmRJYh2FAE

Leave a Reply