optimization of cv::filter2D and cv::Laplacian