mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
extra/opencv to 4.8.0-3
This commit is contained in:
parent
998d488f91
commit
e9446906a6
2 changed files with 33 additions and 3 deletions
|
@ -9,7 +9,7 @@
|
|||
pkgbase=opencv
|
||||
pkgname=(opencv opencv-samples python-opencv)
|
||||
pkgver=4.8.0
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc='Open Source Computer Vision Library'
|
||||
arch=(x86_64)
|
||||
license=(BSD)
|
||||
|
@ -26,13 +26,16 @@ 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)
|
||||
vtk9.patch
|
||||
cuda-12.2.patch)
|
||||
sha256sums=('cbf47ecc336d2bff36b0dcd7d6c179a9bb59e805136af6b9670ca944aef889bd'
|
||||
'b4aef0f25a22edcd7305df830fa926ca304ea9db65de6ccd02f6cfa5f3357dbb'
|
||||
'f35a2d4ea0d6212c7798659e59eda2cb0b5bc858360f7ce9c696c77d3029668e')
|
||||
'f35a2d4ea0d6212c7798659e59eda2cb0b5bc858360f7ce9c696c77d3029668e'
|
||||
'2acacd8df0fab431aa2197304c4496f3e4d8a8de9305994a6474e4c66dc3a159')
|
||||
|
||||
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() {
|
||||
|
|
27
extra/opencv/cuda-12.2.patch
Normal file
27
extra/opencv/cuda-12.2.patch
Normal file
|
@ -0,0 +1,27 @@
|
|||
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++) {
|
||||
|
Loading…
Reference in a new issue