TypeError: Expected Ptr<cv::UMat> for argument '%s' ''

0 votes

Hey I got 

'' TypeError: Expected Ptr<cv::UMat> for argument '%s' '' such kind of error during writing image. what should I do??

Oct 15 in Python by anonymous
• 6,070 points
388 views

1 answer to this question.

0 votes

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)
answered Oct 15 by anonymous
• 49,540 points

Related Questions In Python

0 votes
1 answer

Python error "TypeError: range() integer end argument expected, got numpy.float64."

Hi @Kashish, try something like this: for i ...READ MORE

answered May 27, 2019 in Python by Harish
940 views
0 votes
1 answer

Error saying "TypeError: range() integer end argument expected"

Try this: [x * 0.01 for x in ...READ MORE

answered May 27, 2019 in Python by Keshav
409 views
0 votes
1 answer
0 votes
1 answer

text = _whitespace_only_re.sub('', text) TypeError: expected string or bytes-like object

This seems like an issue with textwrap ...READ MORE

answered Feb 13, 2019 in Python by Omkar
• 69,030 points
7,133 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,561 views
0 votes
0 answers
+4 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,800 points
1,181 views
0 votes
1 answer

I've been trying to run this code, but the error says "Expected an indented block" for the line, " word_as_list[index] = guess."

Hi, @Paradox, The error message IndentationError: expected an indented ...READ MORE

answered 5 days ago in Python by anonymous
• 49,540 points
80 views
+2 votes
2 answers

Job roles for Python

Hey, Python Developer responsibilities include writing and testing ...READ MORE

answered May 16, 2019 in Python by Gitika
• 49,540 points
104 views