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

相关推荐
瓦力的狗腿子1 小时前
AI技术的发展为卫星控制系统研发带来的影响与思考
人工智能
人工智能AI技术2 小时前
YOLOv9目标检测实战:用Python搭建你的第一个实时交通监控系统
人工智能
小雨中_2 小时前
2.7 强化学习分类
人工智能·python·深度学习·机器学习·分类·数据挖掘
拯救HMI的工程师2 小时前
【拯救HMI】工业HMI字体选择:拒绝“通用字体”,适配工业场景3大要求
人工智能
lczdyx2 小时前
【胶囊网络】01-2 胶囊网络发展历史与研究现状
人工智能·深度学习·机器学习·ai·大模型·反向传播
AomanHao2 小时前
【ISP】基于暗通道先验改进的红外图像透雾
图像处理·人工智能·算法·计算机视觉·图像增强·红外图像
AI智能观察2 小时前
从数据中心到服务大厅:数字人智能体如何革新电力行业服务模式
人工智能·数字人·智慧展厅·智能体·数字展厅
AI智能观察3 小时前
生成式AI驱动信息分发变革:GEO跃迁方向、价值锚点与企业生存指南
人工智能·流量运营·geo·ai搜索·智能营销·geo工具·geo平台
苏渡苇3 小时前
轻量化AI落地:Java + Spring Boot 实现设备异常预判
java·人工智能·spring boot·后端·网络协议·tcp/ip·spring
大熊背3 小时前
APEX系统中为什么 不用与EV0的差值计算曝光参数调整量
人工智能·算法·apex·自动曝光