severin-lemaignan / gazr

3D head pose estimation using monocular vision
Other
179 stars 55 forks source link

Add OpenCV header for missing definition of CV_AA #29

Closed ptosi closed 3 years ago

ptosi commented 3 years ago

Avoid the following compilation error by adding the relevant header:

error: ‘CV_AA’ was not declared in this scope; did you mean ‘CV_MSA’?
severin-lemaignan commented 3 years ago

...not sure why this C header is required... I can not reproduce the issue...

ptosi commented 3 years ago

Well CV_AA is defined in imgproc_c.h so it makes sense to include that header wherever the macro is used (not sure if there's a more canonical way to do so).

You might not be able to reproduce the issue because one of the other included OpenCV headers might (indirectly) include imgproc_c.h, making the macro available to you. I agree that it is ugly to include from C++ a C header for a library that seemingly puts some emphasis on the C-C++ distinction (see .h vs .hpp). However, whether that was their intention or not, CV_AA appears to only be available in that header in the version of OpenCV libraries I have (i.e. the packaged APT version for Ubuntu 20.10), making this change necessary to build the project.

severin-lemaignan commented 3 years ago

...well, I guess it is not a major prbl to include it as well. Merging.