Commit 21d563c0 authored by jaco's avatar jaco

wip compile error fixing

parent 8a8302aa
...@@ -67,20 +67,20 @@ private: ...@@ -67,20 +67,20 @@ private:
inline float FilterTIG::dot(const INT64 tig1, const INT64 tig2, const INT64 tig4, const INT64 tig8) inline float FilterTIG::dot(const INT64 tig1, const INT64 tig2, const INT64 tig4, const INT64 tig8)
{ {
INT64 bcT1 = POPCNT64(tig1); INT64 bcT1 = (INT64)POPCNT64(tig1);
INT64 bcT2 = POPCNT64(tig2); INT64 bcT2 = (INT64)POPCNT64(tig2);
INT64 bcT4 = POPCNT64(tig4); INT64 bcT4 = (INT64)POPCNT64(tig4);
INT64 bcT8 = POPCNT64(tig8); INT64 bcT8 = (INT64)POPCNT64(tig8);
INT64 bc01 = (POPCNT64(_bTIGs[0] & tig1) << 1) - bcT1; INT64 bc01 = (INT64)(POPCNT64(_bTIGs[0] & tig1) << 1) - bcT1;
INT64 bc02 = ((POPCNT64(_bTIGs[0] & tig2) << 1) - bcT2) << 1; INT64 bc02 = (INT64)((POPCNT64(_bTIGs[0] & tig2) << 1) - bcT2) << 1;
INT64 bc04 = ((POPCNT64(_bTIGs[0] & tig4) << 1) - bcT4) << 2; INT64 bc04 = (INT64)((POPCNT64(_bTIGs[0] & tig4) << 1) - bcT4) << 2;
INT64 bc08 = ((POPCNT64(_bTIGs[0] & tig8) << 1) - bcT8) << 3; INT64 bc08 = (INT64)((POPCNT64(_bTIGs[0] & tig8) << 1) - bcT8) << 3;
INT64 bc11 = (POPCNT64(_bTIGs[1] & tig1) << 1) - bcT1; INT64 bc11 = (INT64)(POPCNT64(_bTIGs[1] & tig1) << 1) - bcT1;
INT64 bc12 = ((POPCNT64(_bTIGs[1] & tig2) << 1) - bcT2) << 1; INT64 bc12 = (INT64)((POPCNT64(_bTIGs[1] & tig2) << 1) - bcT2) << 1;
INT64 bc14 = ((POPCNT64(_bTIGs[1] & tig4) << 1) - bcT4) << 2; INT64 bc14 = (INT64)((POPCNT64(_bTIGs[1] & tig4) << 1) - bcT4) << 2;
INT64 bc18 = ((POPCNT64(_bTIGs[1] & tig8) << 1) - bcT8) << 3; INT64 bc18 = (INT64)((POPCNT64(_bTIGs[1] & tig8) << 1) - bcT8) << 3;
return _coeffs1[0] * (bc01 + bc02 + bc04 + bc08) + _coeffs1[1] * (bc11 + bc12 + bc14 + bc18); return _coeffs1[0] * (bc01 + bc02 + bc04 + bc08) + _coeffs1[1] * (bc11 + bc12 + bc14 + bc18);
} }
...@@ -94,30 +94,26 @@ class CV_EXPORTS_W StaticSaliency : public virtual Saliency ...@@ -94,30 +94,26 @@ class CV_EXPORTS_W StaticSaliency : public virtual Saliency
public: public:
bool computeBinaryMap( const Mat& saliencyMap, Mat& binaryMap ); bool computeBinaryMap( const Mat& saliencyMap, Mat& binaryMap );
AlgorithmInfo* info() const = 0;
protected: protected:
virtual bool computeSaliencyImpl( const InputArray image, OutputArray saliencyMap ) = 0; virtual bool computeSaliencyImpl( const InputArray image, OutputArray saliencyMap )=0;
}; };
/************************************ Motion Saliency Base Class ************************************/ /************************************ Motion Saliency Base Class ************************************/
class CV_EXPORTS_W MotionSaliency : public virtual Saliency class CV_EXPORTS_W MotionSaliency : public virtual Saliency
{ {
public:
AlgorithmInfo* info() const = 0;
protected:
virtual bool computeSaliencyImpl( const InputArray image, OutputArray saliencyMap ) = 0;
protected:
virtual bool computeSaliencyImpl( const InputArray image, OutputArray saliencyMap )=0;
}; };
/************************************ Objectness Base Class ************************************/ /************************************ Objectness Base Class ************************************/
class CV_EXPORTS_W Objectness : public virtual Saliency class CV_EXPORTS_W Objectness : public virtual Saliency
{ {
public:
AlgorithmInfo* info() const = 0;
protected: protected:
virtual bool computeSaliencyImpl( const InputArray image, OutputArray saliencyMap ) = 0; virtual bool computeSaliencyImpl( const InputArray image, OutputArray saliencyMap )=0;
}; };
......
...@@ -48,5 +48,4 @@ namespace cv ...@@ -48,5 +48,4 @@ namespace cv
* Motion Saliency * Motion Saliency
*/ */
}/* namespace cv */ }/* namespace cv */
...@@ -48,5 +48,4 @@ namespace cv ...@@ -48,5 +48,4 @@ namespace cv
* Objectness * Objectness
*/ */
}/* namespace cv */ }/* namespace cv */
...@@ -58,11 +58,11 @@ CV_INIT_ALGORITHM( ...@@ -58,11 +58,11 @@ CV_INIT_ALGORITHM(
ObjectnessBING, "SALIENCY.BING", ObjectnessBING, "SALIENCY.BING",
obj.info()->addParam(obj, "_base", obj._base); obj.info()->addParam(obj, "_NSS", obj._NSS); obj.info()->addParam(obj, "_W", obj._W) ); obj.info()->addParam(obj, "_base", obj._base); obj.info()->addParam(obj, "_NSS", obj._NSS); obj.info()->addParam(obj, "_W", obj._W) );
bool initModule_saliency( void ) bool initModule_saliency( void )
{ {
bool all = true; bool all = true;
all &= !StaticSaliencySpectralResidual_info_auto.name().empty(); all &= !StaticSaliencySpectralResidual_info_auto.name().empty();
//all &= !MotionSaliencySuBSENSE_info_auto.name().empty();
all &= !ObjectnessBING_info_auto.name().empty(); all &= !ObjectnessBING_info_auto.name().empty();
return all; return all;
......
...@@ -48,7 +48,6 @@ namespace cv ...@@ -48,7 +48,6 @@ namespace cv
* StaticSaliency * StaticSaliency
*/ */
bool StaticSaliency::computeBinaryMap( const Mat& saliencyMap, Mat& BinaryMap ) bool StaticSaliency::computeBinaryMap( const Mat& saliencyMap, Mat& BinaryMap )
{ {
...@@ -87,7 +86,7 @@ bool StaticSaliency::computeBinaryMap( const Mat& saliencyMap, Mat& BinaryMap ) ...@@ -87,7 +86,7 @@ bool StaticSaliency::computeBinaryMap( const Mat& saliencyMap, Mat& BinaryMap )
//Convert //Convert
outputMat = outputMat * 255; outputMat = outputMat * 255;
outputMat.convertTo( outputMat, CV_8U ); outputMat.convertTo( outputMat, CV_8U );
//saliencyMap = outputMat; //saliencyMap = outputMat;
// adaptative thresholding using Otsu's method, to make saliency map binary // adaptative thresholding using Otsu's method, to make saliency map binary
threshold( outputMat, BinaryMap, 0, 255, THRESH_BINARY | THRESH_OTSU ); threshold( outputMat, BinaryMap, 0, 255, THRESH_BINARY | THRESH_OTSU );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment