TypeError: Required argument ‘mat‘ (pos 2) not found

Traceback (most recent call last):
  File "/Users/*******/*****.py", line 225, in <module>
    cv2.imshow(r_image)
TypeError: Required argument 'mat' (pos 2) not found

This error prompt means that the required parameter is not found, that is, the function in the code is missing the necessary parameter.

cv2.imshow()

There should be two parameters: one is the name of the image window, namely title, and the other is the pixel value matrix of the displayed image.
In addition, the data type of the matrix is np.uint8 , floating point type will display exception.
Error will be reported:

TypeError: img is not a numpy array, neither a scalar

Solution:
transform the data type

image = numpy.array(image)

Read More: