torrvision / Objectness

BING Objectness proposal estimator linux/mac/windows version implementation, runs at 1000 FPS. More in http://mmcheng.net/bing/ and also http://www.robots.ox.ac.uk/~szheng/DepthProposals.html
http://kylezheng.org/objectproposal/
BSD 3-Clause "New" or "Revised" License
190 stars 88 forks source link

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

Open chamecall opened 3 years ago

chamecall commented 3 years ago

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 commented 2 years ago

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.