
4. High Dynamic Range Computational Photography on Mobile GPUs 417
provide implementations of a parallel scan, which can be used to compute
the cumulative distribution function of a histogram. However, since the
histogram is only of size 256, it is not very computationally expensive to
compute this sequentially.
Histogram equalization. Once the CDF of the original histogram has been com-
puted, it can be used to compute new brightness values for each pixel;
see Listing 4.3. Once the RGB pixel is obtained from the image using an
OpenCL image sampler, it is converted to HSV format on line 14. Using
the formulation discussed earlier, we then compute the ...