You can easily check the version of OpenCV with the following code. First, import the OpenCV library as cv2. I highly recommend you get the “Computer Vision: Models, Learning, and Inference Book” to learn Computer Vision.
import cv2 print(cv2.__version__)