Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Commits
17c6b4d3
Commit
17c6b4d3
authored
Jan 29, 2014
by
Elena Gvozdeva
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed warnings
parent
0edd0aaf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
bgfg_gaussmix2.cpp
modules/video/src/bgfg_gaussmix2.cpp
+5
-5
No files found.
modules/video/src/bgfg_gaussmix2.cpp
View file @
17c6b4d3
...
...
@@ -371,7 +371,7 @@ protected:
String
name_
;
bool
ocl_getBackgroundImage
(
OutputArray
backgroundImage
)
const
;
bool
ocl_apply
(
InputArray
_image
,
OutputArray
_fgmask
,
bool
needToInitialize
,
double
learningRate
=-
1
);
bool
ocl_apply
(
InputArray
_image
,
OutputArray
_fgmask
,
double
learningRate
=-
1
);
};
struct
GaussBGStatModel2Params
...
...
@@ -736,7 +736,7 @@ public:
uchar
shadowVal
;
};
bool
BackgroundSubtractorMOG2Impl
::
ocl_apply
(
InputArray
_image
,
OutputArray
_fgmask
,
bool
needToInitialize
,
double
learningRate
)
bool
BackgroundSubtractorMOG2Impl
::
ocl_apply
(
InputArray
_image
,
OutputArray
_fgmask
,
double
learningRate
)
{
++
nframes
;
learningRate
=
learningRate
>=
0
&&
nframes
>
1
?
learningRate
:
1.
/
std
::
min
(
2
*
nframes
,
history
);
...
...
@@ -746,7 +746,7 @@ bool BackgroundSubtractorMOG2Impl::ocl_apply(InputArray _image, OutputArray _fgm
fgmask
.
setTo
(
cv
::
Scalar
::
all
(
1
));
const
float
alpha1
=
1.0
f
-
learningRate
;
const
double
alpha1
=
1.0
f
-
learningRate
;
int
detectShadows_flag
=
0
;
if
(
bShadowDetection
)
...
...
@@ -800,7 +800,7 @@ void BackgroundSubtractorMOG2Impl::apply(InputArray _image, OutputArray _fgmask,
if
(
opencl_ON
)
{
if
(
ocl_apply
(
_image
,
_fgmask
,
needToInitialize
,
learningRate
))
if
(
ocl_apply
(
_image
,
_fgmask
,
learningRate
))
return
;
else
initialize
(
_image
.
size
(),
_image
.
type
());
...
...
@@ -850,7 +850,7 @@ void BackgroundSubtractorMOG2Impl::getBackgroundImage(OutputArray backgroundImag
{
if
(
opencl_ON
)
{
if
(
ocl_getBackgroundImage
(
backgroundImage
))
;
if
(
ocl_getBackgroundImage
(
backgroundImage
))
return
;
opencl_ON
=
false
;
...
...
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