- published
- 2017-04-24
- reference
- Javier Sánchez, Midway Video Equalization, Image Processing On Line, 7 (2017), pp. 65–80. https://doi.org/10.5201/ipol.2017.181
Communicated by Julie Delon
Demo edited by Javier Sánchez
Abstract
This article presents an implementation of the 'Midway Equalization' method for videos. This technique allows us to modify the image histograms so that they present similar luminances. We propose two algorithms: the first one based on histogram inversion and the second one on the sorting of images intensities. The former computes the histograms and then finds the contrast change functions by convolving the inverse histograms with a Gaussian function. The latter starts by sorting the pixels of each image by intensity; the temporal signals, composed of all gray levels of the same rank, are then convolved with a Gaussian function. In this sorting method, the resulting histograms are more similar and homogeneous. Nevertheless, the histogram strategy is faster and provides good results in general. The algorithms include a 'dithering' option for reducing quantization artifacts. The whole implementation depends on a single parameter, the standard deviation, that is used for Gaussian convolutions. The experiments show several examples, including the quantization artifacts that appear in some situations and the benefits of dithering. We observe that these artifacts are usually more important in the histogram method.
Download
- full text manuscript: PDF low-res. (535K) PDF (6.4M) [?]
- source code: TAR/GZ
History
- Note from the editor: The source code was updated on October 11, 2017 to fix two bugs: 1) In the loop of line 237 (file 'midway_video_equalization.cpp'), there must be a condition (j<N) for testing the limits of the 'index' array. Without this condition, it produces memory leaks. 2) Function 'std::random_shuffle' (line 239 of the same file) does not work correctly with threads (openmp) and it makes the code much slower. It has been replaced with 'std::shuffle', which does essentially the same ('std::random_shuffle' seems to be deprecated). The original source code can be found here.
- Note from the editor: the manuscript of the article was modified on 2022-01-01 to include information about its editors. The original version of the manuscript is available here.