Ubuntu20 安装 带cuda的opencv遇到的问题

问题1:

CUDA 12.2 fp16 dnn 编译错误 错误 C2666: 'operator !=': 具有类似的转换重载函数

解决:

CUDA 12.2 fp16 dnn compilation error · Issue #23893 · opencv/opencv · GitHub

Solution:

I "solved" this by using static_cast.

You want to change line 114 in opencv/modules/dnn/src/cuda4dnn/primitives/normalize_bbox.hpp:

from:
if (weight != 1.0)

to:
if (weight != static_cast<T>(1.0))

As well as line 124 in opencv/modules/dnn/src/cuda4dnn/primitives/region.hpp (due to a similar error):

from:
if (nms_iou_threshold > 0) {

to:
if (nms_iou_threshold > static_cast<T>(0)) {

Explanation:

Since both variables, weight and nms_iou_threshold, are templated and finally boil down to a primitive type during compilation, it is meaningful to use a static_cast to convert the respective constant (1.0 (by default double) and 0 (by default int)) to the template type. Based on the operator candidates the required types should all be compatible, i.e., the constant values are safe to be casted to the target template type.

问题2:

undefined reference to `TIFFReadDirectory@LIBTIFF_4.0'

解决:

https://stackoverflow.com/questions/38729954/error-installing-opencv-on-ubuntu-16-04

cmake 增加 -D BUILD_TIFF=ON

相关推荐
jinxindeep2 分钟前
WorldOlympiad:视频世界模型的“铁人三项“评测新标杆
人工智能·深度学习
领创工作室3 分钟前
小米开源终端 AI 编程助手 MiMo Code:多文件长任务的破局者?
人工智能·开源
YOLO数据集集合9 分钟前
无人机航拍桥梁巡检数据集 | 桥梁结构缺陷检测 深度学习目标检测数据10338期
深度学习·yolo·目标检测·计算机视觉·无人机
小明的IT世界9 分钟前
编程智能体的上下文工程
人工智能·ai编程
Sam09279 分钟前
大模型 API 智能路由怎么做:模型、供应商、成本与稳定性的工程实践
人工智能·ai
吾店云建站10 分钟前
生成式GEO优化指南:WordPress网站如何被ChatGPT、DeepSeek和豆包等AI引擎引用 - 吾店GEO
人工智能·搜索引擎·chatgpt·独立站
1892280486111 分钟前
NV114固态MT29F16T08EWLEHD6-MES:E
人工智能·算法·缓存·性能优化
armwind11 分钟前
openISP学习12-EE — Edge Enhancement(边缘增强)
图像处理·计算机视觉
jinggongszh12 分钟前
算力价格重构:得州新规给制造业AI上了一堂“成本课”
人工智能
万岳科技系统开发13 分钟前
教育培训小程序搭建中的AI题库功能解析
人工智能·小程序