Assert was appears in caller function.
void cv::LUT( InputArray _src, InputArray _lut, OutputArray _dst )
{
............................
    CV_Assert( (lutcn == cn || lutcn == 1) &&
        _lut.total() == 256 && _lut.isContinuous() &&
        (depth == CV_8U || depth == CV_8S) );
................................