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) ", num_iterations_for_timing / cumulated_time, num_iterations_for_timing ); cumulated_time = 0; } return; }