Commit 30cfdc3b authored by jaco's avatar jaco

wip window warning fixing

......@@ -162,7 +162,7 @@ int main( int argc, char** argv )
saliencyAlgorithm.dynamicCast<MotionSaliencyBinWangApr2014>()->init();
bool paused = false;
while ( true )
for ( ;; )
{
if( !paused )
{
......
......@@ -157,7 +157,7 @@ bool MotionSaliencyBinWangApr2014::fullResolutionDetection( const Mat& image2, M
for ( size_t z = 0; z < backgroundModel.size(); z++ )
{
counter += backgroundModel[z]->ptr<Vec2f>( i )[j][1];
counter += (int)backgroundModel[z]->ptr<Vec2f>( i )[j][1];
}
if( counter != 0 ) //if at least the first template is activated / initialized
......@@ -460,17 +460,17 @@ bool MotionSaliencyBinWangApr2014::templateReplacement( const Mat& finalBFMask,
else if( i == 0 && j == 0 ) // upper leftt
{
split( *backgroundModel[z], mv );
backgroundModelROI = mv[0]( Rect( j, i, ceil( roiSize / 2 ), ceil( roiSize / 2 ) ) );
backgroundModelROI = mv[0]( Rect( j, i, (int)ceil( roiSize / 2 ), (int)ceil( roiSize / 2 ) ) );
}
else if( j == 0 && i > 0 && i < ( backgroundModel[z]->rows - 1 ) ) // middle left
{
split( *backgroundModel[z], mv );
backgroundModelROI = mv[0]( Rect( j, i - (int) floor( roiSize / 2 ), ceil( roiSize / 2 ), roiSize ) );
backgroundModelROI = mv[0]( Rect( j, i - (int) floor( roiSize / 2 ), (int)ceil( roiSize / 2 ), roiSize ) );
}
else if( i == ( backgroundModel[z]->rows - 1 ) && j == 0 ) //down left
{
split( *backgroundModel[z], mv );
backgroundModelROI = mv[0]( Rect( j, i - (int) floor( roiSize / 2 ), ceil( roiSize / 2 ), ceil( roiSize / 2 ) ) );
backgroundModelROI = mv[0]( Rect( j, i - (int) floor( roiSize / 2 ), (int)ceil( roiSize / 2 ), (int)ceil( roiSize / 2 ) ) );
}
else if( i == 0 && j > 0 && j < ( backgroundModel[z]->cols - 1 ) ) // upper - middle
{
......@@ -486,7 +486,7 @@ bool MotionSaliencyBinWangApr2014::templateReplacement( const Mat& finalBFMask,
else if( i == 0 && j == ( backgroundModel[z]->cols - 1 ) ) // upper right
{
split( *backgroundModel[z], mv );
backgroundModelROI = mv[0]( Rect( j - floor( roiSize / 2 ), i, (int) ceil( roiSize / 2 ), (int) ceil( roiSize / 2 ) ) );
backgroundModelROI = mv[0]( Rect( j - (int)floor( roiSize / 2 ), i, (int) ceil( roiSize / 2 ), (int) ceil( roiSize / 2 ) ) );
}
else if( j == ( backgroundModel[z]->cols - 1 ) && i > 0 && i < ( backgroundModel[z]->rows - 1 ) ) // middle - right
{
......
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