Re: [Cin] opencv build trim
On Thursday, April 28, 2022, Andrea paz via Cin wrote: > No, I simply copied the six OpenCV plugins from CinGG's git. I copied > them to .../bin/plugins/video/. > These were not being recognized though. I was using the build with > external ffmpeg 5 (--without-thirdparty); now that I tried the normal > CinGG build from git, I have no more problems and I have the OpenCV > plugins working. according to https://docs.opencv.org/4.x/db/d05/tutorial_config_reference.html you can try to disable opencv's use of openexr (!) by using cmake option WITH_OPENEXR=OFF and also disable all ffmpeg/gstreamer stuff too... > -- > Cin mailing list > Cin@lists.cinelerra-gg.org > https://lists.cinelerra-gg.org/mailman/listinfo/cin > -- Cin mailing list Cin@lists.cinelerra-gg.org https://lists.cinelerra-gg.org/mailman/listinfo/cin
Re: [Cin] opencv build trim
No, I simply copied the six OpenCV plugins from CinGG's git. I copied them to .../bin/plugins/video/. These were not being recognized though. I was using the build with external ffmpeg 5 (--without-thirdparty); now that I tried the normal CinGG build from git, I have no more problems and I have the OpenCV plugins working. -- Cin mailing list Cin@lists.cinelerra-gg.org https://lists.cinelerra-gg.org/mailman/listinfo/cin
Re: [Cin] opencv build trim
Andrea, I will test this today after I get my GIT checkin done and see if I have the same problem. Do you mean you copied the filters from another run or did you actually compile with the OpenCV downloaded from the website? On Thu, Apr 28, 2022 at 1:42 AM Andrea paz via Cin < cin@lists.cinelerra-gg.org> wrote: > After a long time I tried to copy the OpenCV filters inside CinGG > (don't compile them while I compile CinGG). At startup they are not > loaded. > -- > Cin mailing list > Cin@lists.cinelerra-gg.org > https://lists.cinelerra-gg.org/mailman/listinfo/cin > -- Cin mailing list Cin@lists.cinelerra-gg.org https://lists.cinelerra-gg.org/mailman/listinfo/cin
Re: [Cin] opencv build trim
After a long time I tried to copy the OpenCV filters inside CinGG (don't compile them while I compile CinGG). At startup they are not loaded. -- Cin mailing list Cin@lists.cinelerra-gg.org https://lists.cinelerra-gg.org/mailman/listinfo/cin
Re: [Cin] opencv build trim
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 @@ -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 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... > > > -- Cin mailing list Cin@lists.cinelerra-gg.org https://lists.cinelerra-gg.org/mailman/listinfo/cin
[Cin] opencv build trim
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... From 72aace7d019acad6020e4eb7a2b73d60e83da4b6 Mon Sep 17 00:00:00 2001 From: Andrew Randrianasulu Date: Sat, 16 Apr 2022 00:48:58 +0300 Subject: [PATCH] Trim opencv build, add std=c++11 --- cinelerra-5.1/opencv_build | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cinelerra-5.1/opencv_build b/cinelerra-5.1/opencv_build index 736e1d90..7be18228 100644 --- a/cinelerra-5.1/opencv_build +++ b/cinelerra-5.1/opencv_build @@ -49,6 +49,7 @@ jobs:=-j$(shell echo $$(($(cpus) + $(cpus)/2 +2))) #opencv4 breaks SIFT/SURF findobj CFLAGS += -I$(opencv_prefix)/include/opencv4 CFLAGS += -I$(opencv_prefix)/include +CFLAGS += -std=c++11 ifeq ($(src),git) $(opencv).src: @@ -83,6 +84,9 @@ $(opencv)/build: $(opencv).src -DINSTALL_C_EXAMPLES=OFF \ -DINSTALL_PYTHON_EXAMPLES=OFF \ -DBUILD_EXAMPLES=OFF .. \ + -DBUILD_PERF_TESTS=OFF \ + -DBUILD_TESTS=OFF \ + -DBUILD_opencv_apps=OFF \ -DBUILD_opencv_python3=no \ -DCMAKE_INSTALL_PREFIX=/usr/local \ -DOPENCV_EXTRA_MODULES_PATH="$(opencv)_contrib/modules/" @@ -106,10 +110,13 @@ $(opencv)/build: $(opencv).src -DINSTALL_PYTHON_EXAMPLES=ON \ -DBUILD_EXAMPLES=ON .. \ -DBUILD_opencv_python3=no \ + -DBUILD_PERF_TESTS=OFF \ + -DBUILD_TESTS=OFF \ + -DBUILD_opencv_apps=OFF \ -DCMAKE_INSTALL_PREFIX=/usr/local \ -DOPENCV_EXTRA_MODULES_PATH="$(opencv)_contrib/modules/" -SYSLIB := $(lastword $(wildcard /usr/lib /usrlib32 /usr/lib64)) +SYSLIB := $(lastword $(wildcard /usr/lib /usr/lib32 /usr/lib64)) CVLIBS := $(dir $(shell find $(opencv_prefix) -name libopencv_core.so)) LFLAGS += -L$(CVLIBS) $(patsubst $(CVLIBS)/lib%.so,-l%,$(wildcard $(CVLIBS)/libopencv_*.so)) LFLAGS += $(patsubst $(SYSLIB)/lib%.so,-l%,$(wildcard $(SYSLIB)/lib{Half,Imath,Ilm,Iex}*.so)) @@ -118,7 +125,7 @@ static_incs := else ifeq ($(bld),sys) $(opencv)/build: -SYSLIB := $(lastword $(wildcard /usr/lib /usrlib32 /usr/lib64)) +SYSLIB := $(lastword $(wildcard /usr/lib /usr/lib32 /usr/lib64)) LFLAGS += $(patsubst $(SYSLIB)/lib%.so,-l%,$(wildcard $(SYSLIB)/libopencv_*.so)) LFLAGS += $(patsubst $(SYSLIB)/lib%.so,-l%,$(wildcard $(SYSLIB)/lib{Half,Imath,Ilm,Iex}*.so)) static_libs := -- 2.35.3 -- Cin mailing list Cin@lists.cinelerra-gg.org https://lists.cinelerra-gg.org/mailman/listinfo/cin