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:
- Python about typeerror: required argument ‘mat’ (POS 2) not found error resolution
- TypeError: putText() missing required argument ‘text‘ (pos 2)
- [Solved] RuntimeError: Expected object of scalar type Float but got scalar type Double for argument #2 ‘mat1‘
- TypeError(‘Keyword argument not understood:‘, ‘***‘) in keras.models load_model
- Typeerror: write() argument must be STR, not bytes and the method of writing binary file in Python 3
- Typeerror: write() argument must be STR, not bytes and the method of writing binary file in Python 3
- TypeError: __array__() takes 1 positional argument but 2 were given
- error Newline required at end of file but not found eol-last
- TypeError: translate() takes exactly one argument (2 given)
- Could NOT find CUDNN: Found unsuitable version “..“, but required is at least “6“
- Python TypeError: ‘newline’ is an invalid keyword argument for this function
- Module build failed: TypeError [ERR_INVALID_ARG_TYPE]: The “path“ argument must be of type string.
- TypeError: drop() got an unexpected keyword argument ‘columns’
- Pytorch TypeError: __array__() takes 1 positional argument but 2 were given
- TypeError: descriptor ‘__init__‘ of ‘super‘ object needs an argument
- After introducing sass into Vue project, start to report error typeerror [err]_ INVALID_ ARG_ Type]: the “path” argument must be of type string
- @Autowired injection * * required a single bean, but 2 were found**
- Springboot project startup exception – required a single bean, but 2 were found
- IntelliJ idea error: package not found or symbol not found
- How to Fix mat form field must contain a matformfieldcontrol error