projects
/
profile
/
ivi
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f8b23cf
)
Fixed truncation warning
author
pradeep
<pradeep.pyro@gmail.com>
Wed, 9 Jul 2014 07:29:47 +0000
(15:29 +0800)
committer
pradeep
<pradeep.pyro@gmail.com>
Wed, 9 Jul 2014 07:29:47 +0000
(15:29 +0800)
modules/imgproc/src/histogram.cpp
patch
|
blob
|
history
diff --git
a/modules/imgproc/src/histogram.cpp
b/modules/imgproc/src/histogram.cpp
index
c16386e
..
97ca3de
100644
(file)
--- a/
modules/imgproc/src/histogram.cpp
+++ b/
modules/imgproc/src/histogram.cpp
@@
-2457,9
+2457,9
@@
double cv::compareHist( const SparseMat& H1, const SparseMat& H2, int method )
{
for( i = 0; i < N1; i++, ++it )
{
-
float
v1 = it.value<float>();
+
double
v1 = it.value<float>();
const SparseMat::Node* node = it.node();
-
float
v2 = PH2->value<float>(node->idx, (size_t*)&node->hashval);
+
double
v2 = PH2->value<float>(node->idx, (size_t*)&node->hashval);
if( !v2 )
v2 = 1e-10;
result += v1 * cv::log( v1 / v2 );