the same check as in line 108. can you please use one type of input data checks (I mean CV_Assert or cv::error, the last one is better for the user)