diff --git a/debian/control b/debian/control index 34fe825cfb..a63e018d4c 100644 --- a/debian/control +++ b/debian/control @@ -29,7 +29,7 @@ Build-Depends: ant [!hppa !hurd-any !kfreebsd-any], libglu1-mesa-dev, libgoogle-glog-dev, libgphoto2-dev, - libgtk-3-dev, + libharfbuzz-dev, libjpeg-dev, liblapack-dev, libleptonica-dev, @@ -37,6 +37,7 @@ Build-Depends: ant [!hppa !hurd-any !kfreebsd-any], libilmbase-dev, libpng-dev, libprotobuf-dev, + libqt5opengl5-dev, libraw1394-dev [linux-any], libswscale-dev, libtbb2-dev [amd64 arm64 armel armhf i386 mips mips64el mipsel ppc64el s390x powerpc powerpcspe ppc64 riscv64 sh4 sparc64], @@ -52,6 +53,7 @@ Build-Depends: ant [!hppa !hurd-any !kfreebsd-any], python3-dev, dh-sequence-numpy3, python3-bs4, + qtbase5-dev, zlib1g-dev Standards-Version: 4.6.1 Vcs-Browser: https://salsa.debian.org/science-team/opencv diff --git a/debian/libopencv-contrib-dev.install b/debian/libopencv-contrib-dev.install index a9594335bf..76bce844ed 100644 --- a/debian/libopencv-contrib-dev.install +++ b/debian/libopencv-contrib-dev.install @@ -22,6 +22,11 @@ usr/include/opencv4/opencv2/ccalib/* usr/include/opencv4/opencv2/ccalib.hpp usr/lib/*/libopencv_ccalib.a usr/lib/*/libopencv_ccalib.so +# cvv +usr/include/opencv4/opencv2/cvv/* +usr/include/opencv4/opencv2/cvv.hpp +usr/lib/*/libopencv_cvv.a +usr/lib/*/libopencv_cvv.so # dpm usr/include/opencv4/opencv2/dpm.hpp usr/lib/*/libopencv_dpm.a diff --git a/debian/libopencv-contrib406.install b/debian/libopencv-contrib406.install index 9a9f6681fe..fc0c0b80ab 100644 --- a/debian/libopencv-contrib406.install +++ b/debian/libopencv-contrib406.install @@ -3,6 +3,7 @@ usr/lib/*/libopencv_barcode.so.* usr/lib/*/libopencv_bgsegm.so.* usr/lib/*/libopencv_bioinspired.so.* usr/lib/*/libopencv_ccalib.so.* +usr/lib/*/libopencv_cvv.so.* usr/lib/*/libopencv_datasets.so.* usr/lib/*/libopencv_dpm.so.* usr/lib/*/libopencv_face.so.* diff --git a/debian/patches/Build-highgui-module-with-QT-support.patch b/debian/patches/Build-highgui-module-with-QT-support.patch new file mode 100644 index 0000000000..f03c201820 --- /dev/null +++ b/debian/patches/Build-highgui-module-with-QT-support.patch @@ -0,0 +1,97 @@ +From: Victor Westerhuis +Date: Fri, 9 Sep 2022 11:07:35 +0200 +Subject: Build highgui module with QT support + +Removes the dependency on the removed non-free Milky icon set. Four +directional arrows are replaced by standard Qt icons. The other icons +are replaced by corresponding icons from the freedesktop.org Icon Naming +Specification. +--- + modules/highgui/src/window_QT.cpp | 22 +++++++++++----------- + modules/highgui/src/window_QT.qrc | 11 ----------- + 2 files changed, 11 insertions(+), 22 deletions(-) + +diff --git a/modules/highgui/src/window_QT.cpp b/modules/highgui/src/window_QT.cpp +index eba3599..97a4db5 100644 +--- a/modules/highgui/src/window_QT.cpp ++++ b/modules/highgui/src/window_QT.cpp +@@ -2037,47 +2037,47 @@ void CvWindow::createActions() + QWidget* view = myView->getWidget(); + + //if the shortcuts are changed in window_QT.h, we need to update the tooltip manually +- vect_QActions[0] = new QAction(QIcon(":/left-icon"), "Panning left (CTRL+arrowLEFT)", this); ++ vect_QActions[0] = new QAction(style()->standardIcon(QStyle::SP_ArrowLeft), "Panning left (CTRL+arrowLEFT)", this); + vect_QActions[0]->setIconVisibleInMenu(true); + QObject::connect(vect_QActions[0], SIGNAL(triggered()), view, SLOT(siftWindowOnLeft())); + +- vect_QActions[1] = new QAction(QIcon(":/right-icon"), "Panning right (CTRL+arrowRIGHT)", this); ++ vect_QActions[1] = new QAction(style()->standardIcon(QStyle::SP_ArrowRight), "Panning right (CTRL+arrowRIGHT)", this); + vect_QActions[1]->setIconVisibleInMenu(true); + QObject::connect(vect_QActions[1], SIGNAL(triggered()), view, SLOT(siftWindowOnRight())); + +- vect_QActions[2] = new QAction(QIcon(":/up-icon"), "Panning up (CTRL+arrowUP)", this); ++ vect_QActions[2] = new QAction(style()->standardIcon(QStyle::SP_ArrowUp), "Panning up (CTRL+arrowUP)", this); + vect_QActions[2]->setIconVisibleInMenu(true); + QObject::connect(vect_QActions[2], SIGNAL(triggered()), view, SLOT(siftWindowOnUp())); + +- vect_QActions[3] = new QAction(QIcon(":/down-icon"), "Panning down (CTRL+arrowDOWN)", this); ++ vect_QActions[3] = new QAction(style()->standardIcon(QStyle::SP_ArrowDown), "Panning down (CTRL+arrowDOWN)", this); + vect_QActions[3]->setIconVisibleInMenu(true); + QObject::connect(vect_QActions[3], SIGNAL(triggered()), view, SLOT(siftWindowOnDown()) ); + +- vect_QActions[4] = new QAction(QIcon(":/zoom_x1-icon"), "Zoom x1 (CTRL+P)", this); ++ vect_QActions[4] = new QAction(QIcon::fromTheme("zoom-original"), "Zoom x1 (CTRL+P)", this); + vect_QActions[4]->setIconVisibleInMenu(true); + QObject::connect(vect_QActions[4], SIGNAL(triggered()), view, SLOT(resetZoom())); + +- vect_QActions[5] = new QAction(QIcon(":/imgRegion-icon"), tr("Zoom x%1 (see label) (CTRL+X)").arg(threshold_zoom_img_region), this); ++ vect_QActions[5] = new QAction(QIcon::fromTheme("zoom-fit-best"), tr("Zoom x%1 (see label) (CTRL+X)").arg(threshold_zoom_img_region), this); + vect_QActions[5]->setIconVisibleInMenu(true); + QObject::connect(vect_QActions[5], SIGNAL(triggered()), view, SLOT(imgRegion())); + +- vect_QActions[6] = new QAction(QIcon(":/zoom_in-icon"), "Zoom in (CTRL++)", this); ++ vect_QActions[6] = new QAction(QIcon::fromTheme("zoom-in"), "Zoom in (CTRL++)", this); + vect_QActions[6]->setIconVisibleInMenu(true); + QObject::connect(vect_QActions[6], SIGNAL(triggered()), view, SLOT(ZoomIn())); + +- vect_QActions[7] = new QAction(QIcon(":/zoom_out-icon"), "Zoom out (CTRL+-)", this); ++ vect_QActions[7] = new QAction(QIcon::fromTheme("zoom-out"), "Zoom out (CTRL+-)", this); + vect_QActions[7]->setIconVisibleInMenu(true); + QObject::connect(vect_QActions[7], SIGNAL(triggered()), view, SLOT(ZoomOut())); + +- vect_QActions[8] = new QAction(QIcon(":/save-icon"), "Save current image (CTRL+S)", this); ++ vect_QActions[8] = new QAction(QIcon::fromTheme("document-save"), "Save current image (CTRL+S)", this); + vect_QActions[8]->setIconVisibleInMenu(true); + QObject::connect(vect_QActions[8], SIGNAL(triggered()), view, SLOT(saveView())); + +- vect_QActions[9] = new QAction(QIcon(":/copy_clipbrd-icon"), "Copy image to clipboard (CTRL+C)", this); ++ vect_QActions[9] = new QAction(QIcon::fromTheme("edit-copy"), "Copy image to clipboard (CTRL+C)", this); + vect_QActions[9]->setIconVisibleInMenu(true); + QObject::connect(vect_QActions[9], SIGNAL(triggered()), view, SLOT(copy2Clipbrd())); + +- vect_QActions[10] = new QAction(QIcon(":/properties-icon"), "Display properties window (CTRL+P)", this); ++ vect_QActions[10] = new QAction(QIcon::fromTheme("document-properties"), "Display properties window (CTRL+P)", this); + vect_QActions[10]->setIconVisibleInMenu(true); + QObject::connect(vect_QActions[10], SIGNAL(triggered()), this, SLOT(displayPropertiesWin())); + +diff --git a/modules/highgui/src/window_QT.qrc b/modules/highgui/src/window_QT.qrc +index efdd8c2..f7e6f37 100644 +--- a/modules/highgui/src/window_QT.qrc ++++ b/modules/highgui/src/window_QT.qrc +@@ -1,16 +1,5 @@ + + +- files_Qt/Milky/48/28.png +- files_Qt/Milky/48/23.png +- files_Qt/Milky/48/19.png +- files_Qt/Milky/48/24.png +- files_Qt/Milky/48/27.png +- files_Qt/Milky/48/61.png +- files_Qt/Milky/48/106.png +- files_Qt/Milky/48/107.png +- files_Qt/Milky/48/7.png +- files_Qt/Milky/48/43.png +- files_Qt/Milky/48/38.png + files_Qt/stylesheet_trackbar.qss + + diff --git a/debian/patches/series b/debian/patches/series index 90c03b8b91..55cdbb57b5 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ change_jquery.js_path face-no-download.patch cmake-dont-install-inexistent-files.patch ffmpeg5.patch +Build-highgui-module-with-QT-support.patch diff --git a/debian/rules b/debian/rules index d3606b3f8e..802fd8886e 100755 --- a/debian/rules +++ b/debian/rules @@ -57,9 +57,6 @@ endif # For Java export JAVA_HOME=/usr/lib/jvm/default-java -# NOTES: -# 1. we set WITH_QT=OFF because files under modules/highgui/src/files_Qt/Milky -# have been filtered, which are required for the QT build. CMAKE_FLAGS = \ -GNinja \ -DANT_EXECUTABLE=/usr/bin/ant \ @@ -97,7 +94,7 @@ CMAKE_FLAGS = \ -DWITH_GDCM=ON \ -DWITH_GSTREAMER=ON \ -DWITH_GPHOTO2=ON \ - -DWITH_GTK=ON \ + -DWITH_GTK=OFF \ -DWITH_IPP=OFF \ -DWITH_ITT=OFF \ -DWITH_JASPER=OFF \ @@ -110,7 +107,7 @@ CMAKE_FLAGS = \ -DWITH_PNG=ON \ -DWITH_PROTOBUF=ON \ -DWITH_PVAPI=ON \ - -DWITH_QT=OFF \ + -DWITH_QT=5 \ -DWITH_QUIRC=OFF \ -DWITH_TIFF=ON \ -DWITH_UNICAP=OFF \