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
9db28f33
Commit
9db28f33
authored
Feb 17, 2014
by
Ilya Lavrenov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more fixes
parent
891dbeab
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
fast_nlmeans_denoising_invoker.hpp
modules/photo/src/fast_nlmeans_denoising_invoker.hpp
+2
-0
fast_nlmeans_denoising_opencl.hpp
modules/photo/src/fast_nlmeans_denoising_opencl.hpp
+6
-4
nlmeans.cl
modules/photo/src/opencl/nlmeans.cl
+0
-0
No files found.
modules/photo/src/fast_nlmeans_denoising_invoker.hpp
View file @
9db28f33
...
...
@@ -137,6 +137,8 @@ FastNlMeansDenoisingInvoker<T>::FastNlMeansDenoisingInvoker(
double
dist
=
almost_dist
*
almost_dist2actual_dist_multiplier
;
int
weight
=
cvRound
(
fixed_point_mult_
*
std
::
exp
(
-
dist
/
(
h
*
h
*
sizeof
(
T
))));
printf
(
"%d "
,
weight
);
if
(
weight
<
WEIGHT_THRESHOLD
*
fixed_point_mult_
)
weight
=
0
;
...
...
modules/photo/src/fast_nlmeans_denoising_opencl.hpp
View file @
9db28f33
...
...
@@ -111,15 +111,17 @@ static bool ocl_fastNlMeansDenoising(InputArray _src, OutputArray _dst, float h,
_dst
.
create
(
size
,
type
);
UMat
dst
=
_dst
.
getUMat
();
Size
upColSumSize
(
size
.
width
,
searchWindowSize
*
searchWindowSize
*
nblocksy
);
Size
colSumSize
(
nblocksx
*
templateWindowSize
,
searchWindowSize
*
searchWindowSize
*
nblocksy
);
int
searchWindowSizeSq
=
searchWindowSize
*
searchWindowSize
;
Size
upColSumSize
(
size
.
width
,
searchWindowSizeSq
*
nblocksy
);
Size
colSumSize
(
nblocksx
*
templateWindowSize
,
searchWindowSizeSq
*
nblocksy
);
UMat
buffer
(
upColSumSize
+
colSumSize
,
CV_32SC
(
cn
));
srcex
=
srcex
(
Rect
(
Point
(
borderSize
,
borderSize
),
size
));
k
.
args
(
ocl
::
KernelArg
::
ReadOnlyNoSize
(
srcex
),
ocl
::
KernelArg
::
WriteOnly
(
dst
),
ocl
::
KernelArg
::
PtrReadOnly
(
almostDist2Weight
),
nblocksy
,
nblocksx
,
ocl
::
KernelArg
::
PtrReadOnly
(
almostDist2Weight
),
ocl
::
KernelArg
::
PtrReadOnly
(
buffer
),
almostTemplateWindowSizeSqBinShift
);
size_t
globalsize
[
2
]
=
{
nblocksx
,
nblocksy
},
localsize
[
2
]
=
{
CTA_SIZE
,
1
};
size_t
globalsize
[
2
]
=
{
nblocksx
*
BLOCK_COLS
,
nblocksy
*
BLOCK_ROWS
},
localsize
[
2
]
=
{
CTA_SIZE
,
1
};
return
k
.
run
(
2
,
globalsize
,
localsize
,
false
);
}
...
...
modules/photo/src/opencl/nlmeans.cl
View file @
9db28f33
This diff is collapsed.
Click to expand it.
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