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
5810a73d
Commit
5810a73d
authored
Mar 25, 2013
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CPU implementation of CLAHE
parent
5c327030
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
0 deletions
+37
-0
imgproc.hpp
modules/imgproc/include/opencv2/imgproc/imgproc.hpp
+15
-0
perf_histogram.cpp
modules/imgproc/perf/perf_histogram.cpp
+22
-0
histogram.cpp
modules/imgproc/src/histogram.cpp
+0
-0
No files found.
modules/imgproc/include/opencv2/imgproc/imgproc.hpp
View file @
5810a73d
...
...
@@ -759,6 +759,21 @@ CV_EXPORTS double compareHist( const SparseMat& H1, const SparseMat& H2, int met
//! normalizes the grayscale image brightness and contrast by normalizing its histogram
CV_EXPORTS_W
void
equalizeHist
(
InputArray
src
,
OutputArray
dst
);
class
CV_EXPORTS
CLAHE
:
public
Algorithm
{
public
:
virtual
void
apply
(
InputArray
src
,
OutputArray
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
;
};
CV_EXPORTS
Ptr
<
CLAHE
>
createCLAHE
(
double
clipLimit
=
40.0
,
Size
tileGridSize
=
Size
(
8
,
8
));
CV_EXPORTS
float
EMD
(
InputArray
signature1
,
InputArray
signature2
,
int
distType
,
InputArray
cost
=
noArray
(),
float
*
lowerBound
=
0
,
OutputArray
flow
=
noArray
()
);
...
...
modules/imgproc/perf/perf_histogram.cpp
View file @
5810a73d
...
...
@@ -115,3 +115,25 @@ PERF_TEST_P(MatSize, equalizeHist,
SANITY_CHECK
(
destination
);
}
typedef
tr1
::
tuple
<
Size
,
double
>
Sz_ClipLimit_t
;
typedef
TestBaseWithParam
<
Sz_ClipLimit_t
>
Sz_ClipLimit
;
PERF_TEST_P
(
Sz_ClipLimit
,
CLAHE
,
testing
::
Combine
(
testing
::
Values
(
::
perf
::
szVGA
,
::
perf
::
sz720p
,
::
perf
::
sz1080p
),
testing
::
Values
(
0.0
,
40.0
))
)
{
const
Size
size
=
get
<
0
>
(
GetParam
());
const
double
clipLimit
=
get
<
1
>
(
GetParam
());
Mat
src
(
size
,
CV_8UC1
);
declare
.
in
(
src
,
WARMUP_RNG
);
Ptr
<
CLAHE
>
clahe
=
createCLAHE
(
clipLimit
);
Mat
dst
;
TEST_CYCLE
()
clahe
->
apply
(
src
,
dst
);
SANITY_CHECK
(
dst
);
}
modules/imgproc/src/histogram.cpp
View file @
5810a73d
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