Plot and histrogram

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

spinter696 gravatar image

Hi,

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

Comments

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

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

Guanta gravatar imageGuanta ( 2015-01-15 09:42:15 -0500 )edit