Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenWalnut Core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
44
Issues
44
List
Boards
Labels
Service Desk
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
7fde59ef
Commit
7fde59ef
authored
Aug 06, 2010
by
Sebastian Eichelbaum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CHANGE] - allow float percentage for clamping
parent
34987310
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/modules/histogramEqualization/WMHistogramEqualization.cpp
...modules/histogramEqualization/WMHistogramEqualization.cpp
+3
-3
No files found.
src/modules/histogramEqualization/WMHistogramEqualization.cpp
View file @
7fde59ef
...
...
@@ -102,7 +102,7 @@ void WMHistogramEqualization::properties()
m_histogramResolution
->
setMax
(
1000000
);
m_clampPerc
=
m_clamping
->
addProperty
(
"Min-Max clamping in %"
,
"Percent that are clamped from the beginning and the end of the histogram."
,
1
0
.0
,
m_propCondition
);
1.0
,
m_propCondition
);
m_clampPerc
->
setMin
(
0.0
);
m_clampPerc
->
setMax
(
100.0
);
...
...
@@ -170,7 +170,7 @@ void WMHistogramEqualization::moduleMain()
double
lower
=
hist
->
getMinimum
();
double
upper
=
hist
->
getMaximum
();
size_t
perc
=
m_clampPerc
->
get
(
true
);
double
perc
=
m_clampPerc
->
get
(
true
);
// should the histogram be clamped before processing?
++*
progress
;
...
...
@@ -180,7 +180,7 @@ void WMHistogramEqualization::moduleMain()
size_t
accumL
=
0
;
// accumulation of values from below
size_t
accumU
=
0
;
// accumulation of values from upper side
size_t
accumMax
=
hist
->
getTotalElementCount
()
*
perc
/
100
;
size_t
accumMax
=
static_cast
<
size_t
>
(
static_cast
<
double
>
(
hist
->
getTotalElementCount
()
)
*
perc
/
100.0
)
;
bool
foundL
=
false
;
bool
foundU
=
false
;
size_t
curI
=
0
;
...
...
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