|
|
|
@ -12,11 +12,14 @@ using namespace cv; |
|
|
|
|
using namespace dnn; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void diagnosticsErrorCallback(const Exception& exc) |
|
|
|
|
static |
|
|
|
|
int diagnosticsErrorCallback(int /*status*/, const char* /*func_name*/, |
|
|
|
|
const char* /*err_msg*/, const char* /*file_name*/, |
|
|
|
|
int /*line*/, void* /*userdata*/) |
|
|
|
|
{ |
|
|
|
|
CV_UNUSED(exc); |
|
|
|
|
fflush(stdout); |
|
|
|
|
fflush(stderr); |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static std::string checkFileExists(const std::string& fileName) |
|
|
|
@ -54,7 +57,7 @@ int main( int argc, const char** argv ) |
|
|
|
|
CV_Assert(!model.empty()); |
|
|
|
|
|
|
|
|
|
enableModelDiagnostics(true); |
|
|
|
|
redirectError((ErrorCallback)diagnosticsErrorCallback, NULL); |
|
|
|
|
redirectError(diagnosticsErrorCallback, NULL); |
|
|
|
|
|
|
|
|
|
Net ocvNet = readNet(model, config, frameworkId); |
|
|
|
|
|
|
|
|
|