Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The first is OpenCV in C++, the second is OpenCV in the basic C functions. The first example is calling the C++ version of OpenCv with namespaces and all of the functions included in the namespace. The second style is simply a C-style macro that you can call the OpenCV function directly. The C++ is just a wrapper for the C macros, so you're essentially calling the same functions either way. Which you use is really up to you. I like the C macros better, mostly for the sake of simplicity and documentation.

The first is OpenCV in C++, the second is OpenCV in the basic C functions. The first example is calling the C++ version of OpenCv with namespaces and all of the functions included in the namespace. The second style is simply a C-style macro that you can call the OpenCV function directly. in C. The C++ is just a wrapper for the C macros, code, so you're essentially calling the same functions either way. Which you use is really up to you. I like the C macros functions better, mostly for the sake of simplicity and documentation.