码迷,mamicode.com
首页 > 其他好文 > 详细

GroundPlaneEstimator.cpp解读

时间:2018-07-13 15:16:15      阅读:217      评论:0      收藏:0      [点我收藏+]

标签:cpp   put   函数   nbsp   ane   iter   _for   void   ret   

GroundPlaneEstimator域下的compute函数,就相当于整个cpp的主函数,也体现了整个调用过程,先执行compute_v_disparity_data,再compute_v_disparity_image,最后estimate_ground_plane

 

void GroundPlaneEstimator::compute()
{ 
    static int num_iterations = 0;
    static double cumulated_time = 0;

    const int num_iterations_for_timing = 50;
    const double start_wall_time = omp_get_wtime();

    compute_v_disparity_data();
    compute_v_disparity_image();
    estimate_ground_plane();


    // timing ---
    cumulated_time += omp_get_wtime() - start_wall_time;
    num_iterations += 1;

    if((num_iterations % num_iterations_for_timing) == 0)
    {
        printf("Average GroundPlaneEstimator::compute speed  %.2lf [Hz] (in the last %i iterations)\n",
               num_iterations_for_timing / cumulated_time, num_iterations_for_timing );
        cumulated_time = 0;
    }

    return;
}

 

GroundPlaneEstimator.cpp解读

标签:cpp   put   函数   nbsp   ane   iter   _for   void   ret   

原文地址:https://www.cnblogs.com/ymjyqsx/p/9304554.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!