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:
5ca25ab
)
cv::compareHist (CV_COMP_INTERSECT)
author
Ilya Lavrenov
<ilya.lavrenov@itseez.com>
Sun, 12 Oct 2014 17:16:59 +0000
(10:16 -0700)
committer
Ilya Lavrenov
<ilya.lavrenov@itseez.com>
Sat, 1 Nov 2014 10:19:51 +0000
(13:19 +0300)
modules/imgproc/src/histogram.cpp
patch
|
blob
|
history
diff --git
a/modules/imgproc/src/histogram.cpp
b/modules/imgproc/src/histogram.cpp
index
7385f00
..
9acdc11
100644
(file)
--- a/
modules/imgproc/src/histogram.cpp
+++ b/
modules/imgproc/src/histogram.cpp
@@
-2316,7
+2316,16
@@
double cv::compareHist( InputArray _H1, InputArray _H2, int method )
}
else if( method == CV_COMP_INTERSECT )
{
- for( j = 0; j < len; j++ )
+ j = 0;
+ #if CV_NEON
+ float32x4_t v_result = vdupq_n_f32(0.0f);
+ for( ; j <= len - 4; j += 4 )
+ v_result = vaddq_f32(v_result, vminq_f32(vld1q_f32(h1 + j), vld1q_f32(h2 + j)));
+ float CV_DECL_ALIGNED(16) ar[4];
+ vst1q_f32(ar, v_result);
+ result += ar[0] + ar[1] + ar[2] + ar[3];
+ #endif
+ for( ; j < len; j++ )
result += std::min(h1[j], h2[j]);
}
else if( method == CV_COMP_BHATTACHARYYA )