# help with histogram

5 messages
Open this post in threaded view
|

## help with histogram

 CONTENTS DELETED The author has deleted this message.
Open this post in threaded view
|

## Re: help with histogram

 On Wed, Jun 8, 2011 at 12:07 PM, plazajp <[hidden email]> wrote: > Hi everyone, I'm new using Octave and I have a problem. Maybe it's easy to > solve, but I've been unable to do it! > >  I need to show the histogram of an uint8 image ('im'), but octave only > allows me to show it if the image type is changed to double. I don't want > that, because I want every bin to be on the vector 1:256, not between 0 and > 1. I've tried to do imhist (im), imhist(im, 1:256), and everything I've > thought of and I haven't been able to get it. I suppose there has to be a > way to do it, so I guess someone will be able to tell me where I'm failing. > > Thank you for the attention, and I hope someone can tell me the answer! You can cast to double without renormalizing the range to be 0-1. I don't understand. im=floor(rand(16)*256); hist(im(:), 1:256); I guess you will need the first arg to hist to be a vector, hence the (:). Is that what is throwing you? -- /* andy buckle */ _______________________________________________ Help-octave mailing list [hidden email] https://mailman.cae.wisc.edu/listinfo/help-octave
Open this post in threaded view
|

## Re: help with histogram

 In reply to this post by plazajp > I need to show the histogram of an uint8 image ('im'), but octave only >allows me to show it if the image type is changed to double. I don't want >that, because I want every bin to be on the vector 1:256, not between 0 and >1. I've tried to do imhist (im), imhist(im, 1:256) Change it to double, then: imhist(256*im, 1:256) -- Francesco Potortì (ricercatore)        Voice:  +39.050.315.3058 (op.2111) ISTI - Area della ricerca CNR          Mobile: +39.348.8283.107 via G. Moruzzi 1, I-56124 Pisa         Fax:    +39.050.315.2040 (entrance 20, 1st floor, room C71)     Web:    http://fly.isti.cnr.it_______________________________________________ Help-octave mailing list [hidden email] https://mailman.cae.wisc.edu/listinfo/help-octave