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
e637168e
Commit
e637168e
authored
Jun 25, 2012
by
Marina Kolpakova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
completed test: load LBP classifier
parent
143c5706
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
+14
-9
cascadeclassifier.cpp
modules/gpu/src/cascadeclassifier.cpp
+13
-7
test_objdetect.cpp
modules/gpu/test/test_objdetect.cpp
+1
-2
No files found.
modules/gpu/src/cascadeclassifier.cpp
View file @
e637168e
...
...
@@ -97,16 +97,17 @@ cv::gpu::CascadeClassifier_GPU_LBP::~CascadeClassifier_GPU_LBP()
{
}
bool
cv
::
gpu
::
CascadeClassifier_GPU_LBP
::
empty
()
const
{
throw_nogpu
();
return
true
;
}
bool
cv
::
gpu
::
CascadeClassifier_GPU_LBP
::
empty
()
const
{
return
stage_mat
.
empty
();
}
bool
cv
::
gpu
::
CascadeClassifier_GPU_LBP
::
load
(
const
string
&
classifierAsXml
)
{
FileStorage
fs
(
classifierAsXml
,
FileStorage
::
READ
);
if
(
!
fs
.
isOpened
())
return
false
;
if
(
read
(
fs
.
getFirstTopLevelNode
()))
return
true
;
return
false
;
return
read
(
fs
.
getFirstTopLevelNode
());
}
#define GPU_CC_STAGE_TYPE "stageType"
...
...
@@ -162,7 +163,6 @@ bool CascadeClassifier_GPU_LBP::read(const FileNode &root)
std
::
vector
<
int
>
subsets
;
FileNodeIterator
it
=
fn
.
begin
(),
it_end
=
fn
.
end
();
int
i
=
0
;
for
(
size_t
si
=
0
;
it
!=
it_end
;
si
++
,
++
it
)
{
FileNode
fns
=
*
it
;
...
...
@@ -254,9 +254,15 @@ bool CascadeClassifier_GPU_LBP::read(const FileNode &root)
#undef GPU_CC_INTERNAL_NODES
#undef GPU_CC_LEAF_VALUES
Size
cv
::
gpu
::
CascadeClassifier_GPU_LBP
::
getClassifierSize
()
const
{
throw_nogpu
();
return
Size
();
}
Size
cv
::
gpu
::
CascadeClassifier_GPU_LBP
::
getClassifierSize
()
const
{
return
NxM
;
}
int
cv
::
gpu
::
CascadeClassifier_GPU_LBP
::
detectMultiScale
(
const
GpuMat
&
,
GpuMat
&
,
double
,
int
,
Size
)
{
throw_nogpu
();
return
0
;
}
int
cv
::
gpu
::
CascadeClassifier_GPU_LBP
::
detectMultiScale
(
const
GpuMat
&
image
,
GpuMat
&
objectsBuf
,
double
scaleFactor
=
1.2
,
int
minNeighbors
=
4
,
Size
minSize
=
Size
())
{
return
0
;
}
// ============ old fashioned haar cascade ==============================================//
struct
cv
::
gpu
::
CascadeClassifier_GPU
::
CascadeClassifierImpl
...
...
modules/gpu/test/test_objdetect.cpp
View file @
e637168e
...
...
@@ -299,9 +299,8 @@ PARAM_TEST_CASE(LBP_Read_classifier, cv::gpu::DeviceInfo, int)
TEST_P
(
LBP_Read_classifier
,
Accuracy
)
{
cv
::
gpu
::
CascadeClassifier_GPU_LBP
classifier
;
std
::
cout
<<
(
std
::
string
(
cvtest
::
TS
::
ptr
()
->
get_data_path
())
+
"lbpcascade/lbpcascade_frontalface.xml"
)
<<
std
::
endl
;
std
::
string
classifierXmlPath
=
std
::
string
(
cvtest
::
TS
::
ptr
()
->
get_data_path
())
+
"lbpcascade/lbpcascade_frontalface.xml"
;
classifier
.
load
(
classifierXmlPath
);
ASSERT_TRUE
(
classifier
.
load
(
classifierXmlPath
)
);
}
INSTANTIATE_TEST_CASE_P
(
GPU_ObjDetect
,
LBP_Read_classifier
,
testing
::
Combine
(
...
...
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