Conditionalize PT on OpenCV