LoginSignup
8
7

More than 5 years have passed since last update.

OpenCVで処理時間を計測する

Posted at

開発中は処理時間を意識するかと思いますが、OpenCVを使っている場合に処理時間を計測する方法をメモ。

以下のようにしていつも測定しています。

double cvstart = static_cast<double>(cvGetTickCount());

/* Do something you would like to measure*/

double cvend = static_cast<double>(cvGetTickCount());
printf("processing time %f sec \n", (cvend - cvstart)/(1000000*cvGetTickFrequency()));
8
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
7