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

相关推荐
2501_911067661 分钟前
市政标杆视角:标准化建设+精品工程,叁仟智慧灯杆打造杭州市政新基建样板
人工智能
集之互动2 分钟前
破解出海传播壁垒 集之互动AI TVC双维适配助力品牌全球化精准传播
人工智能
长风2303 分钟前
Day 17: 突破 AOB 框架霸权 —— 插件界面重构与大屏呈现
人工智能·安全
用户938515635074 分钟前
知识库预处理实战:从URL加载到语义分块的全链路解析
javascript·人工智能·全栈
何时梦醒5 分钟前
🧠 大模型知识蒸馏:小模型如何"偷师"大模型?
人工智能
萧青山9 分钟前
AI+HI人机协同范式:从ElementsClaw到政务智能体的分层进化论
人工智能·机器学习·政务·ai+hi人机协同
武子康13 分钟前
HunyuanVideo 全家族选型:原版 13B / I2V / Avatar / Foley / 1.5 8.3B 怎么分工
人工智能·llm·aigc
wenzhangli713 分钟前
OODER Studio设计工具导入体系深度解析
人工智能·自动化
qiaozhangmenai13 分钟前
AI经营增长系统:企业数字化转型进入智能体时代
人工智能
水如烟14 分钟前
孤能子视角:闭合与回环——神经系统的开放拓扑与血液循环的封闭回路
人工智能