Commit d19f2ba6 authored by biagio montesano's avatar biagio montesano

Removed warnings from LSDDetector

parent 1f33b20b
......@@ -101,10 +101,7 @@ inline void checkLineExtremes( cv::Vec4i& extremes, cv::Size imageSize )
void LSDDetector::detect( const Mat& image, CV_OUT std::vector<KeyLine>& keylines, int scale, int numOctaves, const Mat& mask )
{
if( mask.data != NULL && ( mask.size() != image.size() || mask.type() != CV_8UC1 ) )
{
std::cout << "Mask error while detecting lines: " << "please check its dimensions and that data type is CV_8UC1" << std::endl;
CV_Assert( false );
}
throw std::runtime_error( "Mask error while detecting lines: please check its dimensions and that data type is CV_8UC1" );
else
detectImpl( image, keylines, numOctaves, scale, mask );
......@@ -118,12 +115,10 @@ void LSDDetector::detect( const std::vector<Mat>& images, std::vector<std::vecto
for ( size_t counter = 0; counter < images.size(); counter++ )
{
if( masks[counter].data != NULL && ( masks[counter].size() != images[counter].size() || masks[counter].type() != CV_8UC1 ) )
{
std::cout << "Masks error while detecting lines: " << "please check their dimensions and that data types are CV_8UC1" << std::endl;
CV_Assert( false );
}
throw std::runtime_error( "Masks error while detecting lines: please check their dimensions and that data types are CV_8UC1" );
detectImpl( images[counter], keylines[counter], numOctaves, scale, masks[counter] );
else
detectImpl( images[counter], keylines[counter], numOctaves, scale, masks[counter] );
}
}
......@@ -138,10 +133,7 @@ void LSDDetector::detectImpl( const Mat& imageSrc, std::vector<KeyLine>& keyline
/*check whether image depth is different from 0 */
if( image.depth() != 0 )
{
std::cout << "Warning, depth image!= 0" << std::endl;
CV_Assert( false );
}
throw std::runtime_error( "Error, depth image!= 0" );
/* create a pointer to self */
LSDDetector *lsd = const_cast<LSDDetector*>( this );
......
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