Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
93d76ac2
O
Opencv
项目概览
Greenplum
/
Opencv
大约 1 年 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
93d76ac2
编写于
3月 26, 2013
作者:
A
Andrey Kamaev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move cv::RotatedRect
上级
62adc019
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
39 addition
and
34 deletion
+39
-34
modules/core/include/opencv2/core.hpp
modules/core/include/opencv2/core.hpp
+0
-27
modules/core/include/opencv2/core/operations.hpp
modules/core/include/opencv2/core/operations.hpp
+1
-7
modules/core/include/opencv2/core/types.hpp
modules/core/include/opencv2/core/types.hpp
+32
-0
modules/core/include/opencv2/core/types_c.h
modules/core/include/opencv2/core/types_c.h
+6
-0
未找到文件。
modules/core/include/opencv2/core.hpp
浏览文件 @
93d76ac2
...
...
@@ -524,33 +524,6 @@ typedef Vec<double, 4> Vec4d;
typedef
Vec
<
double
,
6
>
Vec6d
;
/*!
The rotated 2D rectangle.
The class represents rotated (i.e. not up-right) rectangles on a plane.
Each rectangle is described by the center point (mass center), length of each side
(represented by cv::Size2f structure) and the rotation angle in degrees.
*/
class
CV_EXPORTS
RotatedRect
{
public:
//! various constructors
RotatedRect
();
RotatedRect
(
const
Point2f
&
center
,
const
Size2f
&
size
,
float
angle
);
RotatedRect
(
const
CvBox2D
&
box
);
//! returns 4 vertices of the rectangle
void
points
(
Point2f
pts
[])
const
;
//! returns the minimal up-right rectangle containing the rotated rectangle
Rect
boundingRect
()
const
;
//! conversion to the old-style CvBox2D structure
operator
CvBox2D
()
const
;
Point2f
center
;
//< the rectangle mass center
Size2f
size
;
//< width and height of the rectangle
float
angle
;
//< the rotation angle. When the angle is 0, 90, 180, 270 etc., the rectangle becomes an up-right rectangle.
};
//////////////////////////////// Scalar_ ///////////////////////////////
/*!
...
...
modules/core/include/opencv2/core/operations.hpp
浏览文件 @
93d76ac2
...
...
@@ -1884,13 +1884,7 @@ template<typename _Tp> inline bool Point_<_Tp>::inside( const Rect_<_Tp>& r ) co
inline
RotatedRect
::
RotatedRect
()
{
angle
=
0
;
}
inline
RotatedRect
::
RotatedRect
(
const
Point2f
&
_center
,
const
Size2f
&
_size
,
float
_angle
)
:
center
(
_center
),
size
(
_size
),
angle
(
_angle
)
{}
inline
RotatedRect
::
RotatedRect
(
const
CvBox2D
&
box
)
:
center
(
box
.
center
),
size
(
box
.
size
),
angle
(
box
.
angle
)
{}
inline
RotatedRect
::
operator
CvBox2D
()
const
{
CvBox2D
box
;
box
.
center
=
center
;
box
.
size
=
size
;
box
.
angle
=
angle
;
return
box
;
}
//////////////////////////////// Scalar_ ///////////////////////////////
...
...
modules/core/include/opencv2/core/types.hpp
浏览文件 @
93d76ac2
...
...
@@ -331,6 +331,38 @@ public:
*/
typedef
Rect_
<
int
>
Rect
;
///////////////////////////// RotatedRect /////////////////////////////
/*!
The rotated 2D rectangle.
The class represents rotated (i.e. not up-right) rectangles on a plane.
Each rectangle is described by the center point (mass center), length of each side
(represented by cv::Size2f structure) and the rotation angle in degrees.
*/
class
CV_EXPORTS
RotatedRect
{
public:
//! various constructors
RotatedRect
();
RotatedRect
(
const
Point2f
&
center
,
const
Size2f
&
size
,
float
angle
);
//! returns 4 vertices of the rectangle
void
points
(
Point2f
pts
[])
const
;
//! returns the minimal up-right rectangle containing the rotated rectangle
Rect
boundingRect
()
const
;
Point2f
center
;
//< the rectangle mass center
Size2f
size
;
//< width and height of the rectangle
float
angle
;
//< the rotation angle. When the angle is 0, 90, 180, 270 etc., the rectangle becomes an up-right rectangle.
};
}
// cv
#endif //__OPENCV_CORE_TYPES_HPP__
\ No newline at end of file
modules/core/include/opencv2/core/types_c.h
浏览文件 @
93d76ac2
...
...
@@ -955,6 +955,12 @@ typedef struct CvBox2D
CvSize2D32f
size
;
/* Box width and length. */
float
angle
;
/* Angle between the horizontal axis */
/* and the first side (i.e. length) in degrees */
#ifdef __cplusplus
CvBox2D
(
CvPoint2D32f
c
=
CvPoint2D32f
(),
CvSize2D32f
s
=
CvSize2D32f
(),
float
a
=
0
)
:
center
(
c
),
size
(
s
),
angle
(
a
)
{}
CvBox2D
(
const
cv
::
RotatedRect
&
rr
)
:
center
(
rr
.
center
),
size
(
rr
.
size
),
angle
(
rr
.
angle
)
{}
operator
cv
::
RotatedRect
()
const
{
return
cv
::
RotatedRect
(
center
,
size
,
angle
);
}
#endif
}
CvBox2D
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录