Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
e1b56e37
O
Opencv
项目概览
Greenplum
/
Opencv
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
e1b56e37
编写于
10月 22, 2020
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #18476 from dmatveev:dm/gapi_text_detection
上级
e8058b9f
95ff9282
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
755 addition
and
23 deletion
+755
-23
modules/gapi/include/opencv2/gapi/core.hpp
modules/gapi/include/opencv2/gapi/core.hpp
+19
-13
modules/gapi/include/opencv2/gapi/gstreaming.hpp
modules/gapi/include/opencv2/gapi/gstreaming.hpp
+16
-0
modules/gapi/include/opencv2/gapi/infer/parsers.hpp
modules/gapi/include/opencv2/gapi/infer/parsers.hpp
+12
-0
modules/gapi/perf/common/gapi_core_perf_tests_inl.hpp
modules/gapi/perf/common/gapi_core_perf_tests_inl.hpp
+2
-2
modules/gapi/samples/text_detection.cpp
modules/gapi/samples/text_detection.cpp
+698
-0
modules/gapi/src/api/kernels_core.cpp
modules/gapi/src/api/kernels_core.cpp
+4
-4
modules/gapi/src/backends/cpu/gcpucore.cpp
modules/gapi/src/backends/cpu/gcpucore.cpp
+2
-2
modules/gapi/test/common/gapi_core_tests_inl.hpp
modules/gapi/test/common/gapi_core_tests_inl.hpp
+2
-2
未找到文件。
modules/gapi/include/opencv2/gapi/core.hpp
浏览文件 @
e1b56e37
...
...
@@ -508,19 +508,23 @@ namespace core {
return
in
.
withType
(
in
.
depth
,
in
.
chan
).
withSize
(
dsize
);
}
};
}
// namespace core
G_TYPED_KERNEL
(
GSize
,
<
GOpaque
<
Size
>
(
GMat
)
>
,
"org.opencv.core.size"
)
{
static
GOpaqueDesc
outMeta
(
const
GMatDesc
&
)
{
return
empty_gopaque_desc
();
}
};
namespace
streaming
{
G_TYPED_KERNEL
(
GSizeR
,
<
GOpaque
<
Size
>
(
GOpaque
<
Rect
>
)
>
,
"org.opencv.core.sizeR"
)
{
static
GOpaqueDesc
outMeta
(
const
GOpaqueDesc
&
)
{
return
empty_gopaque_desc
();
}
};
}
// Operations for Streaming (declared in this header for convenience)
G_TYPED_KERNEL
(
GSize
,
<
GOpaque
<
Size
>
(
GMat
)
>
,
"org.opencv.streaming.size"
)
{
static
GOpaqueDesc
outMeta
(
const
GMatDesc
&
)
{
return
empty_gopaque_desc
();
}
};
G_TYPED_KERNEL
(
GSizeR
,
<
GOpaque
<
Size
>
(
GOpaque
<
Rect
>
)
>
,
"org.opencv.streaming.sizeR"
)
{
static
GOpaqueDesc
outMeta
(
const
GOpaqueDesc
&
)
{
return
empty_gopaque_desc
();
}
};
}
// namespace streaming
//! @addtogroup gapi_math
//! @{
...
...
@@ -1753,9 +1757,10 @@ GAPI_EXPORTS GMat warpAffine(const GMat& src, const Mat& M, const Size& dsize, i
int
borderMode
=
cv
::
BORDER_CONSTANT
,
const
Scalar
&
borderValue
=
Scalar
());
//! @} gapi_transform
namespace
streaming
{
/** @brief Gets dimensions from Mat.
@note Function textual ID is "org.opencv.
core
.size"
@note Function textual ID is "org.opencv.
streaming
.size"
@param src Input tensor
@return Size (tensor dimensions).
...
...
@@ -1765,12 +1770,13 @@ GAPI_EXPORTS GOpaque<Size> size(const GMat& src);
/** @overload
Gets dimensions from rectangle.
@note Function textual ID is "org.opencv.
core
.sizeR"
@note Function textual ID is "org.opencv.
streaming
.sizeR"
@param r Input rectangle.
@return Size (rectangle dimensions).
*/
GAPI_EXPORTS
GOpaque
<
Size
>
size
(
const
GOpaque
<
Rect
>&
r
);
}
//namespace streaming
}
//namespace gapi
}
//namespace cv
...
...
modules/gapi/include/opencv2/gapi/gstreaming.hpp
浏览文件 @
e1b56e37
...
...
@@ -111,6 +111,22 @@ public:
*/
GAPI_WRAP
void
setSource
(
const
gapi
::
wip
::
IStreamSource
::
Ptr
&
s
);
/**
* @brief Constructs and specifies an input video stream for a
* single-input computation pipeline with the given parameters.
*
* Throws if pipeline is already running. Use stop() and then
* setSource() to run the graph on a new video stream.
*
* @overload
* @param args arguments used to contruct and initialize a stream
* source.
*/
template
<
typename
T
,
typename
...
Args
>
void
setSource
(
Args
&&
...
args
)
{
setSource
(
cv
::
gapi
::
wip
::
make_src
<
T
>
(
std
::
forward
<
Args
>
(
args
)...));
}
/**
* @brief Start the pipeline execution.
*
...
...
modules/gapi/include/opencv2/gapi/infer/parsers.hpp
浏览文件 @
e1b56e37
...
...
@@ -122,4 +122,16 @@ GAPI_EXPORTS std::tuple<GArray<Rect>, GArray<int>> parseYolo(const GMat& in,
}
// namespace gapi
}
// namespace cv
// Reimport parseSSD & parseYolo under their initial namespace
namespace
cv
{
namespace
gapi
{
namespace
streaming
{
using
cv
::
gapi
::
parseSSD
;
using
cv
::
gapi
::
parseYolo
;
}
// namespace streaming
}
// namespace gapi
}
// namespace cv
#endif // OPENCV_GAPI_PARSERS_HPP
modules/gapi/perf/common/gapi_core_perf_tests_inl.hpp
浏览文件 @
e1b56e37
...
...
@@ -2124,7 +2124,7 @@ PERF_TEST_P_(SizePerfTest, TestPerformance)
// G-API code //////////////////////////////////////////////////////////////
cv
::
GMat
in
;
auto
out
=
cv
::
gapi
::
size
(
in
);
auto
out
=
cv
::
gapi
::
s
treaming
::
s
ize
(
in
);
cv
::
GComputation
c
(
cv
::
GIn
(
in
),
cv
::
GOut
(
out
));
cv
::
Size
out_sz
;
...
...
@@ -2156,7 +2156,7 @@ PERF_TEST_P_(SizeRPerfTest, TestPerformance)
// G-API code //////////////////////////////////////////////////////////////
cv
::
GOpaque
<
cv
::
Rect
>
op_rect
;
auto
out
=
cv
::
gapi
::
size
(
op_rect
);
auto
out
=
cv
::
gapi
::
s
treaming
::
s
ize
(
op_rect
);
cv
::
GComputation
c
(
cv
::
GIn
(
op_rect
),
cv
::
GOut
(
out
));
cv
::
Size
out_sz
;
...
...
modules/gapi/samples/text_detection.cpp
0 → 100644
浏览文件 @
e1b56e37
此差异已折叠。
点击以展开。
modules/gapi/src/api/kernels_core.cpp
浏览文件 @
e1b56e37
...
...
@@ -388,14 +388,14 @@ GMat warpAffine(const GMat& src, const Mat& M, const Size& dsize, int flags,
return
core
::
GWarpAffine
::
on
(
src
,
M
,
dsize
,
flags
,
borderMode
,
borderValue
);
}
GOpaque
<
Size
>
size
(
const
GMat
&
src
)
GOpaque
<
Size
>
s
treaming
::
s
ize
(
const
GMat
&
src
)
{
return
core
::
GSize
::
on
(
src
);
return
streaming
::
GSize
::
on
(
src
);
}
GOpaque
<
Size
>
size
(
const
GOpaque
<
Rect
>&
r
)
GOpaque
<
Size
>
s
treaming
::
s
ize
(
const
GOpaque
<
Rect
>&
r
)
{
return
core
::
GSizeR
::
on
(
r
);
return
streaming
::
GSizeR
::
on
(
r
);
}
}
//namespace gapi
...
...
modules/gapi/src/backends/cpu/gcpucore.cpp
浏览文件 @
e1b56e37
...
...
@@ -625,7 +625,7 @@ GAPI_OCV_KERNEL(GCPUParseYolo, cv::gapi::nn::parsers::GParseYolo)
}
};
GAPI_OCV_KERNEL
(
GCPUSize
,
cv
::
gapi
::
core
::
GSize
)
GAPI_OCV_KERNEL
(
GCPUSize
,
cv
::
gapi
::
streaming
::
GSize
)
{
static
void
run
(
const
cv
::
Mat
&
in
,
cv
::
Size
&
out
)
{
...
...
@@ -634,7 +634,7 @@ GAPI_OCV_KERNEL(GCPUSize, cv::gapi::core::GSize)
}
};
GAPI_OCV_KERNEL
(
GCPUSizeR
,
cv
::
gapi
::
core
::
GSizeR
)
GAPI_OCV_KERNEL
(
GCPUSizeR
,
cv
::
gapi
::
streaming
::
GSizeR
)
{
static
void
run
(
const
cv
::
Rect
&
in
,
cv
::
Size
&
out
)
{
...
...
modules/gapi/test/common/gapi_core_tests_inl.hpp
浏览文件 @
e1b56e37
...
...
@@ -1691,7 +1691,7 @@ TEST_P(SizeTest, ParseTest)
cv
::
GMat
in
;
cv
::
Size
out_sz
;
auto
out
=
cv
::
gapi
::
size
(
in
);
auto
out
=
cv
::
gapi
::
s
treaming
::
s
ize
(
in
);
cv
::
GComputation
c
(
cv
::
GIn
(
in
),
cv
::
GOut
(
out
));
c
.
apply
(
cv
::
gin
(
in_mat1
),
cv
::
gout
(
out_sz
),
getCompileArgs
());
...
...
@@ -1704,7 +1704,7 @@ TEST_P(SizeRTest, ParseTest)
cv
::
Size
out_sz
;
cv
::
GOpaque
<
cv
::
Rect
>
op_rect
;
auto
out
=
cv
::
gapi
::
size
(
op_rect
);
auto
out
=
cv
::
gapi
::
s
treaming
::
s
ize
(
op_rect
);
cv
::
GComputation
c
(
cv
::
GIn
(
op_rect
),
cv
::
GOut
(
out
));
c
.
apply
(
cv
::
gin
(
rect
),
cv
::
gout
(
out_sz
),
getCompileArgs
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录