Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error: error: ‘CV_INTER_NN’ was not declared in this scope. #18

Open
chamecall opened this issue Oct 27, 2020 · 1 comment

Comments

@chamecall
Copy link

Cmake executes successfully.
After that I run make and get the following error (tail of logs, before that there's only warnings):

/home/algernone/git_projects/Objectness/Src/CmShow.cpp:65:39: error: ‘CV_INTER_NN’ was not declared in this scope
  resize(m, img, Size(), scale, scale, CV_INTER_NN);
                                       ^~~~~~~~~~~
/home/algernone/git_projects/Objectness/Src/CmShow.cpp:67:22: error: ‘CV_RGB2BGR’ was not declared in this scope
   cvtColor(img, img, CV_RGB2BGR);
                      ^~~~~~~~~~
CMakeFiles/BING.dir/build.make:86: recipe for target 'CMakeFiles/BING.dir/CmShow.cpp.o' failed
make[2]: *** [CMakeFiles/BING.dir/CmShow.cpp.o] Error 1
CMakeFiles/Makefile2:142: recipe for target 'CMakeFiles/BING.dir/all' failed
make[1]: *** [CMakeFiles/BING.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

And immediately additional question.
Is that possible to compile the project for python?

@victorcionca
Copy link

This is an old problem but I've still come across it with opencv4.2.
I fixed it by manually including opencv2/imgproc/types_c.h from kyheader.h:

#include <opencv2/imgproc/types_c.h>

Hope it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants