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
409bd162
Commit
409bd162
authored
Feb 28, 2014
by
Andrey Pavlenko
Committed by
OpenCV Buildbot
Feb 28, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2421 from akarsakov:fix_ocl_haar_intel
parents
7dc22b4e
e6f67075
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
haar.cpp
modules/ocl/src/haar.cpp
+2
-2
haarobjectdetect.cl
modules/ocl/src/opencl/haarobjectdetect.cl
+2
-2
test_objdetect.cpp
modules/ocl/test/test_objdetect.cpp
+2
-2
No files found.
modules/ocl/src/haar.cpp
View file @
409bd162
...
...
@@ -888,12 +888,12 @@ CvSeq *cv::ocl::OclCascadeClassifier::oclHaarDetectObjects( oclMat &gimg, CvMemS
for
(
int
y
=
0
;
y
<
WGNumY
;
++
y
)
{
int
gy
=
y
*
localThreads
[
1
];
if
(
gy
>=
(
Height
-
cascade
->
orig_window_size
.
height
)
)
if
(
gy
>=
Height
)
continue
;
// no data to process
for
(
int
x
=
0
;
x
<
WGNumX
;
++
x
)
{
int
gx
=
x
*
localThreads
[
0
];
if
(
gx
>=
(
Width
-
cascade
->
orig_window_size
.
width
)
)
if
(
gx
>=
Width
)
continue
;
// no data to process
if
(
scaleinfo
[
z
].
factor
<=
2
)
...
...
modules/ocl/src/opencl/haarobjectdetect.cl
View file @
409bd162
...
...
@@ -150,8 +150,8 @@ __kernel void gpuRunHaarClassifierCascadePacked(
int
index
=
i+lid
; // index in shared local memory
if
(
index<DATA_SIZE
)
{//
calc
global
x,y
coordinat
and
read
data
from
there
int
x
=
min
(
GroupX
+
(
index
%
(
DATA_SIZE_X
))
,
Width-1
)
;
int
y
=
min
(
GroupY
+
(
index
/
(
DATA_SIZE_X
))
,
Height-1
)
;
int
x
=
min
(
GroupX
+
(
index
%
(
DATA_SIZE_X
))
,
Width-1
+WND_SIZE_X
)
;
int
y
=
min
(
GroupY
+
(
index
/
(
DATA_SIZE_X
))
,
Height-1
+WND_SIZE_Y
)
;
SumL[index]
=
sum[ImgOffset+y*pixelstep+x]
;
}
}
...
...
modules/ocl/test/test_objdetect.cpp
View file @
409bd162
...
...
@@ -226,7 +226,7 @@ OCL_TEST_P(Haar, FaceDetect)
flags
,
Size
(
30
,
30
),
Size
(
0
,
0
));
EXPECT_LT
(
checkRectSimilarity
(
img
.
size
(),
faces
,
oclfaces
),
1.0
);
EXPECT_LT
(
checkRectSimilarity
(
img
.
size
(),
faces
,
oclfaces
),
0.1
);
}
OCL_TEST_P
(
Haar
,
FaceDetectUseBuf
)
...
...
@@ -247,7 +247,7 @@ OCL_TEST_P(Haar, FaceDetectUseBuf)
Size
(
30
,
30
));
cascadebuf
.
release
();
EXPECT_LT
(
checkRectSimilarity
(
img
.
size
(),
faces
,
oclfaces
),
1.0
);
EXPECT_LT
(
checkRectSimilarity
(
img
.
size
(),
faces
,
oclfaces
),
0.1
);
}
INSTANTIATE_TEST_CASE_P
(
OCL_ObjDetect
,
Haar
,
...
...
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