improved performance of cv::LUT