Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
f65a14d1
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,发现更多精彩内容 >>
提交
f65a14d1
编写于
1月 30, 2013
作者:
A
Andrey Kamaev
提交者:
OpenCV Buildbot
1月 30, 2013
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #379 from taka-no-me:fix_ocl_samples_warnings
上级
3a55fb9d
f489eb9a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
19 addition
and
19 deletion
+19
-19
modules/ocl/include/opencv2/ocl/matrix_operations.hpp
modules/ocl/include/opencv2/ocl/matrix_operations.hpp
+14
-14
samples/ocl/facedetect.cpp
samples/ocl/facedetect.cpp
+1
-1
samples/ocl/squares.cpp
samples/ocl/squares.cpp
+4
-4
未找到文件。
modules/ocl/include/opencv2/ocl/matrix_operations.hpp
浏览文件 @
f65a14d1
...
...
@@ -141,7 +141,7 @@ namespace cv
}
inline
oclMat
::
oclMat
(
const
oclMat
&
m
,
const
Range
&
r
owRange
,
const
Range
&
col
Range
)
inline
oclMat
::
oclMat
(
const
oclMat
&
m
,
const
Range
&
r
Range
,
const
Range
&
c
Range
)
{
flags
=
m
.
flags
;
step
=
m
.
step
;
...
...
@@ -152,22 +152,22 @@ namespace cv
wholerows
=
m
.
wholerows
;
wholecols
=
m
.
wholecols
;
offset
=
m
.
offset
;
if
(
r
ow
Range
==
Range
::
all
()
)
if
(
rRange
==
Range
::
all
()
)
rows
=
m
.
rows
;
else
{
CV_Assert
(
0
<=
r
owRange
.
start
&&
rowRange
.
start
<=
rowRange
.
end
&&
row
Range
.
end
<=
m
.
rows
);
rows
=
r
ow
Range
.
size
();
offset
+=
step
*
r
ow
Range
.
start
;
CV_Assert
(
0
<=
r
Range
.
start
&&
rRange
.
start
<=
rRange
.
end
&&
r
Range
.
end
<=
m
.
rows
);
rows
=
rRange
.
size
();
offset
+=
step
*
rRange
.
start
;
}
if
(
c
ol
Range
==
Range
::
all
()
)
if
(
cRange
==
Range
::
all
()
)
cols
=
m
.
cols
;
else
{
CV_Assert
(
0
<=
c
olRange
.
start
&&
colRange
.
start
<=
colRange
.
end
&&
col
Range
.
end
<=
m
.
cols
);
cols
=
c
ol
Range
.
size
();
offset
+=
c
ol
Range
.
start
*
elemSize
();
CV_Assert
(
0
<=
c
Range
.
start
&&
cRange
.
start
<=
cRange
.
end
&&
c
Range
.
end
<=
m
.
cols
);
cols
=
cRange
.
size
();
offset
+=
cRange
.
start
*
elemSize
();
flags
&=
cols
<
m
.
cols
?
~
Mat
::
CONTINUOUS_FLAG
:
-
1
;
}
...
...
@@ -296,12 +296,12 @@ namespace cv
//CPP void oclMat::copyTo( oclMat& m, const oclMat& mask ) const;
//CPP void oclMat::convertTo( oclMat& m, int rtype, double alpha=1, double beta=0 ) const;
inline
void
oclMat
::
assignTo
(
oclMat
&
m
,
int
type
)
const
inline
void
oclMat
::
assignTo
(
oclMat
&
m
,
int
m
type
)
const
{
if
(
type
<
0
)
if
(
m
type
<
0
)
m
=
*
this
;
else
convertTo
(
m
,
type
);
convertTo
(
m
,
m
type
);
}
//CPP oclMat& oclMat::operator = (const Scalar& s);
...
...
@@ -370,9 +370,9 @@ namespace cv
return
*
this
;
}
inline
oclMat
oclMat
::
operator
()(
Range
r
owRange
,
Range
col
Range
)
const
inline
oclMat
oclMat
::
operator
()(
Range
r
Range
,
Range
c
Range
)
const
{
return
oclMat
(
*
this
,
r
owRange
,
col
Range
);
return
oclMat
(
*
this
,
r
Range
,
c
Range
);
}
inline
oclMat
oclMat
::
operator
()(
const
Rect
&
roi
)
const
{
...
...
samples/ocl/facedetect.cpp
浏览文件 @
f65a14d1
...
...
@@ -10,7 +10,7 @@
using
namespace
std
;
using
namespace
cv
;
void
help
()
static
void
help
()
{
cout
<<
"
\n
This program demonstrates the cascade recognizer.
\n
"
"This classifier can recognize many ~rigid objects, it's most known use is for faces.
\n
"
...
...
samples/ocl/squares.cpp
浏览文件 @
f65a14d1
...
...
@@ -14,7 +14,7 @@
using
namespace
cv
;
using
namespace
std
;
void
help
()
static
void
help
()
{
cout
<<
"
\n
A program using OCL module pyramid scaling, Canny, dilate functions, threshold, split; cpu contours, contour simpification and
\n
"
...
...
@@ -34,7 +34,7 @@ const char* wndname = "OpenCL Square Detection Demo";
// helper function:
// finds a cosine of angle between vectors
// from pt0->pt1 and from pt0->pt2
double
angle
(
Point
pt1
,
Point
pt2
,
Point
pt0
)
static
double
angle
(
Point
pt1
,
Point
pt2
,
Point
pt0
)
{
double
dx1
=
pt1
.
x
-
pt0
.
x
;
double
dy1
=
pt1
.
y
-
pt0
.
y
;
...
...
@@ -45,7 +45,7 @@ double angle( Point pt1, Point pt2, Point pt0 )
// returns sequence of squares detected on the image.
// the sequence is stored in the specified memory storage
void
findSquares
(
const
Mat
&
image
,
vector
<
vector
<
Point
>
>&
squares
)
static
void
findSquares
(
const
Mat
&
image
,
vector
<
vector
<
Point
>
>&
squares
)
{
squares
.
clear
();
...
...
@@ -131,7 +131,7 @@ void findSquares( const Mat& image, vector<vector<Point> >& squares )
// the function draws all the squares in the image
void
drawSquares
(
Mat
&
image
,
const
vector
<
vector
<
Point
>
>&
squares
)
static
void
drawSquares
(
Mat
&
image
,
const
vector
<
vector
<
Point
>
>&
squares
)
{
for
(
size_t
i
=
0
;
i
<
squares
.
size
();
i
++
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录