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
82da445a
Commit
82da445a
authored
May 29, 2014
by
Elena Gvozdeva
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed CCOEFF cn==1
parent
a7036d96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
match_template.cl
modules/imgproc/src/opencl/match_template.cl
+5
-6
No files found.
modules/imgproc/src/opencl/match_template.cl
View file @
82da445a
...
...
@@ -330,15 +330,14 @@ __kernel void matchTemplate_Prepared_CCOEFF(__global const uchar * src_sums, int
if
(
x
<
dst_cols
&&
y
<
dst_rows
)
{
__global
const
T*
sum
=
(
__global
const
T*
)(
src_sums
+
mad24
(
y,
src_sums_step,
mad24
(
x,
(
int
)
sizeof
(
T
)
,
src_sums_offset
)))
;
int
step
=
src_sums_step/
(
int
)
sizeof
(
T
)
;
T
image_sum
=
(
T
)(
0
)
,
value
;
value
=
(
T
)(
sum[mad24
(
template_rows,
step,
template_cols
)
]
-
sum[mad24
(
template_rows,
step,
0
)
]
-
sum[template_cols]
+
sum[0]
)
;
value
=
*
(
__global
const
T1
*
)(
src_sums
+
SUMS
(
template_cols,
template_rows
))
;
value
-=
*
(
__global
const
T1
*
)(
src_sums
+
SUMS
(
0
,
template_rows
))
;
value
-=
*
(
__global
const
T1
*
)(
src_sums
+
SUMS
(
template_cols,
0
))
;
value
+=
*
(
__global
const
T1
*
)(
src_sums
+
SUMS
(
0
,
0
))
;
image_sum
=
mad
(
value,
template_sum
,
image_sum
)
;
image_sum
=
mad
(
value,
template_sum
,
0
)
;
int
dst_idx
=
mad24
(
y,
dst_step,
mad24
(
x,
(
int
)
sizeof
(
float
)
,
dst_offset
))
;
*
(
__global
float
*
)(
dst
+
dst_idx
)
-=
convertToDT
(
image_sum
)
;
...
...
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