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

相关推荐
user_admin_god2 分钟前
Opencode常见问题与优化排查
java·人工智能·自然语言处理·nlp·idea
百沐生物4 分钟前
生信小白如何快速绘制降维聚类图(UMAP/t-SNE)?
人工智能·生命科学
石榴树下的七彩鱼4 分钟前
电商订单 OCR 识别实战:如何自动提取订单信息并实现发货自动化(附 Python / Java 示例)
人工智能·python·自动化·ocr·电商·电商自动化·api 接入
计算机安禾10 分钟前
【Linux从入门到精通】第9篇:用户与权限管理(下)——数字法与粘滞位
linux·服务器·人工智能·面试·知识图谱
CORNERSTONE36511 分钟前
生产管理六要素(PQCDSM)
大数据·运维·人工智能·生产管理
兰.lan12 分钟前
【黑马ai测试】安享智慧理财项目(ai辅助提效)
人工智能·python·功能测试·ai
深兰科技13 分钟前
深兰科技×南京同仁堂达成合作,深兰智养落地:AI+中医探索四高肥胖非药物健康管理新路径
人工智能·erlang·laravel·具身智能·智能机器人·深兰科技·深兰智养
skywalk816314 分钟前
CherryStudioWeb:一个优雅的 AI 聚合导航页,让你在一个页面访问所有主流 AI 服务。
前端·css·人工智能·html
AI 编程助手GPT15 分钟前
【实战】Codex 接管电脑 + Claude Routines 云端值守:一次 Bug 排查的“无人化”闭环
人工智能·gpt·ai·chatgpt·bug
UltraLAB-F15 分钟前
有限元分析内存需求深度解析:刚度矩阵、求解器与硬件配置
人工智能·ai·硬件架构