Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
dc88a2bc
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,发现更多精彩内容 >>
提交
dc88a2bc
编写于
12月 31, 2017
作者:
B
berak
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
video: clean up bg subtraction tutorial
上级
b1ed8bc0
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
4 addition
and
11 deletion
+4
-11
doc/tutorials/video/background_subtraction/background_subtraction.markdown
...eo/background_subtraction/background_subtraction.markdown
+4
-11
doc/tutorials/video/background_subtraction/images/Background_Subtraction_Tutorial_Result_1.png
...ction/images/Background_Subtraction_Tutorial_Result_1.png
+0
-0
doc/tutorials/video/background_subtraction/images/Background_Subtraction_Tutorial_Result_2.png
...ction/images/Background_Subtraction_Tutorial_Result_2.png
+0
-0
未找到文件。
doc/tutorials/video/background_subtraction/background_subtraction.markdown
浏览文件 @
dc88a2bc
...
...
@@ -40,9 +40,7 @@ Code
In the following you can find the source code. We will let the user chose to process either a video
file or a sequence of images.
Two different methods are used to generate two foreground masks:
-# cv::bgsegm::BackgroundSubtractorMOG
-# @ref cv::BackgroundSubtractorMOG2
We will use @ref cv::BackgroundSubtractorMOG2 in this sample, to generate the foreground mask.
The results as well as the input data are shown on the screen.
The source file can be downloaded
[
here
](
https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/video/bg_sub.cpp
)
.
...
...
@@ -54,22 +52,19 @@ Explanation
We discuss the main parts of the above code:
-# First, t
hree
Mat objects are allocated to store the current frame and two foreground masks,
-# First, t
wo
Mat objects are allocated to store the current frame and two foreground masks,
obtained by using two different BS algorithms.
@code{.cpp}
Mat frame; //current frame
Mat fgMaskMOG; //fg mask generated by MOG method
Mat fgMaskMOG2; //fg mask fg mask generated by MOG2 method
@endcode
-#
Two @ref cv::BackgroundSubtractor objects will be used to generate the foreground masks
. In this
-#
A @ref cv::BackgroundSubtractor object will be used to generate the foreground mask
. In this
example, default parameters are used, but it is also possible to declare specific parameters in
the create function.
@code{.cpp}
Ptr
<BackgroundSubtractor>
pMOG; //MOG Background subtractor
Ptr
<BackgroundSubtractor>
pMOG2; //MOG2 Background subtractor
...
//create Background Subtractor objects
pMOG = createBackgroundSubtractorMOG(); //MOG approach
//create Background Subtractor object
pMOG2 = createBackgroundSubtractorMOG2(); //MOG2 approach
@endcode
-# The command line arguments are analysed. The user can chose between two options:
...
...
@@ -101,7 +96,6 @@ We discuss the main parts of the above code:
set a specific learning rate by passing a third parameter to the 'apply' method.
@code{.cpp}
//update the background model
pMOG->apply(frame, fgMaskMOG);
pMOG2->apply(frame, fgMaskMOG2);
@endcode
-# The current frame number can be extracted from the @ref cv::VideoCapture object and stamped in
...
...
@@ -121,7 +115,6 @@ We discuss the main parts of the above code:
@code{.cpp}
//show the current frame and the fg masks
imshow("Frame", frame);
imshow("FG Mask MOG", fgMaskMOG);
imshow("FG Mask MOG 2", fgMaskMOG2);
@endcode
-# The same operations listed above can be performed using a sequence of images as input. The
...
...
doc/tutorials/video/background_subtraction/images/Background_Subtraction_Tutorial_Result_1.png
浏览文件 @
dc88a2bc
此差异由.gitattributes 抑制。
doc/tutorials/video/background_subtraction/images/Background_Subtraction_Tutorial_Result_2.png
浏览文件 @
dc88a2bc
此差异由.gitattributes 抑制。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录