[Cin] opencv build trim

Andrew Randrianasulu randrianasulu at gmail.com
Sat Apr 16 19:51:10 CEST 2022


on topic of opencv I instalked opencv 4.5.5 on termux and tried to build
cingg plugins against this.

most plugins worked with hack - but for some reason final link faild to add
opencv libs (no pkgconfig for them, it seems?) and so resulted plugins
aborted cin on load.


hack:

$ git diff thirdparty/Makefile plugins/Makefile
diff --git a/cinelerra-5.1/plugins/Makefile b/cinelerra-5.1/plugins/Makefile
index e6718432..cb3a10e8 100644
--- a/cinelerra-5.1/plugins/Makefile
+++ b/cinelerra-5.1/plugins/Makefile
@@ -8,7 +8,8 @@ endif
 ifneq ($(WANT_OPENCV), no)
 want_var:=$(WANT_OPENCV)
 include $(TOPDIR)/opencv_build
-OPENCV_OBJS := findobj flowobj gaborobj moveobj stylizeobj puzzleobj
+#OPENCV_OBJS := findobj flowobj gaborobj moveobj stylizeobj puzzleobj
+OPENCV_OBJS := flowobj gaborobj moveobj stylizeobj findobj
 $(OPENCV_OBJS): opencv
 endif
 ifneq ($(WANT_CUDA), no)


err, not all changes...



$ git diff thirdparty/Makefile plugins/Makefile plugins
diff --git a/cinelerra-5.1/plugins/Makefile b/cinelerra-5.1/plugins/Makefile
index e6718432..cb3a10e8 100644
--- a/cinelerra-5.1/plugins/Makefile
+++ b/cinelerra-5.1/plugins/Makefile
@@ -8,7 +8,8 @@ endif
 ifneq ($(WANT_OPENCV), no)
 want_var:=$(WANT_OPENCV)
 include $(TOPDIR)/opencv_build
-OPENCV_OBJS := findobj flowobj gaborobj moveobj stylizeobj puzzleobj
+#OPENCV_OBJS := findobj flowobj gaborobj moveobj stylizeobj puzzleobj
+OPENCV_OBJS := flowobj gaborobj moveobj stylizeobj findobj
 $(OPENCV_OBJS): opencv
 endif
 ifneq ($(WANT_CUDA), no)
diff --git a/cinelerra-5.1/plugins/findobj/findobj.h
b/cinelerra-5.1/plugins/findobj/findobj.h
index 2bea44af..541e9e6f 100644
--- a/cinelerra-5.1/plugins/findobj/findobj.h
+++ b/cinelerra-5.1/plugins/findobj/findobj.h
@@ -50,7 +50,7 @@
 #include "opencv2/core/types.hpp"
 #include "opencv2/core/mat.hpp"
 #include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/xfeatures2d.hpp"
+#include "opencv2/features2d.hpp"
 #include "opencv2/calib3d.hpp"
 #include "opencv2/flann/defines.h"
 #include "opencv2/flann/params.h"
@@ -60,7 +60,7 @@

 using namespace std;
 using namespace cv;
-using namespace cv::xfeatures2d;
+//using namespace cv::xfeatures2d;
 using namespace cvflann;

 // enabled detectors
diff --git a/cinelerra-5.1/plugins/puzzleobj/puzzleobj.h
b/cinelerra-5.1/plugins/puzzleobj/puzzleobj.h
index 197522f3..ebfe1881 100644
--- a/cinelerra-5.1/plugins/puzzleobj/puzzleobj.h
+++ b/cinelerra-5.1/plugins/puzzleobj/puzzleobj.h
@@ -28,7 +28,7 @@
 #include "opencv2/core/mat.hpp"
 #include "opencv2/calib3d.hpp"
 #include "opencv2/photo.hpp"
-#include "opencv2/ximgproc.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/video/video.hpp"

 #include <vector>
@@ -36,7 +36,7 @@

 using namespace std;
 using namespace cv;
-using namespace cv::ximgproc;
+//using namespace cv::ximgproc;

 class PuzzleObjConfig;
 class PuzzleObj;
(END)

===

puzzleobj failed to build anyway, so I commented it out.

may be on more standart Linux dynamuc/system build with this hack still
will work (produce usable plugins?)

On Saturday, April 16, 2022, Andrew Randrianasulu <randrianasulu at gmail.com>
wrote:

> https://github.com/Randrianasulu/CinelerraGG-slackbuild/blob/master/
> openCV4-static-gcc5_more-disable-3.diff
>
> basically re-applied locally because opencv build eats a bit too much
> space...
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20220416/87678c8a/attachment.htm>


More information about the Cin mailing list