Opencv object detection error

this is only available with opencv 4.x