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
db391fdf
Commit
db391fdf
authored
Aug 29, 2014
by
Rok Mandeljc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
samples: gpu: performance: BackgroundSubtractorMOG is now part of opencv_bgsegm module
parent
fbf28bcc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
CMakeLists.txt
samples/gpu/performance/CMakeLists.txt
+8
-0
tests.cpp
samples/gpu/performance/tests.cpp
+9
-1
No files found.
samples/gpu/performance/CMakeLists.txt
View file @
db391fdf
...
...
@@ -7,6 +7,10 @@ if(HAVE_opencv_xfeatures2d)
ocv_include_directories
(
"
${
opencv_xfeatures2d_SOURCE_DIR
}
/include"
)
endif
()
if
(
HAVE_opencv_bgsegm
)
ocv_include_directories
(
"
${
opencv_bgsegm_SOURCE_DIR
}
/include"
)
endif
()
add_executable
(
${
the_target
}
${
sources
}
${
headers
}
)
ocv_target_link_libraries
(
${
the_target
}
${
OPENCV_LINKER_LIBS
}
${
OPENCV_CUDA_SAMPLES_REQUIRED_DEPS
}
)
...
...
@@ -14,6 +18,10 @@ if(HAVE_opencv_xfeatures2d)
ocv_target_link_libraries
(
${
the_target
}
opencv_xfeatures2d
)
endif
()
if
(
HAVE_opencv_bgsegm
)
ocv_target_link_libraries
(
${
the_target
}
opencv_bgsegm
)
endif
()
set_target_properties
(
${
the_target
}
PROPERTIES
OUTPUT_NAME
"performance_gpu"
PROJECT_LABEL
"(EXAMPLE_CUDA) performance"
)
...
...
samples/gpu/performance/tests.cpp
View file @
db391fdf
...
...
@@ -21,6 +21,10 @@
#include "opencv2/xfeatures2d/nonfree.hpp"
#endif
#ifdef HAVE_OPENCV_BGSEGM
#include "opencv2/bgsegm.hpp"
#endif
using
namespace
std
;
using
namespace
cv
;
...
...
@@ -1266,6 +1270,8 @@ TEST(FarnebackOpticalFlow)
}}}
}
#ifdef HAVE_OPENCV_BGSEGM
TEST
(
MOG
)
{
const
std
::
string
inputFile
=
abspath
(
"768x576.avi"
);
...
...
@@ -1276,7 +1282,7 @@ TEST(MOG)
cv
::
Mat
frame
;
cap
>>
frame
;
cv
::
Ptr
<
cv
::
BackgroundSubtractor
>
mog
=
cv
::
createBackgroundSubtractorMOG
();
cv
::
Ptr
<
cv
::
BackgroundSubtractor
>
mog
=
cv
::
bgsegm
::
createBackgroundSubtractorMOG
();
cv
::
Mat
foreground
;
mog
->
apply
(
frame
,
foreground
,
0.01
);
...
...
@@ -1317,6 +1323,8 @@ TEST(MOG)
TestSystem
::
instance
().
gpuComplete
();
}
#endif
TEST
(
MOG2
)
{
const
std
::
string
inputFile
=
abspath
(
"768x576.avi"
);
...
...
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