Hi again, I seriously need help to port the code to OpenCV 4. Unfortunately I did not found a porting guide. Could you help? Kind regards Andreas.
On Fri, Jan 24, 2020 at 04:09:31PM +0100, Andreas Tille wrote: > On Tue, Jan 07, 2020 at 05:15:14PM +0100, Samuel Thibault wrote: > > > > pkg-config file has been marked deprecated by upstream. > > > > > > I admit I have no idea what to do now. Any hint? > > > > Apparently there is a opencv4.pc file? > > With this patch[1] opencv4 is detected - but the code is not compatible > with opencv4. I get lots of errors like this: > > ... > g++ -DHAVE_CONFIG_H -I. -Isrc/processor/headers/ > -DINSTALLDIR='"/usr/share/opencfu"' -pthread -I/usr/include/gtkmm-2.4 > -I/usr/lib/x86_64-linux-gnu/gtkmm-2.4/include -I/usr/include/atkmm-1.6 > -I/usr/include/gtk-unix-print-2.0 -I/usr/include/gtk-2.0 > -I/usr/include/gdkmm-2.4 -I/usr/lib/x86_64-linux-gnu/gdkmm-2.4/include > -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include > -I/usr/include/pangomm-1.4 -I/usr/lib/x86_64-linux-gnu/pangomm-1.4/include > -I/usr/include/cairomm-1.0 -I/usr/lib/x86_64-linux-gnu/cairomm-1.0/include > -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include > -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo > -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount > -I/usr/include/blkid -I/usr/include/pango-1.0 -I/usr/include/harfbuzz > -I/usr/include/ pango-1.0 -I/usr/include/fribidi -I/usr/include/uuid > -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/glibmm-2.4 > -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/sigc++-2.0 > -I/usr/ lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/glib-2.0 > -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Isrc/gui/headers/ -Wdate-time > -D_FORTIFY_SOURCE=2 -I/usr/include/opencv4/opencv -I/usr/include/ opencv4 > -fopenmp -Isrc/ -Wall -g -O2 -fdebug-prefix-map=/build/opencfu-3.9.0=. > -fstack-protector-strong -Wformat -Werror=format-security -c -o > src/processor/src/opencfu-ArgumentParser.o `test -f 'src/ > processor/src/ArgumentParser.cpp' || echo > './'`src/processor/src/ArgumentParser.cpp > In file included from src/processor/headers/ProcessingOptions.hpp:8, > from src/processor/headers/ArgumentParser.hpp:5, > from src/main.cpp:21: > src/processor/headers/MaskROI.hpp: In constructor 'MaskROI::MaskROI(const > string&)': > src/processor/headers/MaskROI.hpp:16:29: error: 'CV_LOAD_IMAGE_GRAYSCALE' was > not declared in this scope > 16 | > cv::imread(path,CV_LOAD_IMAGE_GRAYSCALE).copyTo(m_original_mat); > | ^~~~~~~~~~~~~~~~~~~~~~~ > src/processor/headers/MaskROI.hpp: In constructor 'MaskROI::MaskROI(cv::Mat, > int)': > src/processor/headers/MaskROI.hpp:25:13: warning: this 'if' clause does not > guard... [-Wmisleading-indentation] > 25 | if(typepp != MASK_TYPE_NONE) > | ^~ > src/processor/headers/MaskROI.hpp:27:17: note: ...this statement, but the > latter is misleadingly indented as if it were guarded by the 'if' > 27 | img.copyTo(m_mat); > | ^~~ > In file included from src/processor/headers/ArgumentParser.hpp:5, > from src/main.cpp:21: > src/processor/headers/ProcessingOptions.hpp: In member function 'bool > ProcessingOptions::setImage(std::string)': > src/processor/headers/ProcessingOptions.hpp:114:46: error: > 'CV_LOAD_IMAGE_ANYDEPTH' was not declared in this scope > 114 | cv::Mat tmpImg = cv::imread(str, CV_LOAD_IMAGE_ANYDEPTH | > CV_LOAD_IMAGE_COLOR); > | ^~~~~~~~~~~~~~~~~~~~~~ > src/processor/headers/ProcessingOptions.hpp:114:71: error: > 'CV_LOAD_IMAGE_COLOR' was not declared in this scope > 114 | cv::Mat tmpImg = cv::imread(str, CV_LOAD_IMAGE_ANYDEPTH | > CV_LOAD_IMAGE_COLOR); > | > ^~~~~~~~~~~~~~~~~~~ > ... > > > When trying to build opencfu. Is there any short guideline how to port from > opencv < 4 to opencv version 4? > > Any help would be appreciated > > Andreas, > > > [1] > https://salsa.debian.org/med-team/opencfu/blob/master/debian/patches/0017_opencv4.patch > > > -- > http://fam-tille.de > > _______________________________________________ > Debian-med-packaging mailing list > debian-med-packag...@alioth-lists.debian.net > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-packaging -- http://fam-tille.de