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
336dcbcf
Commit
336dcbcf
authored
Jul 15, 2012
by
Marina Kolpakova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed brocken tests by classifier loger from r9027
parent
e4e00498
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
+17
-6
cascadeclassifier.cpp
modules/gpu/src/cascadeclassifier.cpp
+5
-5
test_objdetect.cpp
modules/gpu/test/test_objdetect.cpp
+4
-0
cascadedetect.cpp
modules/objdetect/src/cascadedetect.cpp
+8
-1
No files found.
modules/gpu/src/cascadeclassifier.cpp
View file @
336dcbcf
...
...
@@ -97,13 +97,15 @@ void cv::gpu::CascadeClassifier_GPU_LBP::allocateBuffers(cv::Size frame)
Ncv32u
bufSize
;
ncvSafeCall
(
nppiStIntegralGetSize_8u32u
(
roiSize
,
&
bufSize
,
prop
)
);
integralBuffer
.
create
(
1
,
bufSize
,
CV_8UC1
);
}
candidates
.
create
(
1
,
frame
.
width
>>
1
,
CV_32SC4
);
}
}
bool
cv
::
gpu
::
CascadeClassifier_GPU_LBP
::
empty
()
const
{
return
stage_mat
.
empty
();
}
Size
cv
::
gpu
::
CascadeClassifier_GPU_LBP
::
getClassifierSize
()
const
{
return
NxM
;
}
bool
cv
::
gpu
::
CascadeClassifier_GPU_LBP
::
empty
()
const
{
return
stage_mat
.
empty
();
}
bool
cv
::
gpu
::
CascadeClassifier_GPU_LBP
::
load
(
const
string
&
classifierAsXml
)
{
...
...
@@ -301,7 +303,6 @@ int cv::gpu::CascadeClassifier_GPU_LBP::detectMultiScale(const GpuMat& image, Gp
else
objects
.
create
(
1
,
image
.
cols
>>
4
,
CV_32SC4
);
// GpuMat candidates(1 , defaultObjSearchNum, CV_32SC4);
// used for debug
// candidates.setTo(cv::Scalar::all(0));
// objects.setTo(cv::Scalar::all(0));
...
...
@@ -314,7 +315,6 @@ int cv::gpu::CascadeClassifier_GPU_LBP::detectMultiScale(const GpuMat& image, Gp
GpuMat
dclassified
(
1
,
1
,
CV_32S
);
cudaSafeCall
(
cudaMemcpy
(
dclassified
.
ptr
(),
&
classified
,
sizeof
(
int
),
cudaMemcpyHostToDevice
)
);
//int step = 2;
// cv::gpu::device::lbp::bindIntegral(integral);
Size
scaledImageSize
(
image
.
cols
,
image
.
rows
);
...
...
modules/gpu/test/test_objdetect.cpp
View file @
336dcbcf
...
...
@@ -357,11 +357,15 @@ TEST_P(LBP_classify, Accuracy)
{
cv
::
Rect
r
=
faces
[
i
];
#if defined (LOG_CASCADE_STATISTIC)
std
::
cout
<<
r
.
x
<<
" "
<<
r
.
y
<<
" "
<<
r
.
width
<<
" "
<<
r
.
height
<<
std
::
endl
;
#endif
cv
::
rectangle
(
markedImage
,
r
,
CV_RGB
(
255
,
0
,
0
));
}
#if defined (LOG_CASCADE_STATISTIC)
cv
::
imshow
(
"Res"
,
markedImage
);
cv
::
waitKey
();
#endif
}
INSTANTIATE_TEST_CASE_P
(
GPU_ObjDetect
,
LBP_classify
,
...
...
modules/objdetect/src/cascadedetect.cpp
View file @
336dcbcf
...
...
@@ -978,7 +978,10 @@ struct CascadeClassifierInvoker
double
gypWeight
;
int
result
=
classifier
->
runAt
(
evaluator
,
Point
(
x
,
y
),
gypWeight
);
#if defined (LOG_CASCADE_STATISTIC)
logger
.
setPoint
(
Point
(
x
,
y
),
result
);
#endif
if
(
rejectLevels
)
{
if
(
result
==
1
)
...
...
@@ -1019,8 +1022,9 @@ bool CascadeClassifier::detectSingleScale( const Mat& image, int stripCount, Siz
if
(
!
featureEvaluator
->
setImage
(
image
,
data
.
origWinSize
)
)
return
false
;
#if defined (LOG_CASCADE_STATISTIC)
logger
.
setImage
(
image
);
#endif
Mat
currentMask
;
if
(
!
maskGenerator
.
empty
())
{
...
...
@@ -1044,7 +1048,10 @@ bool CascadeClassifier::detectSingleScale( const Mat& image, int stripCount, Siz
}
candidates
.
insert
(
candidates
.
end
(),
concurrentCandidates
.
begin
(),
concurrentCandidates
.
end
()
);
#if defined (LOG_CASCADE_STATISTIC)
logger
.
write
();
#endif
return
true
;
}
...
...
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