fix for cv::LUT and cv::transpose