src
is the first argument to cv2.cvtColor
.
The error you are getting is because it is not the right form. cv2.Umat()
is functionally equivalent to np.float32()
, so your last line of code should read:
gray = cv2.cvtColor(np.float32(imgUMat), cv2.COLOR_RGB2GRAY)
More Related Contents:
- Convert a 3D array to RGB valued array [closed]
- How to read video stream as input in OpenCV python?
- How to clean images before OCR with Python OpenCV?
- Detect image orientation angle based on text direction
- How to capture multiple camera streams with OpenCV?
- How can I add new dimensions to a Numpy array?
- What is the difference between an opencv BGR image and its reverse version RGB image[:,:,::-1]?
- TypeError: module.__init__() takes at most 2 arguments (3 given)
- how to convert an RGB image to numpy array?
- I’m getting “TypeError: ‘list’ object is not callable”. How do I fix this error? [duplicate]
- Why do I get an IndexError (or TypeError) from “ar[i]” inside “for i in ar”?
- Rotate image and crop out black borders
- RuntimeError: module compiled against API version a but this version of numpy is 9
- OpenCV for Python 3.x under Windows [duplicate]
- Python Opencv SolvePnP yields wrong translation vector
- Storing RTSP stream as video file with OpenCV VideoWriter
- How to crop the internal area of a contour?
- Why do I get “TypeError: ‘int’ object is not iterable” when trying to sum digits of a number? [duplicate]
- How do I install opencv using pip?
- Installing OpenCV for Python on Ubuntu, getting ImportError: No module named cv2.cv
- Missing 1 required positional argument
- how to remove background of images in python
- Equivalent of copyTo in Python OpenCV bindings?
- count number of black pixels in an image in Python with OpenCV
- cv2.imshow command doesn’t work properly in opencv-python
- How to find the RED color regions using OpenCV? [duplicate]
- Python TypeError: unsupported operand type(s) for ^: ‘float’ and ‘int’
- How to connect broken lines in a binary image using Python/Opencv
- How to use `cv2.imshow` correctly for the float image returned by `cv2.distanceTransform`?
- imshow doesn’t need convert from BGR to RGB