Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
0593a98a
Commit
0593a98a
authored
Aug 06, 2010
by
Sebastian Eichelbaum
Browse files
[STYLE]
parent
6db6a1e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
src/dataHandler/datastructures/WValueSetHistogram.cpp
src/dataHandler/datastructures/WValueSetHistogram.cpp
+1
-0
src/modules/histogramEqualization/WMHistogramEqualization.cpp
...modules/histogramEqualization/WMHistogramEqualization.cpp
+6
-1
No files found.
src/dataHandler/datastructures/WValueSetHistogram.cpp
View file @
0593a98a
...
...
@@ -22,6 +22,7 @@
//
//---------------------------------------------------------------------------
#include <algorithm>
#include <cstring> // memset()
#include <numeric>
#include <utility>
...
...
src/modules/histogramEqualization/WMHistogramEqualization.cpp
View file @
0593a98a
...
...
@@ -22,6 +22,7 @@
//
//---------------------------------------------------------------------------
#include <vector>
#include <string>
#include "../../kernel/WKernel.h"
...
...
@@ -161,6 +162,8 @@ void WMHistogramEqualization::moduleMain()
bool
foundU
=
false
;
size_t
curI
=
0
;
size_t
maxI
=
hist
->
size
()
-
1
;
// the largest index in hist
// search the histogram until the bucket with needed accumulative value is found
while
(
curI
<=
maxI
)
{
accumL
+=
(
*
hist
)[
curI
];
...
...
@@ -216,7 +219,9 @@ void WMHistogramEqualization::moduleMain()
{
double
cdfVI
=
cdf
[
hist
->
getIndexForValue
(
valueSet
->
getScalarDouble
(
vi
)
)
];
newData
[
vi
]
=
static_cast
<
unsigned
char
>
(
255.0
*
(
cdfVI
-
cdfMin
)
/
(
double
(
valueSet
->
rawSize
()
)
-
cdfMin
)
);
newData
[
vi
]
=
static_cast
<
unsigned
char
>
(
255.0
*
(
cdfVI
-
cdfMin
)
/
(
static_cast
<
double
>
(
valueSet
->
rawSize
()
)
-
cdfMin
)
);
}
}
else
...
...
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