The function should allow single-column Func in addition to single-row Func. That is, the assert should be changed to CV_Assert(Func.rows == 1 || Func.cols == 1);
You can transpose Func in the latter case.