Ask Your Question
0

Plot and histrogram

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

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 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

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

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

Stats

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

Seen: 165 times

Last updated: Jan 15 '15