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:
927523b
)
fixed #2118
author
Maria Dimashova
<no@email>
Mon, 2 Jul 2012 20:21:34 +0000
(20:21 +0000)
committer
Maria Dimashova
<no@email>
Mon, 2 Jul 2012 20:21:34 +0000
(20:21 +0000)
modules/imgproc/src/grabcut.cpp
patch
|
blob
|
history
diff --git
a/modules/imgproc/src/grabcut.cpp
b/modules/imgproc/src/grabcut.cpp
index
98dbf74
..
4fb9b8d
100644
(file)
--- a/
modules/imgproc/src/grabcut.cpp
+++ b/
modules/imgproc/src/grabcut.cpp
@@
-305,7
+305,7
@@
static void calcNWeights( const Mat& img, Mat& leftW, Mat& upleftW, Mat& upW, Ma
}
else
upW.at<double>(y,x) = 0;
- if( x+1<img.cols
-1
&& y-1>=0 ) // upright
+ if( x+1<img.cols && y-1>=0 ) // upright
{
Vec3d diff = color - (Vec3d)img.at<Vec3b>(y-1,x+1);
uprightW.at<double>(y,x) = gammaDivSqrt2 * exp(-beta*diff.dot(diff));