Hi,
NOTE: I do believe that this is not an openCV related problem but since the error occurred using this library it might be a point of interest.
In the following code, by giving the wrong parameter as cascade_name, the load function throws an exception which is expected.
The interesting point is that by commenting the two following lines after catch block, the code would not throw any exception at all.
my question is, how such a thing is possible at all?!
cascade = (CvHaarClassifierCascade*)cvLoad( cascade_name, 0, 0, 0 );
cv::CascadeClassifier c;
try
{
c.load( std::string("") );
}catch(...)
{
cout << "Exception";
}
cv::FileStorage fs( std::string(cascade_name), cv::FileStorage::READ );
bool t2 = fs.isOpened();
bool t = c.empty();
if ( cascade == 0 )
return -1;
return 0;