OpenCV的源代码中的位置是大小类
Where in the Source code for OpenCV is the Size Class?
我在Opencv目录中翻遍了Size::
CV_EXPORTS SIZE
Size::width
,但我能找到的只是模板类Size_
,与文档中相同。我想查看源代码,因为我正在向 OpenCV 库添加改进,这些信息会很有用。 在 Ubuntu Trusty 上,我像这样运行 grep:
grep -r 'CV_EXPORTS SIZE' .
从根文件夹中的模块目录
提前感谢任何接受者。
哦
,这是一个深层的源代码树。无论如何,opencv/modules/core/include/opencv2/core/types.hpp 有:
/*!
The 2D size class
The class represents the size of a 2D rectangle, image size, matrix size etc.
Normally, cv::Size ~ cv::Size_<int> is used.
*/
template<typename _Tp> class Size_
{
//! various constructors
Size_();
Size_(_Tp _width, _Tp _height);
Size_(const Size_& sz);
Size_(const Point_<_Tp>& pt);
Size_& operator = (const Size_& sz);
//! the area (width*height)
_Tp area() const;
//! conversion of another data type.
template<typename _Tp2> operator Size_<_Tp2>() const;
_Tp width, height; // the width and the height
};
/*!
typedef
*/
typedef Size_<int> Size2i;
typedef Size_<float> Size2f;
typedef Size_<double> Size2d;
typedef Size2i Size;
所以,Size
是Size2i
的别名,是Size_<int>
的别名。
相关文章:
- 在C++中实现无STL和无类的最小堆
- 在运行时为随机分布类成员设置最小和最大边界?
- Qt(QVBoxLayout类)中的小部件何时删除?
- 如何从另一个类编辑 QMainWindow UI 小部件?
- 类最小堆栈未给出输出
- 为什么 qt-creator 在我用小写字母命名小部件类后无法构建?
- 我最近正在阅读opencv源代码。有没有更好的方法来在opencv库中查找类定义?
- 使用继承的类模板避免公共成员不可见和源代码膨胀/重复的更好方法
- 父类有 26 个构造函数重载.如何在不复制+粘贴 26 个重载的情况下将一个小任务附加到所有构造器?
- 为什么要返回对小类成员的 const 引用?
- 一个人如何将QT(C )UI分为多个小部件子类,并使其显示与同一类中的所有窗口
- 创建一个包含对 <int、自定义类的最小堆>
- 如何在源代码C++查找类的实例化
- C 中的Arduino类是否类似于处理中的最小类
- 共享源代码隐藏类
- 如何在 QWidgetAction 的子类中设置小部件的可见性
- 我看到将我的类成员函数指定为内联实际上会增加执行时间,即使函数体非常小
- 类型 *阵列的最小或最大值的类功能 *
- 我可以强制C++类使用最小的空间进行编译吗?
- QT:类的访问功能,该功能使用构造函数外的GUI小部件