At this point it is natural to think about having a Histogram class with methods such as:
// getters bins, height, cumulative(is it ordinary or cumulative histogram), min_count, max_count, min_pixel_value, max_pixel_value, background and foreground colors, etc. // statistics mean, deviation, median, npixels, etc. like in Photoshop. This will lead to nice simplification from: histogram_draw (ImageBuf &R, const std::vector<imagesize_t> &histogram, int height = 100, Color foreground = Color(0,0,0), Color background = Color(1,1,1)); to: histogram_draw (ImageBuf &R, Histogram histogram); Let me know if you want something included in the class.
_______________________________________________ Oiio-dev mailing list Oiio-dev@lists.openimageio.org http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org