You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/saliency/src/BackgroundContrast.cpp
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ namespace cv
33
33
namespacesaliency
34
34
{
35
35
36
-
BackgroundContrast::BackgroundContrast( int _limitOfSP, int _nOfLevel, int _usePrior, int _histBin ): limitOfSP(_limitOfSP), nOfLevel(_nOfLevel), usePrior(_usePrior), histBin(_histBin) {}
36
+
BackgroundContrast::BackgroundContrast( double _bgWei, int _limitOfSP, int _nOfLevel, int _usePrior, int _histBin ): limitOfSP(_limitOfSP), nOfLevel(_nOfLevel), usePrior(_usePrior), histBin(_histBin), bgWei(_bgWei) {}
37
37
BackgroundContrast::~BackgroundContrast(){}
38
38
39
39
Mat BackgroundContrast::saliencyMapGenerator( const Mat img, const Mat fgImg, int option )
@@ -62,6 +62,7 @@ Mat BackgroundContrast::saliencyMapGenerator( const Mat img, const Mat fgImg, in
62
62
else
63
63
{
64
64
Mat temp = fgImg.clone();
65
+
if (temp.channels() == 3) cvtColor(temp, temp, COLOR_BGR2GRAY);
@@ -90,7 +91,7 @@ Mat BackgroundContrast::saliencyMapGenerator( const Mat img, const Mat fgImg, in
90
91
return saliency;
91
92
}
92
93
93
-
voidBackgroundContrast::saliencyOptimize( const Mat adjcMatrix, const Mat colDistM, const Mat bgWeight, const Mat fgWeight, Mat& saliencyOptimized, doubleneiSigma, doublebgLambda )
94
+
voidBackgroundContrast::saliencyOptimize( const Mat adjcMatrix, const Mat colDistM, const Mat bgWeight, const Mat fgWeight, Mat& saliencyOptimized, doublebgLambda, doubleneiSigma )
0 commit comments