From unknown Fri Aug 15 16:57:39 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#64945] [PATCH] gnu: opencv: Add descriptors for xfeatures2d. Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 30 Jul 2023 08:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64945 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64945@debbugs.gnu.org Cc: Ricardo Wurmus X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16907048277535 (code B ref -1); Sun, 30 Jul 2023 08:14:02 +0000 Received: (at submit) by debbugs.gnu.org; 30 Jul 2023 08:13:47 +0000 Received: from localhost ([127.0.0.1]:49291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQ1Yg-0001xS-Sg for submit@debbugs.gnu.org; Sun, 30 Jul 2023 04:13:47 -0400 Received: from lists.gnu.org ([2001:470:142::17]:34066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQ1Yf-0001xE-1K for submit@debbugs.gnu.org; Sun, 30 Jul 2023 04:13:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qQ1YZ-00014X-6b for guix-patches@gnu.org; Sun, 30 Jul 2023 04:13:39 -0400 Received: from sender3-of-o58.zoho.com ([136.143.184.58]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qQ1YU-0001iC-R6 for guix-patches@gnu.org; Sun, 30 Jul 2023 04:13:38 -0400 Delivered-To: rekado@elephly.net ARC-Seal: i=1; a=rsa-sha256; t=1690704807; cv=none; d=zohomail.com; s=zohoarc; b=F77g0XOsudPKIEMs15BN0mR6lUo5waRlEQopvf3eLzigHdCuw/7bOkASpkOv/oWoJL5JBOlKuuWE8FlanogmV0zAjZZiUs+S9N/yn4gZAnzhUp6PtkMTGC7nlfoSRYdlx6SgrWg7S+Q1OcIgh27szN+cP4mtZ7jPcbNqTMGFibQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1690704807; h=Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=P3bEsqZw5Nay4fnH/k4c0h4zUaEPjQPqUIy/+774z8o=; b=km9WOdpr8LxM2nuMxvMhkMU2ycIIDhJoF7vP0gybxQhhxen8vOvksbO0FOdT3AjVqupcTqNZLGYsFX2LqcBl+dDENiX8NC8QnG9eZ4BZN8GMr7CbK/cJkX+0jlvtzYXX240DmVCwmSjFQOi35nyG6t3UW8rCtC1UpwEPXyeR10A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1690704807; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=P3bEsqZw5Nay4fnH/k4c0h4zUaEPjQPqUIy/+774z8o=; b=Ca7IWnq2yMPIVQwL4Pv93UCnQnVibB8W/GnFpGk4g+KBld3ESQZn/gOm4hQz1L8H czygLmaGCXBT73Ebs4VoZomH5FpYkT+1wOlVNHG2Qi4KT1R7XwZ3ofOuwlaPZ6CvhHU qQ5hvn/QtSJzSae3HgCB505XzicV4dpmJqVXB56g= Received: from localhost (21-108-142-46.pool.kielnet.net [46.142.108.21]) by mx.zohomail.com with SMTPS id 16907048048091020.4564604942569; Sun, 30 Jul 2023 01:13:24 -0700 (PDT) From: Ricardo Wurmus Date: Sun, 30 Jul 2023 10:13:20 +0200 Message-ID: <0e5d8492b0300c16d376cb41f3589cdcf789d31b.1690704800.git.rekado@elephly.net> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.184.58; envelope-from=rekado@elephly.net; helo=sender3-of-o58.zoho.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * 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 From unknown Fri Aug 15 16:57:39 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#64945] [PATCH] gnu: opencv: Add descriptors for xfeatures2d. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 17 Sep 2023 13:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64945 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ricardo Wurmus Cc: 64945@debbugs.gnu.org Received: via spool by 64945-submit@debbugs.gnu.org id=B64945.169495674210709 (code B ref 64945); Sun, 17 Sep 2023 13:20:01 +0000 Received: (at 64945) by debbugs.gnu.org; 17 Sep 2023 13:19:02 +0000 Received: from localhost ([127.0.0.1]:49498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhrfy-0002mf-Bq for submit@debbugs.gnu.org; Sun, 17 Sep 2023 09:19:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhrfv-0002m7-Nb for 64945@debbugs.gnu.org; Sun, 17 Sep 2023 09:19:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qhrfi-0002uG-NV; Sun, 17 Sep 2023 09:18:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=yB5eJ2XavOF/QehQE8RwjGb6ilfTEMUKTpWOUO3Uo10=; b=kUyOrhpuInOJWUewpZdf YJygiMq2yWs6NbMnc2EGfVv1nFePr73/P9PgeaYoX0nq8pZhtlb2pVK9WdfuyiNNvkYK35Lo7CBSk 0FuvKokUU0MByWl3uXYfmhGvV8G7Q0YQCXKWVC2T5XLp/XE/LVSi+lQF7GNHoohY46qsqQ5wBfDiQ bfg/fE1/G4tfXqx2MSIdSQqqWmVMrT+I5lhA/5E+u6RnV/6bVfSL5TCONap6JHYgC5cwzznZCMmxg 8wcrVbhCsDBC5L31VBIGxF51BuXG+Rt28QjFkA79EJvtHg4GNqCK8qxN60alLQPWvISq8H+rq+jB0 uivnH3nIKT15uA==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <0e5d8492b0300c16d376cb41f3589cdcf789d31b.1690704800.git.rekado@elephly.net> Date: Sun, 17 Sep 2023 15:18:44 +0200 In-Reply-To: <0e5d8492b0300c16d376cb41f3589cdcf789d31b.1690704800.git.rekado@elephly.net> (Ricardo Wurmus's message of "Sun, 30 Jul 2023 10:13:20 +0200") Message-ID: <871qexx7ij.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Ricardo Wurmus skribis: > * gnu/packages/image-processing.scm (opencv)[native-inputs]: Add boost an= d vgg > descriptors. > [arguments]: Place descriptor files in expected locations; do not disable > xfeatures2d feature. I=E2=80=99m not familiar with OpenCV but on the surface it LGTM. Minor nit= s: > + (substitute* "../opencv-contrib/modules/xfeatures2d/CMakeLi= sts.txt" > + (("download_(boost|vgg)_descriptors") "#")) Maybe add a comment above like =E2=80=9C;; Disable downloads of Boost and V= GG.=E2=80=9D. > + (for-each (lambda (file) > + (chmod file #o644)) Maybe use =E2=80=98make-file-writable=E2=80=99. Thank you. :-) Ludo=E2=80=99. From unknown Fri Aug 15 16:57:39 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Ricardo Wurmus Subject: bug#64945: closed (Re: bug#64945: [PATCH] gnu: opencv: Add descriptors for xfeatures2d.) Message-ID: References: <87edin5qfx.fsf@elephly.net> <0e5d8492b0300c16d376cb41f3589cdcf789d31b.1690704800.git.rekado@elephly.net> X-Gnu-PR-Message: they-closed 64945 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 64945@debbugs.gnu.org Date: Sun, 24 Sep 2023 19:21:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1695583261-31217-1" This is a multi-part message in MIME format... ------------=_1695583261-31217-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #64945: [PATCH] gnu: opencv: Add descriptors for xfeatures2d. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 64945@debbugs.gnu.org. --=20 64945: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D64945 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1695583261-31217-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 64945-done) by debbugs.gnu.org; 24 Sep 2023 19:20:35 +0000 Received: from localhost ([127.0.0.1]:43625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkUee-00086V-OS for submit@debbugs.gnu.org; Sun, 24 Sep 2023 15:20:35 -0400 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21145) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkUeZ-00086H-T7 for 64945-done@debbugs.gnu.org; Sun, 24 Sep 2023 15:20:31 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1695583207; cv=none; d=zohomail.com; s=zohoarc; b=XekA5v/jOasUvxIVf+NePdD1pVgNPtXavvPl4RHELTuuJbjt+ku4Y/xEbsVk4m7+hmUXLZxIqi8ncj/j6Pvm+pdR3Nh0AESCM7iP2GEhQXqn9C18svjGv6A71fBT2eYm2Ln/uU3xv5BbX74afWPBzsKd1+3sIln/mHDQNd0O7aM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695583207; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=ZRkyE0jjPHyEIHb04Ri/UnIRWmhQrzRAebuI3fXdwC0=; b=drq8O8Gwe03M1Ot0iNSYY1YvPv9/NeyqP5DwMOsx9LzHEqS0g7qyT13eUiXBTUJAOs7unHTiU+QWIqODaFoyq8zbNvUrJtMoSTFnN1kV7od9dDVs4AlJFnlt3Bk0J3yO/UuLrUeVPVdsrapqyLJuMIfTPY6cseCSHVm+g8xyJPs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1695583207; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:In-reply-to:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=ZRkyE0jjPHyEIHb04Ri/UnIRWmhQrzRAebuI3fXdwC0=; b=FYSqJFFnPlAUuVfp3o9DJUxIRrBusTI6Jh16XJzxNu/1IHAL32Gbj0btKKrV7+An zBLiLeQOMZ0Jv5IqrbsqobiXrFaTVz+v6HspsjLEAXRWLR/7KNMywpF61kerBL3WWJn HwwubD/RDQqPdLUUEW65RhWATFqiWJ4yOBe7uufc= Received: from localhost (17-122-142-46.pool.kielnet.net [46.142.122.17]) by mx.zohomail.com with SMTPS id 1695583205447589.6312744393148; Sun, 24 Sep 2023 12:20:05 -0700 (PDT) References: <0e5d8492b0300c16d376cb41f3589cdcf789d31b.1690704800.git.rekado@elephly.net> <871qexx7ij.fsf@gnu.org> User-agent: mu4e 1.10.7; emacs 29.0.92 From: Ricardo Wurmus To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#64945: [PATCH] gnu: opencv: Add descriptors for xfeatures2d. Date: Sun, 24 Sep 2023 21:19:42 +0200 In-reply-to: <871qexx7ij.fsf@gnu.org> Message-ID: <87edin5qfx.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64945-done Cc: 64945-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ludovic Court=C3=A8s writes: > Hi, > > Ricardo Wurmus skribis: > >> * gnu/packages/image-processing.scm (opencv)[native-inputs]: Add boost a= nd vgg >> descriptors. >> [arguments]: Place descriptor files in expected locations; do not disable >> xfeatures2d feature. > > I=E2=80=99m not familiar with OpenCV but on the surface it LGTM. Minor n= its: > >> + (substitute* "../opencv-contrib/modules/xfeatures2d/CMakeL= ists.txt" >> + (("download_(boost|vgg)_descriptors") "#")) > > Maybe add a comment above like =E2=80=9C;; Disable downloads of Boost and= VGG.=E2=80=9D. > >> + (for-each (lambda (file) >> + (chmod file #o644)) > > Maybe use =E2=80=98make-file-writable=E2=80=99. Thanks, I made these changes and pushed it with commit be5bec47f7942a5e4d2a30eadd9a6fa4c715e88b. --=20 Ricardo ------------=_1695583261-31217-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 30 Jul 2023 08:13:47 +0000 Received: from localhost ([127.0.0.1]:49291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQ1Yg-0001xS-Sg for submit@debbugs.gnu.org; Sun, 30 Jul 2023 04:13:47 -0400 Received: from lists.gnu.org ([2001:470:142::17]:34066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQ1Yf-0001xE-1K for submit@debbugs.gnu.org; Sun, 30 Jul 2023 04:13:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qQ1YZ-00014X-6b for guix-patches@gnu.org; Sun, 30 Jul 2023 04:13:39 -0400 Received: from sender3-of-o58.zoho.com ([136.143.184.58]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qQ1YU-0001iC-R6 for guix-patches@gnu.org; Sun, 30 Jul 2023 04:13:38 -0400 Delivered-To: rekado@elephly.net ARC-Seal: i=1; a=rsa-sha256; t=1690704807; cv=none; d=zohomail.com; s=zohoarc; b=F77g0XOsudPKIEMs15BN0mR6lUo5waRlEQopvf3eLzigHdCuw/7bOkASpkOv/oWoJL5JBOlKuuWE8FlanogmV0zAjZZiUs+S9N/yn4gZAnzhUp6PtkMTGC7nlfoSRYdlx6SgrWg7S+Q1OcIgh27szN+cP4mtZ7jPcbNqTMGFibQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1690704807; h=Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=P3bEsqZw5Nay4fnH/k4c0h4zUaEPjQPqUIy/+774z8o=; b=km9WOdpr8LxM2nuMxvMhkMU2ycIIDhJoF7vP0gybxQhhxen8vOvksbO0FOdT3AjVqupcTqNZLGYsFX2LqcBl+dDENiX8NC8QnG9eZ4BZN8GMr7CbK/cJkX+0jlvtzYXX240DmVCwmSjFQOi35nyG6t3UW8rCtC1UpwEPXyeR10A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1690704807; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=P3bEsqZw5Nay4fnH/k4c0h4zUaEPjQPqUIy/+774z8o=; b=Ca7IWnq2yMPIVQwL4Pv93UCnQnVibB8W/GnFpGk4g+KBld3ESQZn/gOm4hQz1L8H czygLmaGCXBT73Ebs4VoZomH5FpYkT+1wOlVNHG2Qi4KT1R7XwZ3ofOuwlaPZ6CvhHU qQ5hvn/QtSJzSae3HgCB505XzicV4dpmJqVXB56g= Received: from localhost (21-108-142-46.pool.kielnet.net [46.142.108.21]) by mx.zohomail.com with SMTPS id 16907048048091020.4564604942569; Sun, 30 Jul 2023 01:13:24 -0700 (PDT) From: Ricardo Wurmus To: guix-patches@gnu.org Subject: [PATCH] gnu: opencv: Add descriptors for xfeatures2d. Date: Sun, 30 Jul 2023 10:13:20 +0200 Message-ID: <0e5d8492b0300c16d376cb41f3589cdcf789d31b.1690704800.git.rekado@elephly.net> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.184.58; envelope-from=rekado@elephly.net; helo=sender3-of-o58.zoho.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit Cc: Ricardo Wurmus X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * 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 ------------=_1695583261-31217-1--