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

相关推荐
TMT星球3 分钟前
大晓发布全球首个可仿真人–场景交互重建框架HSImul3R
人工智能·科技·机器人
kyriewen5 分钟前
面试官问我:AI 都能写代码了,前端凭什么还值 25K
前端·javascript·人工智能
FPC工厂——皇榜科技12 分钟前
机器人灵巧手线路板:从“握得住”到“摸得准”:一只机械手的柔性神经密码
网络·人工智能·科技·机器人·pcb工艺
JMchen12315 分钟前
Cursor高阶玩法:.cursorrules编写与Spec-Driven开发实战,把AI调教成专属结对编程搭档
人工智能·vscode·kotlin·cursor·结对编程·spec-driven·.cursorrules
szxinmai主板定制专家26 分钟前
基于 RK3588+RK1820/28 算力卡的国产工控机,适用于机器视觉,机器人等边缘算力场景
人工智能·fpga开发·zynq·控制器·mpsoc·半导体设备
右耳朵猫AI37 分钟前
PHP周刊2026W36 | Laravel AI SDK 0.11可观测、Symfony 8.1.5、Octane并发、事件溯源
人工智能·php·laravel
知几蜗牛1 小时前
ChatGPT Images 2.5更新解析:模板、草图与迭代编辑
人工智能
223糖1 小时前
思考 AI 应用架构
人工智能·架构
IT_陈寒1 小时前
React子组件莫名其妙重渲染?你可能漏了这个Hook
前端·人工智能·后端
张继雁1 小时前
张继雁 个人技术简介|磨削加工过滤方向
大数据·数据库·论文阅读·人工智能·机器学习·创业创新·业界资讯