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

相关推荐
zhongerzixunshi11 小时前
军工保密资质|筑牢涉密科研生产安全底线
人工智能·安全
绕灵儿12 小时前
火灾检测-应用场景-YOLO训练记录
人工智能·算法
超级架构师12 小时前
让 COBOL 长出 AI 大脑:原生 Agent 核心框架 praxo-core 深度剖析
c语言·开发语言·c++·人工智能·python·架构·ai编程
拜小白12 小时前
【论文解读】OmniSRNet:畸变感知学习——从单张全向图像恢复房间结构
深度学习·计算机视觉·全景图
蓝悦无人机12 小时前
Ansys仿真常见错误及警告
人工智能·ansys仿真
skywalk816312 小时前
deepseek对skywalk163/hive 和hivecommons/hive 两个多机AI Agent任务调度项目的对比
人工智能·hive·agent
紧跟先前的步伐12 小时前
Go AI Agent 实战 19|工具定义、参数 Schema 与工具注册表
人工智能·ai·golang·1024程序员节
NineData12 小时前
NineData 社区版 V5.4.0 上线:715 条复制对比链路,AI Agent 新增表结构设计发布能力
大数据·数据库·人工智能·mysql·数据库管理工具·ninedata·数据库迁移工具
龍德明宇12 小时前
机器人的礼貌是标注出来的-龍德明宇
人工智能·机器人·大语言模型llm·负主体性·ai存在论
京存高性能存储12 小时前
POC 实测笔记:全闪存储大带宽压测,顺序读 19.2GiB/s、顺序写 10.8GiB/s,聊聊长尾延迟与持续吞吐问题
人工智能·笔记