Summary of everything said so far for ImageBufAlgo::contrast:

1. Sorry for the confusion, the operation is same for grayscale and RGB. In
the RGB case you do the same thing to all channels, as you do for the one
channel in a grayscale image. This means we can generalize the operation
like Will suggested. Basically we don't have to check the image channels,
we can just apply the same operation to all of them. We only care that the
image has at least one channel. If it has more, we don't care if some is z,
or alpha, etc. We apply it to all. Will's sentence pretty much summarizes
this: "For channel handling, is there any reason to care about what the
channels are?"

2. So 1) is default behaviour if a channel mask is not specified. If a
channel mask is specified, than we apply the operation only to those
channels. Again, great suggestion by Will.

3. Since contrast can be applied in an absolute(set it to some value) or
relative way(for example increase contrast by 5%), I suggest a bool
parameter "absolute".

Now we got something concrete to start with:

ImageBufAlgo::contrast (ImageBuf &R, const ImageBuf &A, float contrast,
                                          int* channels_mask = NULL, bool
absolute = true,
                                          ROI roi = ROI(), int nthreads =
-1)
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to