mirror of
https://github.com/opencv/opencv.git
synced 2024-11-27 20:50:25 +08:00
apps(model_diagnostics): fix invalid callback
This commit is contained in:
parent
e08de1101d
commit
28f919d9d2
@ -12,11 +12,14 @@ using namespace cv;
|
|||||||
using namespace dnn;
|
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(stdout);
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::string checkFileExists(const std::string& fileName)
|
static std::string checkFileExists(const std::string& fileName)
|
||||||
@ -54,7 +57,7 @@ int main( int argc, const char** argv )
|
|||||||
CV_Assert(!model.empty());
|
CV_Assert(!model.empty());
|
||||||
|
|
||||||
enableModelDiagnostics(true);
|
enableModelDiagnostics(true);
|
||||||
redirectError((ErrorCallback)diagnosticsErrorCallback, NULL);
|
redirectError(diagnosticsErrorCallback, NULL);
|
||||||
|
|
||||||
Net ocvNet = readNet(model, config, frameworkId);
|
Net ocvNet = readNet(model, config, frameworkId);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user