Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv_contrib
Commits
d253a0fa
Commit
d253a0fa
authored
Mar 14, 2017
by
Vladislav Sovrasov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bgsegm: convert rgb images to gray in CNT
parent
34f910bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
bgfg.cpp
modules/bgsegm/samples/bgfg.cpp
+0
-0
bgfg_subcnt.cpp
modules/bgsegm/src/bgfg_subcnt.cpp
+4
-1
No files found.
modules/bgsegm/samples/bgfg
_gmg
.cpp
→
modules/bgsegm/samples/bgfg.cpp
View file @
d253a0fa
File moved
modules/bgsegm/src/bgfg_subcnt.cpp
View file @
d253a0fa
...
...
@@ -341,9 +341,12 @@ private:
void
BackgroundSubtractorCNTImpl
::
apply
(
InputArray
image
,
OutputArray
_fgmask
,
double
learningRate
)
{
CV_Assert
(
image
.
type
()
==
CV_8UC1
);
CV_Assert
(
image
.
depth
()
==
CV_8U
);
Mat
frameIn
=
image
.
getMat
();
if
(
frameIn
.
channels
()
!=
1
)
cvtColor
(
frameIn
,
frameIn
,
COLOR_BGR2GRAY
);
_fgmask
.
create
(
image
.
size
(),
CV_8U
);
// OutputArray usage requires this step
Mat
fgMask
=
_fgmask
.
getMat
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment