Ask Your Question

Plot and histrogram

asked 2015-01-15 06:59:26 -0500

spinter696 gravatar image


I have the next question, after doing some operation I obtained a matrix from an image that I want to plot in an histogram. I used the next function. I am using python +opencv3.0.0:

hist = cv2.calcHist([result],[0],None,[256],[0,256])

But it gives me the following error:

TypeError: images data types = 17 is not supported

What's wrong??? Any ideas???

Thanks in advance.

edit retag flag offensive close merge delete


You can start by following the type of the result... before calcHist; before each of its modification

thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-01-15 08:35:39 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-01-15 09:42:15 -0500

Guanta gravatar image

I'd use numpy's histogram function, it's much clearer than the OpenCV version.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-01-15 06:59:26 -0500

Seen: 92 times

Last updated: Jan 15 '15