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

相关推荐
laboratory agent开发1 分钟前
企业AI Agent落地前,先回答四个工程问题
java·前端·人工智能
Black蜡笔小新2 分钟前
算法训练完了怎么上线?DLTM→AIS→EasyGBS三步交付流水线
人工智能·算法
XS0301062 分钟前
Spring AI 第二课-流式输出 & 运行时动态参数配置
java·人工智能·spring
公众号:fuwuqiBMC4 分钟前
(转自“服务器BMC”)服务器BMC功能——DDR故障预测
运维·服务器·人工智能
会助力智能会务4 分钟前
会务系统供应商怎么选?会助力智能会务系统,一站式数字化会务服务商
大数据·运维·人工智能
中微极客10 分钟前
2026年AI视频生成模型选型与工程实践指南
人工智能·音视频
阿童木写作10 分钟前
跨马翻译:一站式图片视频智能处理,提升跨境电商工作效率
人工智能·python·音视频
出门吃三碗饭11 分钟前
Google 提示词零基础教学:从“会提问”到“让 AI 真正解决问题
人工智能
意图共鸣13 分钟前
技术解读:《智能体三角模型白皮书》中的三问校验法——意图共鸣科技的商用AI评估框架
人工智能·科技