gpt4 book ai didi

opencv - 没有运算符 [] 匹配这些操作数

转载 作者:太空宇宙 更新时间:2023-11-03 22:30:10 25 4
gpt4 key购买 nike

我正在改编使用 cvMat 的旧代码。我使用来自 cvMat 的构造函数:

Mat A(B); // B is a cvMat

当我编写 A[i][j] 时,出现错误 no operator [] match these operands

为什么?有关信息:B 是单 channel 浮点矩阵(来自从 csv 文件读取的 MLData 对象)。

最佳答案

The documentation列出用于访问成员的 at 运算符。

A.at<int>(i,j); //Or whatever type you are storing.

关于opencv - 没有运算符 [] 匹配这些操作数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27803199/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com