OPENCV创建一定大小的矩阵的高度错误-C
OpenCV creating a matrix of certain size has the wrong height - C++
我正在尝试创建一个尺寸的矩阵,这是两个现有图像的两个维度的最大值。我的代码如下:
int width = 0, height = 0;
(frameOne.cols >= frameTwo.cols) ? width = frameOne.cols : width = frameTwo.cols;
(frameOne.rows >= frameTwo.rows) ? height = frameOne.rows : height = frameTwo.rows;
cout << "frameone: " << frameOne.cols << " " << frameTwo.rows << endl;
cout << "frametwo: " << frameTwo.cols << " " << frameTwo.rows << endl;
cout << "Width: " << width << endl;
cout << "Height: " << height << endl;
我遇到的问题是,当我打印出每个框架的行时,它们都是711(应该是),但所产生的宽度为720 ..我应该是711,不知道它在哪里更改是一个简单的作业。
正在打印我们的框架行的错误值。
相关文章:
- 警告处理为错误这里有什么问题
- "error: no matching function for call to"构造函数错误
- boost::进程间消息队列引发错误
- C++,OpenCV,尝试显示图像时"OpenCV(4.3.0) Error: Assertion failed (size.width>0 && size.height>0)"此错误
- 有关插入适配器的错误。[错误]请求从 'back_insert_iterator<vector<>>' 类型转换为非标量类型
- QT在错误的班级中寻找空位
- vector.resize()中的分配错误
- 代码在main()中运行,但在函数中出现错误
- 释放错误后堆使用
- (C++)分析树以计算返回错误值的简单算术表达式
- Project Euler问题4的错误解决方案
- 我的字符计数代码计算错误.为什么
- 从"int*"强制转换为"unsigned int"会丢失精度错误
- 尝试导入pybind-opencv模块时出现libgtk错误
- CMake项目Boost库错误:Boost/config/compiler/gcc.hpp:165:10:致命错误:cs
- 在某些循环内使用vector.push_back时出现分段错误
- MSVC多行宏编译器错误
- QFont 错误地将文本适合特定高度
- OPENCV创建一定大小的矩阵的高度错误-C
- 高度平衡树代码中的分段错误