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

相关推荐
Jiamiren18 分钟前
WEEX:长鑫科技上市大涨,宇树科技合约同步走高,传统资产交易迎来新路径
人工智能·科技·区块链
海兰38 分钟前
mcporter — 安装部署及使用完全指南(二)
人工智能·agent
一拳不是超人42 分钟前
LangChain 们的丧钟?DeepSeek 把 Agent 开发变成了拼乐高
人工智能·agent
麻雀飞吧1 小时前
零基础选量化工具,先把问题说清楚
人工智能·python
向成科技1 小时前
新品亮相|向成电子IPCA_3588H AI边缘网关重磅发布,算力下沉,自主可控
人工智能·边缘计算·国产化·硬件·边缘网关·主板·端侧ai
段一凡-华北理工大学1 小时前
AI推动工业智能化转型~系列文章20:工业 AI 平台架构:云-边-端协同的技术体系
人工智能·python·架构·工业平台·云-边协同
IT_陈寒1 小时前
Python线程池吞了异常还不告诉我,这谁顶得住啊
前端·人工智能·后端
CodeBlog-star1 小时前
Harness Engineering:Pi Agent 架构深度解析
人工智能·python·架构·harness工程
chen_zn951 小时前
《VLA 系列》Human-to-Robot Transfer | 人类视频共训练 | 跨本体涌现迁移 | 论文解析
人工智能·深度学习·transformer·具身智能·vla
恣逍信点1 小时前
《凌微经》价值论:变化即本体,价值即涌现
人工智能·科技·程序人生·蓝桥杯·业界资讯·交友·哲学