How to clone a cv2 image in Python

Cloning a cv2 image returns a new numpy.ndarray with the same data as the original image.

Solution for How to clone a cv2 image in Python : You can use numpy.ndarray.copy() to clone a cv2 image As cv2 uses an numpy.ndarray to store the pixel values for an image, call numpy.ndarray.copy on the image to return a copy of the image.


how-to-clone-a-cv2-image-in-python