Yeah, we actually discussed that in an earlier thread. You can see what the
underlying histogram calculating function looks like here:
https://github.com/StefanStavrev/oiio/commit/6c7a7c121ae662e5ae348648c322bf789b95ee24
It has control over the number of bins, min, and max, as well as an optional
place to store the counts of values that were below min or above max.
I think at this point, Stefan is discussing a separate routine that will turn
the histogram data into an image of the histogram. (Which is much less
important, but it's not hard and will probably come in handy at some point.)
-- lg
On Jul 3, 2012, at 3:08 PM, Will Rosecrans wrote:
> Should granularity of bins also be a parameter? What is a sane
> default for floats? Would it make sense to have such a parameter be
> expressed in terms of size of the bin, or number of bins between the
> high and low? Histograms are one area where I think things are
> actually conceptually cleaner in 8 bit. :P
>
> Does something like
> bool histogram( vector<int> &R, const ImageBuf &input, float low=0,
> float high=1, int bins=1024)
>
> sound about right?
>
> On Tue, Jul 3, 2012 at 2:36 PM, Larry Gritz <[email protected]> wrote:
>> Banish the idea of "255" from your head forever. Everything is floating
>> point, and a 255 in an 8-bit file will map to 1.0.
>>
>> I would say that you should default to 0-1 but allow manual override of
>> min/max.
>>
>>
>> On Jul 3, 2012, at 12:20 PM, Stefan Stavrev wrote:
>>
>>> I am working on histogram drawing.
>>>
>>> What are all the possible ranges of values in one channel I should consider?
>>>
>>> The usual ranges are 0-1 and 0-255. Any other ranges I should have in mind?
>>>
>>
>> --
>> Larry Gritz
>> [email protected]
>>
>>
>> _______________________________________________
>> Oiio-dev mailing list
>> [email protected]
>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
--
Larry Gritz
[email protected]
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org