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

相关推荐
2分钟速写快排1 分钟前
ggg! 潜行摸鱼被 Trae 爆改成 3D!
人工智能·程序员·数据可视化
“AI国潮设计-小江”2 分钟前
【AIGC实战】Python+Stable Diffusion打造“英歌舞财神”IP,解锁“马到成功”等爆款情绪营销文案设计
开发语言·人工智能·python·prompt·aigc
明志数科15 分钟前
实景数据与训练场数据的分布差异:机器人操作数据的分层采集与工程边界
人工智能
zhippt_101422 分钟前
汇报总结PPT怎么做更快?5款AI生成PPT工具实测横评
人工智能·powerpoint
寒墨默涵25 分钟前
Trigger.Dev Webhooks 驱动 AI 智能体实战效果展示
人工智能
manyingAi34 分钟前
AI漫剧生产系统架构解析:从文本拆解到音视频合成
人工智能·音视频
长不大的杨瑞杰39 分钟前
OpenCode v2 会话可靠性实战:Snapshots、Compaction、Instructions 与 Formatters
人工智能·安全·云计算·软件工程·devops
乌恩大侠1 小时前
从 AI-RAN 到 AI Agent:基于 NVIDIA Nemotron 构建 5G/6G 智能网络故障诊断系统
服务器·人工智能·5g·o-ru·ai-ran·电信大模型
TMedical1 小时前
MedPlanning 截骨模拟矫形功能
c++·图像处理·人工智能·qt·健康医疗