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
cc3fb3d1
Commit
cc3fb3d1
authored
Jun 26, 2013
by
peng xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let CLAHE_OCL reuse cv::CLAHE abstract class.
parent
381057ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
16 deletions
+9
-16
ocl.hpp
modules/ocl/include/opencv2/ocl/ocl.hpp
+1
-13
imgproc.cpp
modules/ocl/src/imgproc.cpp
+8
-3
No files found.
modules/ocl/include/opencv2/ocl/ocl.hpp
View file @
cc3fb3d1
...
...
@@ -516,20 +516,8 @@ namespace cv
CV_EXPORTS
void
equalizeHist
(
const
oclMat
&
mat_src
,
oclMat
&
mat_dst
);
//! only 8UC1 is supported now
class
CV_EXPORTS
CLAHE
class
CV_EXPORTS
CLAHE
:
public
cv
::
CLAHE
{
public
:
virtual
void
apply
(
const
oclMat
&
src
,
oclMat
&
dst
)
=
0
;
virtual
void
setClipLimit
(
double
clipLimit
)
=
0
;
virtual
double
getClipLimit
()
const
=
0
;
virtual
void
setTilesGridSize
(
Size
tileGridSize
)
=
0
;
virtual
Size
getTilesGridSize
()
const
=
0
;
virtual
void
collectGarbage
()
=
0
;
virtual
~
CLAHE
()
{}
};
CV_EXPORTS
Ptr
<
cv
::
ocl
::
CLAHE
>
createCLAHE
(
double
clipLimit
=
40.0
,
Size
tileGridSize
=
Size
(
8
,
8
));
...
...
modules/ocl/src/imgproc.cpp
View file @
cc3fb3d1
...
...
@@ -1598,7 +1598,7 @@ namespace cv
cv
::
AlgorithmInfo
*
info
()
const
;
void
apply
(
c
onst
oclMat
&
src
,
oclMat
&
dst
);
void
apply
(
c
v
::
InputArray
src
,
cv
::
OutputArray
dst
);
void
setClipLimit
(
double
clipLimit
);
double
getClipLimit
()
const
;
...
...
@@ -1616,14 +1616,19 @@ namespace cv
oclMat
srcExt_
;
oclMat
lut_
;
};
CLAHE_Impl
::
CLAHE_Impl
(
double
clipLimit
,
int
tilesX
,
int
tilesY
)
:
clipLimit_
(
clipLimit
),
tilesX_
(
tilesX
),
tilesY_
(
tilesY
)
{
}
void
CLAHE_Impl
::
apply
(
const
oclMat
&
src
,
oclMat
&
dst
)
CV_INIT_ALGORITHM
(
CLAHE_Impl
,
"CLAHE_OCL"
,
obj
.
info
()
->
addParam
(
obj
,
"clipLimit"
,
obj
.
clipLimit_
);
obj
.
info
()
->
addParam
(
obj
,
"tilesX"
,
obj
.
tilesX_
);
obj
.
info
()
->
addParam
(
obj
,
"tilesY"
,
obj
.
tilesY_
))
void
CLAHE_Impl
::
apply
(
cv
::
InputArray
src_raw
,
cv
::
OutputArray
dst_raw
)
{
oclMat
&
src
=
getOclMatRef
(
src_raw
);
oclMat
&
dst
=
getOclMatRef
(
dst_raw
);
CV_Assert
(
src
.
type
()
==
CV_8UC1
);
dst
.
create
(
src
.
size
(),
src
.
type
()
);
...
...
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