I suggest replacing `CV_Assert()` with `if()` and clear message to user.