考虑CV_IMAGE_ELEM的结果为QString
Considering the result of CV_IMAGE_ELEM as QString?
我想在LineEdit中显示10x10窗口CV_IMAGE_ELEM的结果,其参数是QString。
我是否应该考虑以下问题:
for (int y=0;y<10;y++)
{
for (int x=0;x<10;x++) //width
{
QString qstr= CV_IMAGE_ELEM(img_crop_mat, uchar, y, x*3+ 2);
QString ctot= qstr + ctot;
lineEdit_mat->setText(ctot + " ");
}
lineEdit_mat->setText("n");
}
谢谢。
尝试循环
myQString.append(QString("%1 ").arg((int) IPL_IMAGE_ELEM(...) ));
这是假设您想以数字格式打印图像数据。
相关文章:
- 为什么"do while"循环不断退出,即使条件计算结果为 false?
- valgrind-hellgrind与泄漏检查的结果不同
- 将 Qvector<uint8_t> 转换为 QString
- 用C++20 fmt限制结果的总大小
- 如何返回一个类的两个对象相加的结果
- 使用QProcess执行命令,并将结果存储在QStringList中
- 如果我std::dynamic_pointer_cast并且底层dynamic_cast的结果为null,那么返回的sh
- 在没有定义返回类型的函数中返回布尔值,并将结果保存在无错误的char编译中-为什么
- 序列化,没有库的整数,得到奇怪的结果
- 使用取消引用的指针的多态性会产生意外的结果.为什么?
- 在更改for循环的第三部分后,未使用for循环结果
- 使用++运算符会导致意外的结果
- 为什么在逗号分隔符上下文中将预增量的结果强制转换为void
- C++Brute Force攻击函数不会返回结果
- 如何通过按下第三个窗口中的按钮,将QString从一个窗口获取到另一个窗口
- QString 到 const char* 的不同结果
- 生成随机QString每次都会产生相同的结果
- QString::mid()总是返回相同的结果
- 考虑CV_IMAGE_ELEM的结果为QString
- 设置qstring导出结果的编码