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

相关推荐
中國龍在廣州8 分钟前
现在人工智能的研究路径可能走反了
人工智能·算法·搜索引擎·chatgpt·机器人
攻城狮7号17 分钟前
小米具身大模型 MiMo-Embodied 发布并全面开源:统一机器人与自动驾驶
人工智能·机器人·自动驾驶·开源大模型·mimo-embodied·小米具身大模型
搜移IT科技22 分钟前
【无标题】2025ARCE亚洲机器人大会暨展览会将带来哪些新技术与新体验?
人工智能
6***x54522 分钟前
C++在计算机视觉中的图像处理
c++·图像处理·计算机视觉·游戏引擎·logback·milvus
信也科技布道师FTE41 分钟前
当AMIS遇见AI智能体:如何为低代码开发装上“智慧大脑”?
人工智能·低代码·llm
青瓷程序设计42 分钟前
植物识别系统【最新版】Python+TensorFlow+Vue3+Django+人工智能+深度学习+卷积神经网络算法
人工智能·python·深度学习
AI即插即用1 小时前
即插即用系列 | CVPR 2025 WPFormer:用于表面缺陷检测的查询式Transformer
人工智能·深度学习·yolo·目标检测·cnn·视觉检测·transformer
唐兴通个人1 小时前
数字化AI大客户营销TOB营销客户开发专业销售技巧培训讲师培训师唐兴通老师分享AI销冠人工智能销售AI赋能销售医药金融工业品制造业
人工智能·金融
人机与认知实验室2 小时前
国内主流大语言模型之比较
人工智能·语言模型·自然语言处理
T0uken2 小时前
【Python】UV:境内的深度学习环境搭建
人工智能·深度学习·uv