extra/opencv to 4.9.0-1

This commit is contained in:
Kevin Mihelich 2024-01-06 23:07:16 +00:00
parent ec6114c409
commit 9cc7a179d5
3 changed files with 13 additions and 45 deletions

View file

@ -1,7 +1,7 @@
pkgbase = opencv
pkgdesc = Open Source Computer Vision Library
pkgver = 4.8.1
pkgrel = 4
pkgver = 4.9.0
pkgrel = 1
url = https://opencv.org/
arch = x86_64
license = BSD
@ -53,14 +53,12 @@ pkgbase = opencv
optdepends = hdf5: for the HDF5 module
optdepends = opencl-icd-loader: For coding with OpenCL
optdepends = java-runtime: Java interface
source = https://github.com/opencv/opencv/archive/4.8.1/opencv-4.8.1.tar.gz
source = https://github.com/opencv/opencv_contrib/archive/4.8.1/opencv_contrib-4.8.1.tar.gz
source = https://github.com/opencv/opencv/archive/4.9.0/opencv-4.9.0.tar.gz
source = https://github.com/opencv/opencv_contrib/archive/4.9.0/opencv_contrib-4.9.0.tar.gz
source = vtk9.patch
source = cuda-12.2.patch
sha256sums = 62f650467a60a38794d681ae7e66e3e8cfba38f445e0bf87867e2f2cdc8be9d5
sha256sums = 0c082a0b29b3118f2a0a1856b403bb098643af7b994a0080f402a12159a99c6e
sha256sums = ddf76f9dffd322c7c3cb1f721d0887f62d747b82059342213138dc190f28bc6c
sha256sums = 8952c45a73b75676c522dd574229f563e43c271ae1d5bbbd26f8e2b6bc1a4dae
sha256sums = f35a2d4ea0d6212c7798659e59eda2cb0b5bc858360f7ce9c696c77d3029668e
sha256sums = 2acacd8df0fab431aa2197304c4496f3e4d8a8de9305994a6474e4c66dc3a159
pkgname = opencv
@ -108,6 +106,6 @@ pkgname = opencv-cuda
depends = tbb
depends = zlib
depends = cudnn
provides = opencv=4.8.1
provides = opencv=4.9.0
conflicts = opencv
options = !debug

View file

@ -11,8 +11,8 @@ pkgbase=opencv
pkgname=(opencv
opencv-samples
python-opencv)
pkgver=4.8.1
pkgrel=4
pkgver=4.9.0
pkgrel=1
pkgdesc='Open Source Computer Vision Library'
arch=(x86_64)
license=(BSD)
@ -66,16 +66,13 @@ optdepends=('opencv-samples: samples'
'java-runtime: Java interface')
source=(https://github.com/opencv/opencv/archive/$pkgver/$pkgname-$pkgver.tar.gz
https://github.com/opencv/opencv_contrib/archive/$pkgver/opencv_contrib-$pkgver.tar.gz
vtk9.patch
cuda-12.2.patch)
sha256sums=('62f650467a60a38794d681ae7e66e3e8cfba38f445e0bf87867e2f2cdc8be9d5'
'0c082a0b29b3118f2a0a1856b403bb098643af7b994a0080f402a12159a99c6e'
'f35a2d4ea0d6212c7798659e59eda2cb0b5bc858360f7ce9c696c77d3029668e'
'2acacd8df0fab431aa2197304c4496f3e4d8a8de9305994a6474e4c66dc3a159')
vtk9.patch)
sha256sums=('ddf76f9dffd322c7c3cb1f721d0887f62d747b82059342213138dc190f28bc6c'
'8952c45a73b75676c522dd574229f563e43c271ae1d5bbbd26f8e2b6bc1a4dae'
'f35a2d4ea0d6212c7798659e59eda2cb0b5bc858360f7ce9c696c77d3029668e')
prepare() {
patch -d $pkgname-$pkgver -p1 < vtk9.patch # Don't require all vtk optdepends
patch -d $pkgname-$pkgver -p1 < cuda-12.2.patch # Fix build with CUDA 12.2
}
build() {

View file

@ -1,27 +0,0 @@
diff --git a/modules/dnn/src/cuda4dnn/primitives/normalize_bbox.hpp b/modules/dnn/src/cuda4dnn/primitives/normalize_bbox.hpp
index f067dddaa701..77b5ee81a08e 100644
--- a/modules/dnn/src/cuda4dnn/primitives/normalize_bbox.hpp
+++ b/modules/dnn/src/cuda4dnn/primitives/normalize_bbox.hpp
@@ -111,7 +111,7 @@ namespace cv { namespace dnn { namespace cuda4dnn {
* or there might be several weights
* or we don't have to scale
*/
- if (weight != 1.0)
+ if (weight != static_cast<T>(1.0))
{
kernels::scale1_with_bias1<T>(stream, output, input, weight, 1.0);
}
diff --git a/modules/dnn/src/cuda4dnn/primitives/region.hpp b/modules/dnn/src/cuda4dnn/primitives/region.hpp
index d22d44214e7b..cd44f061ec98 100644
--- a/modules/dnn/src/cuda4dnn/primitives/region.hpp
+++ b/modules/dnn/src/cuda4dnn/primitives/region.hpp
@@ -121,7 +121,7 @@ namespace cv { namespace dnn { namespace cuda4dnn {
new_coords
);
- if (nms_iou_threshold > 0) {
+ if (nms_iou_threshold > static_cast<T>(0)) {
auto output_mat = output_wrapper->getMutableHostMat();
CV_Assert(output_mat.type() == CV_32F);
for (int i = 0; i < input.get_axis_size(0); i++) {