Ask Your Question
0

TypeError: 17 is not supported

asked 2018-05-24 14:41:52 -0600

abesojunior gravatar image

Hello, i'm trying to run my code for de "Drone_ Cat_Mouse" exercise and i got the next error:

imageRGB = cv2.cvtColor(imageCopy, cv2.COLOR_BGR2RGB) TypeError: src data type = 17 is not supported

can anybody help me with it? Thanks.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-05-25 01:53:05 -0600

fqez gravatar image

updated 2018-05-25 01:53:45 -0600

Could you provide us more information? what image format does the "imageCopy" have? Are you sure you can make the BGR to RGB conversion with that image? Here youhave a link with a similar problem.

edit flag offensive delete link more

Comments

Yes, first i'm filtering the images captured by my "cat" this is the full code: imagenCamera = self.camera.getImage() imagenCopia = np.copy(imagenCamera) imgRGB = cv2.cvtColor(imagenCopia, cv2.COLOR_BGR2RGB) #This is where is the error blur = cv2.blur(imgRGB,(5,5))

abesojunior gravatar imageabesojunior ( 2018-05-25 03:34:28 -0600 )edit

As said in the response from Alexander in the link I passed you: " This site shows conversion from the numeric data types to the actual types, and type 17 corresponds to 8-bit signed int. This is the problem as cvtColor() does not accept 8-bit signed int images for the input.

fqez gravatar imagefqez ( 2018-05-25 03:50:21 -0600 )edit

So check your image format first and see if that format is supported by cvtColor() function. I think this instruction: imgCopy.dtype would help for that!

fqez gravatar imagefqez ( 2018-05-25 03:52:15 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2018-05-24 14:41:52 -0600

Seen: 320 times

Last updated: May 25