I'm trying to write a save image function. The below code is expected to create a copy of the original image as saved-test-image.jpg.
originalImage = "test-image.jpg"
savedImage = cv2.imwrite("saved-test-image.jpg",originalImage)
The execution of the lines gives the follwing back:
Traceback (most recent call last):
File "UnitTest.py", line 159, in test_save_and_delete_image
savedImage = cv2.imwrite('unittest-images/saved-test-image.jpg', originalImage)
TypeError: img is not a numpy array, neither a scalar
What needs to be changed here?
imread(..)the image.