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

相关推荐
kaixin_啊啊几秒前
Micam 多容器太吃资源?用 Go2RTC + EasyNVR 给小米摄像头换一套轻量本地录像方案
图像处理·人工智能·摄像头
具身AGI3 分钟前
具身ICL走热,物理AI 自主学习能力 多一条轴
人工智能
雾屿_Mistisle4 分钟前
本地 AI 工作台的 Agent 化改造:从聊天转发到 22 个工具
人工智能
水如烟6 分钟前
孤能子视角:蓝星文明篇·异——正当性叙事的裂缝:负续指的聚合与相变
人工智能
浔溺10 分钟前
al+大数据每日学习笔记41
opencv·计算机视觉
美狐美颜SDK开放平台13 分钟前
直播APP源码与视频美颜sdk如何配合?一套完整开发思路
android·人工智能·计算机视觉·音视频·直播美颜sdk
不会写代码的女程序猿15 分钟前
商用 AI 四诊仪技术拆解|明理 AI 四诊仪多模态采集方案解析
大数据·人工智能·科技·ai·健康医疗
IT_陈寒25 分钟前
Redis大key删除引发的服务雪崩,这次我真记住了
前端·人工智能·后端
正经教主28 分钟前
【FDE系列】阶段2:Day 47:对接企业系统 — 飞书 / 钉钉 API
人工智能·docker·fde
Dawson Zhu35 分钟前
从 Jev 说起:快慢模型如何协同调度,以及这背后需要解决什么问题
人工智能·语言模型·架构·aigc·agi