GNU bug report logs -
#64945
[PATCH] gnu: opencv: Add descriptors for xfeatures2d.
Previous Next
Reported by: Ricardo Wurmus <rekado <at> elephly.net>
Date: Sun, 30 Jul 2023 08:14:02 UTC
Severity: normal
Tags: patch
Done: Ricardo Wurmus <rekado <at> elephly.net>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 64945 in the body.
You can then email your comments to 64945 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#64945
; Package
guix-patches
.
(Sun, 30 Jul 2023 08:14:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ricardo Wurmus <rekado <at> elephly.net>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sun, 30 Jul 2023 08:14:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/image-processing.scm (opencv)[native-inputs]: Add boost and vgg
descriptors.
[arguments]: Place descriptor files in expected locations; do not disable
xfeatures2d feature.
---
gnu/packages/image-processing.scm | 48 ++++++++++++++++++++++++++-----
1 file changed, 41 insertions(+), 7 deletions(-)
diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index 965eca82b7..b6b2457f3b 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -583,12 +583,8 @@ (define-public opencv
;; would get a compile error later:
"-DPROTOBUF_UPDATE_FILES=ON"
- ;; xfeatures2d disabled, because it downloads extra binaries from
- ;; https://github.com/opencv/opencv_3rdparty
- ;; defined in xfeatures2d/cmake/download_{vgg|bootdesc}.cmake
- ;; Cmp this bug entry:
- ;; https://github.com/opencv/opencv_contrib/issues/1131
- "-DBUILD_opencv_xfeatures2d=OFF")
+ ;; For xfeatures2d.
+ "-DOPENCV_SKIP_FEATURES2D_DOWNLOADING=ON")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'disable-broken-tests
@@ -641,7 +637,17 @@ (define-public opencv
(copy-recursively (assoc-ref inputs "opencv-extra")
"../opencv-extra")
(copy-recursively (assoc-ref inputs "opencv-contrib")
- "../opencv-contrib")))
+ "../opencv-contrib")
+
+ (substitute* "../opencv-contrib/modules/xfeatures2d/CMakeLists.txt"
+ (("download_(boost|vgg)_descriptors") "#"))
+ (copy-recursively (assoc-ref inputs "opencv-3rdparty-boost")
+ "../downloads/xfeatures2d")
+ (for-each (lambda (file)
+ (chmod file #o644))
+ (find-files "../downloads/xfeatures2d" "."))
+ (copy-recursively (assoc-ref inputs "opencv-3rdparty-vgg")
+ "../downloads/xfeatures2d")))
(add-after 'build 'do-not-install-3rdparty-file
(lambda _
(substitute* "cmake_install.cmake"
@@ -659,6 +665,34 @@ (define-public opencv
(native-inputs
`(("pkg-config" ,pkg-config)
("xorg-server" ,xorg-server-for-tests) ;For running the tests
+ ;; These are files that are derived from the binary descriptors that
+ ;; are part of the BinBoost package. The BinBoost package is released
+ ;; under GPLv2+. See
+ ;; https://www.epfl.ch/labs/cvlab/research/descriptors-and-keypoints/research-detect-binboost/
+ ;; See xfeatures2d/cmake/download_boostdesc.cmake for commit hash.
+ ("opencv-3rdparty-boost"
+ ,(let ((commit "34e4206aef44d50e6bbcd0ab06354b52e7466d26"))
+ (origin
+ (method git-fetch)
+ (uri (git-reference (url "https://github.com/opencv/opencv_3rdparty")
+ (commit commit)))
+ (file-name (git-file-name "opencv_3rdparty" commit))
+ (sha256
+ (base32
+ "13yig1xhvgghvxspxmdidss5lqiikpjr0ddm83jsi0k85j92sn62")))))
+ ;; These are the Visual Geometry Group descriptors, released under
+ ;; BSD-3. They are generated files produced by the DLCO framework.
+ ;; See xfeatures2d/cmake/download_vgg.cmake for commit hash.
+ ("opencv-3rdparty-vgg"
+ ,(let ((commit "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d"))
+ (origin
+ (method git-fetch)
+ (uri (git-reference (url "https://github.com/opencv/opencv_3rdparty")
+ (commit commit)))
+ (file-name (git-file-name "opencv_3rdparty" commit))
+ (sha256
+ (base32
+ "0r9fam8dplyqqsd3qgpnnfgf9l7lj44di19rxwbm8mxiw0rlcdvy")))))
("opencv-extra"
,(origin
(method git-fetch)
base-commit: b5af0b9c016a65bf32b06a4f118c2ed48f3a80b3
prerequisite-patch-id: db4d32d59a5582f0ed3d20d572fb50a0305c9b5b
prerequisite-patch-id: f18e5f68b072b6554aec1dccbf168ab00ca4c68d
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#64945
; Package
guix-patches
.
(Sun, 17 Sep 2023 13:20:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 64945 <at> debbugs.gnu.org (full text, mbox):
Hi,
Ricardo Wurmus <rekado <at> elephly.net> skribis:
> * gnu/packages/image-processing.scm (opencv)[native-inputs]: Add boost and vgg
> descriptors.
> [arguments]: Place descriptor files in expected locations; do not disable
> xfeatures2d feature.
I’m not familiar with OpenCV but on the surface it LGTM. Minor nits:
> + (substitute* "../opencv-contrib/modules/xfeatures2d/CMakeLists.txt"
> + (("download_(boost|vgg)_descriptors") "#"))
Maybe add a comment above like “;; Disable downloads of Boost and VGG.”.
> + (for-each (lambda (file)
> + (chmod file #o644))
Maybe use ‘make-file-writable’.
Thank you. :-)
Ludo’.
Reply sent
to
Ricardo Wurmus <rekado <at> elephly.net>
:
You have taken responsibility.
(Sun, 24 Sep 2023 19:21:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Ricardo Wurmus <rekado <at> elephly.net>
:
bug acknowledged by developer.
(Sun, 24 Sep 2023 19:21:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 64945-done <at> debbugs.gnu.org (full text, mbox):
Ludovic Courtès <ludo <at> gnu.org> writes:
> Hi,
>
> Ricardo Wurmus <rekado <at> elephly.net> skribis:
>
>> * gnu/packages/image-processing.scm (opencv)[native-inputs]: Add boost and vgg
>> descriptors.
>> [arguments]: Place descriptor files in expected locations; do not disable
>> xfeatures2d feature.
>
> I’m not familiar with OpenCV but on the surface it LGTM. Minor nits:
>
>> + (substitute* "../opencv-contrib/modules/xfeatures2d/CMakeLists.txt"
>> + (("download_(boost|vgg)_descriptors") "#"))
>
> Maybe add a comment above like “;; Disable downloads of Boost and VGG.”.
>
>> + (for-each (lambda (file)
>> + (chmod file #o644))
>
> Maybe use ‘make-file-writable’.
Thanks, I made these changes and pushed it with commit
be5bec47f7942a5e4d2a30eadd9a6fa4c715e88b.
--
Ricardo
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 23 Oct 2023 11:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 199 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.