Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what's the meaning of CV_INSTRUMENT_REGION()?

Tags:

c++

opencv

I was reading the source code of opencv and I don't understand the function CV_INSTRUMENT_REGION() called by other function. The CV_INSTRUMENT_REGION() function usually appears at the start of the other function body. Can anyone help? Thanks.

like image 518
Kim Chan Avatar asked Sep 01 '16 08:09

Kim Chan


1 Answers

You can check the corresponding pull request for more information: Implementations instrumentation framework for OpenCV performance test system.

Instrumentation framework for OpenCV performance test system. It was developed to:

  • track implementations execution inside OpenCV functions with call tree output to test logs
  • track implementations execution time weight in the pipeline

Framework can be enabled with ENABLE_INSTRUMENTATION define in CMake and disabled by default. In disabled state it doesn't consume resources.

Update:

OpenCV 3.3 added the support of trace / profiling OpenCV applications for users. For more information see:

  • the corresponding pull request: Code tracing support #8766
  • the Wiki page: Profiling OpenCV Applications
  • a sample code application_trace.cpp
like image 62
Catree Avatar answered Sep 18 '22 04:09

Catree