OpenCV-dependent code for QuPath.