Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Main Repositories
otb
Commits
8a3cf5e8
Commit
8a3cf5e8
authored
Mar 11, 2013
by
Otmane Lahlou
Browse files
BUG: percent initialization was wrong
parent
0003b7b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Code/Common/mvdHistogramModel.cxx
View file @
8a3cf5e8
...
...
@@ -106,10 +106,10 @@ HistogramModel
Histogram
::
FrequencyType
frequency
(
histogram
->
GetFrequency
(
index
)
);
// Initialize result (contribution of current bin)
double
percent
=
frequency
*
(
intensity
-
(
bound
==
BOUND_LOWER
?
minI
:
maxI
)
)
/
(
maxI
-
minI
);
double
percent
=
frequency
*
(
bound
==
BOUND_LOWER
?
(
intensity
-
minI
)
:
(
maxI
-
intensity
)
)
/
(
maxI
-
minI
);
// Number of bins of histogram.
Histogram
::
SizeType
::
SizeValueType
binCount
=
histogram
->
Size
();
...
...
@@ -144,7 +144,7 @@ HistogramModel
// Calculate frequency rate.
percent
/=
histogram
->
GetTotalFrequency
();
// Return frequency rate.
return
percent
;
}
...
...
Write
Preview
Supports
Markdown
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