1 | initial version |
I usually start with a windows form application and add the openCV code in the callback functions. The form header just has the declarations for the form callbacks with the code in the associated cpp file. This is not the default for visual c++ but is the "proper" way to do things in C.
Within the header I do not include any OpenCV elements. I put the
#include "opencv2\opencv.hpp"
#include "opencv2\highgui\highgui.hpp"
#include "opencv2\imgproc\imgproc.hpp"
...
using namespace cv;
at the top of the .cpp file. all Mat's are declared internally in the callback or as global variables at the .cpp level. in the project properties make sure to:
This works well for me.
guy