Compute histogram of CV_32S Mat

asked 2016-08-16 07:43:30 -0600

Nbb gravatar image

Can I do that ? Seems like i cant since it only accepts 8 bit char or 32 bit floating. My matrix has values higher than 255 it is not an image

edit retag flag offensive close merge delete

Comments

1

As the docs say, it is only implemented for 8bit images. So either first rescale your matrix data somehow, or start coding your own binning and histogram generation.

StevenPuttemans gravatar imageStevenPuttemans ( 2016-08-17 08:57:41 -0600 )edit
1

Thanks ! I already tried rescaling. Was just wondering if there was a generalized histogram function

Nbb gravatar imageNbb ( 2016-08-17 12:46:43 -0600 )edit

Nope there is not, but you can always add it to the library using a pull request!

StevenPuttemans gravatar imageStevenPuttemans ( 2016-08-18 03:04:58 -0600 )edit