why can't we reuse all these checks from the original cv::inRange() function?