Bug #2757

fix opencv 2 compatibility again

Added by V. Richter about 3 years ago. Updated about 3 years ago.

Status:ResolvedStart date:08/13/2018
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:-
Target version:-

Description

I got a fix request some weeks ago while I was on vacation:

fac7ac5    Fix headers for opencv2 and opencv3 compatibility    5 months ago    Viktor Richter

-    #include <opencv/cv.h>
-    #include <opencv/highgui.h>
+    #include <opencv2/core.hpp>
+    #include <opencv2/video.hpp>
+    #include <opencv2/highgui.hpp>

In einem Ubuntu Xenial mit einer System-Installation von opencv2 geht das aber kolossal schief <http://colossus:8080/view/famula-test/job/rsb-opencv-master-ci-deploy-lsp-famula-test/1/console>:

fatal error: opencv2/core.hpp: No such file or directory

denn der Ordner /usr/include/opencv2 enthält i.W. nur Folder. Die Datei opencv/highgui.h liest sich denn dann auch so:
#include "opencv2/core/core_c.h" 
#include "opencv2/core/core.hpp" 
#include "opencv2/highgui/highgui_c.h" 
#include "opencv2/highgui/highgui.hpp" 

So I am trying another shot at getting this project compatible with both opencv2 and opencv3.

This time I double-checked that the build works with a self built opencv3.4 and the debian opencv2.x on xenial.

The patch is attached.

0001-fix-opencv-include-for-opencv2.patch Magnifier (1.08 KB) V. Richter, 08/13/2018 12:58 PM

Associated revisions

Revision 16faa088
Added by Viktor Richter about 3 years ago

Fix opencv include for opencv2

fixes #2757

Signed-off-by: Jan Moringen <>

History

#1 Updated by Anonymous about 3 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF