Retinex-Based Relighting for Night Photography
Abstract
:1. Introduction
- We propose a new Retinex-based application of relighting night photography, i.e., changing illumination based on the HVS.
- We propose a light source sampling method based on blue noise sampling, which is used in computer graphics. In addition, we propose various light shape generation methods: a point spread function with or without an edge-preserving factor and a hyperbola function to produce a searchlight effect (i.e., a directional light to illuminate a certain location).
- We propose a method with a constant time property for the convolution radius. The independency is realized by using constant time filters in all processes in our method.
2. Retinex Theory
2.1. Overview
2.2. Single-Scale Retinex
3. Proposed Method
3.1. Illuminating Saliency Map
3.2. Lighting Points Sampling
Algorithm 1: Sample light source from dithering points |
3.3. Diffusing Lighting Source Points
3.3.1. Omnidirectional Diffusion
3.3.2. Directional Diffusion
3.4. Retinex-Based Image Relighting
4. Experimental Results
4.1. Sampling Method Comparison
4.2. Visual Comparison
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
HSV | human visual system |
SSR | single-scale Retinex |
MSR | multi-scale Retinex |
DCT | discrete cosine transform |
FFT | fast Fourier transform |
BF | bilateral filtering |
JBF | joint bilateral filtering |
PSF | point spread function |
GF | Gaussian filtering |
DTF | domain transform filtering |
AMF | adaptive manifolds filtering |
Appendix A. Symbols Table
a, b, c | parameters of quadratic function |
set of light source samples | |
B | value of maximum intensity (brightness) |
d | number of dimensions for color signals |
vector of user-determined light color | |
D | number of dimensions |
set of dithering points | |
input image (, : intensity vectors of pixel positions and ) | |
derived function of at o | |
illuminating color map | |
g | Gaussian convolution operator |
h | variable of a histogram index in clipping linear function |
i, j | coordinates of an arbitrary point in the quadratic function Q |
t | number of JBF iterations |
output image | |
k | constant scalar factor that enhances luminance |
, , | linearly darkening factor in Lab color space |
illumination map | |
luminance remapping function | |
n | subscript representing the index ( and ) |
N | number of samples (: desired number of samples, |
: number of target samples), N: number of image pixels | |
, | pixel position |
PSF for n-th sampling point and its cropping version | |
Q | set of clipped quadratic function |
minimum distance between light source points | |
r | subscript of a smoothing parameter |
reflectance map (: intensity vectors of pixel positions ) | |
set of real numbers | |
range domain | |
s | subscript of a smoothing parameter |
spatial domain | |
saliency map () | |
t | iterating subscript (e.g., ) |
T | threshold value used in our experiment |
clipping linear function () | |
v | variable of saturation-clipping linear function () |
, | weight function for edge-preserving smoothing filtering |
coordinates of light source for defining Q | |
amplify parameter for , e.g., | |
smoothing parameters | |
set of neighboring pixels of a pixel (e.g., ) |
References
- Land, E.H. The retinex. Am. Sci. 1964, 52, 247–264. [Google Scholar]
- Land, E.H. The retinex theory of color vision. Sci. Am. 1977, 237, 108–129. [Google Scholar] [CrossRef]
- Land, E.H. An alternative technique for the computation of the designator in the retinex theory of color vision. Proc. Natl. Acad. Sci. USA 1986, 83, 3078–3080. [Google Scholar] [CrossRef] [Green Version]
- Rahman, Z.U.; Jobson, D.J.; Woodell, G.A. Retinex processing for automatic image enhancement. J. Electron. Imaging 2004, 13, 100–110. [Google Scholar] [CrossRef]
- Guo, X.; Li, Y.; Ling, H. LIME: Low-light image enhancement via illumination map estimation. IEEE Trans. Image Process. 2016, 26, 982–993. [Google Scholar] [CrossRef] [PubMed]
- Ren, X.; Yang, W.; Cheng, W.H.; Liu, J. LR3M: Robust low-light enhancement via low-rank regularized retinex model. IEEE Trans. Image Process. 2020, 29, 5862–5876. [Google Scholar] [CrossRef]
- Xu, J.; Hou, Y.; Ren, D.; Liu, L.; Zhu, F.; Yu, M.; Wang, H.; Shao, L. Star: A structure and texture aware retinex model. IEEE Trans. Image Process. 2020, 29, 5022–5037. [Google Scholar] [CrossRef] [Green Version]
- Kong, X.Y.; Liu, L.; Qian, Y.S. Low-light image enhancement via poisson noise aware retinex model. IEEE Signal Process. Lett. 2021, 28, 1540–1544. [Google Scholar] [CrossRef]
- Tang, H.; Zhu, H.; Tao, H.; Xie, C. An Improved Algorithm for Low-Light Image Enhancement Based on RetinexNet. Appl. Sci. 2022, 12, 7268. [Google Scholar] [CrossRef]
- Pan, X.; Li, C.; Pan, Z.; Yan, J.; Tang, S.; Yin, X. Low-Light Image Enhancement Method Based on Retinex Theory by Improving Illumination Map. Appl. Sci. 2022, 12, 5257. [Google Scholar] [CrossRef]
- Meylan, L.; Susstrunk, S. High dynamic range image rendering with a retinex-based adaptive filter. IEEE Trans. Image Process. 2006, 15, 2820–2830. [Google Scholar] [CrossRef] [PubMed]
- Parthasarathy, S.; Sankaran, P. A RETINEX based haze removal method. In Proceedings of the IEEE International Conference on Industrial and Information Systems (ICIIS), Chennai, India, 6–9 August 2012. [Google Scholar] [CrossRef]
- Galdran, A.; Alvarez-Gila, A.; Bria, A.; Vazquez-Corral, J.; Bertalmío, M. On the duality between retinex and image dehazing. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, USA, 18–23 June 2018; pp. 8212–8221. [Google Scholar] [CrossRef] [Green Version]
- Zhuang, P.; Li, C.; Wu, J. Bayesian retinex underwater image enhancement. Eng. Appl. Artif. Intell. 2021, 101, 104171. [Google Scholar] [CrossRef]
- Finlayson, G.D.; Hordley, S.D.; Drew, M.S. Removing shadows from images using retinex. In Proceedings of the Color and Imaging Conference, Scottsdale, AZ, USA, 12–15 November 2002; pp. 73–79. [Google Scholar]
- Rizzi, A.; Gatta, C.; Marini, D. From retinex to automatic color equalization: Issues in developing a new algorithm for unsupervised color equalization. J. Electron. Imaging 2004, 13, 75–84. [Google Scholar] [CrossRef] [Green Version]
- Okuhata, H.; Nakamura, H.; Hara, S.; Tsutsui, H.; Onoye, T. Application of the real-time Retinex image enhancement for endoscopic images. In Proceedings of the Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Osaka, Japan, 3–7 July 2013; pp. 3407–3410. [Google Scholar] [CrossRef]
- Almalki, Y.E.; Jandan, N.A.; Soomro, T.A.; Ali, A.; Kumar, P.; Irfan, M.; Keerio, M.U.; Rahman, S.; Alqahtani, A.; Alqhtani, S.M.; et al. Enhancement of Medical Images through an Iterative McCann Retinex Algorithm: A Case of Detecting Brain Tumor and Retinal Vessel Segmentation. Appl. Sci. 2022, 12, 8243. [Google Scholar] [CrossRef]
- Park, Y.K.; Park, S.L.; Kim, J.K. Retinex method based on adaptive smoothing for illumination invariant face recognition. Signal Process. 2008, 88, 1929–1945. [Google Scholar] [CrossRef]
- Park, S.; Yu, S.; Moon, B.; Ko, S.; Paik, J. Low-light image enhancement using variational optimization-based retinex model. IEEE Trans. Consum. Electron. 2017, 63, 178–184. [Google Scholar] [CrossRef]
- Jobson, D.J.; Rahman, Z.u.; Woodell, G.A. Properties and performance of a center/surround retinex. IEEE Trans. Image Process. 1997, 6, 451–462. [Google Scholar] [CrossRef]
- Eisemann, E.; Durand, F. Flash Photography Enhancement via Intrinsic Relighting. ACM Trans. Graph. 2004, 673–678. [Google Scholar] [CrossRef]
- Petschnigg, G.; Agrawala, M.; Hoppe, H.; Szeliski, R.; Cohen, M.; Toyama, K. Digital Photography with Flash and No-flash Image Pairs. ACM Trans. Graph. 2004, 23, 664–672. [Google Scholar] [CrossRef] [Green Version]
- Chen, S.; Haralick, R.M. Recursive erosion, dilation, opening, and closing transforms. IEEE Trans. Image Process. 1995, 4, 335–345. [Google Scholar] [CrossRef]
- Otsuka, T.; Fukushima, N.; Maeda, Y.; Sugimoto, K.; Kamata, S. Optimization of Sliding-DCT based Gaussian Filtering for Hardware Accelerator. In Proceedings of the International Conference on Visual Communications and Image Processing (VCIP), Macau, China, 1–4 December 2020. [Google Scholar] [CrossRef]
- Sumiya, Y.; Fukushima, N.; Sugimoto, K.; Kamata, S. Extending Compressive Bilateral Filtering for Arbitrary Range Kernel. In Proceedings of the IEEE International Conference on Image Processing (ICIP), Abu Dhabi, United Arab, 25–28 October 2020. [Google Scholar] [CrossRef]
- He, K.; Sun, J.; Tang, X. Single image haze removal using dark channel prior. IEEE Trans. Pattern Anal. Mach. Intell. 2010, 33, 2341–2353. [Google Scholar] [CrossRef] [PubMed]
- He, K.; Shun, J.; Tang, X. Guided Image Filtering. In Proceedings of the European Conference on Computer Vision (ECCV), Heraklion, Crete, Greece, 5–11 September 2010. [Google Scholar] [CrossRef]
- Fukushima, N.; Sugimoto, K.; Kamata, S. Guided Image Filtering with Arbitrary Window Function. In Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing, Calgary, AB, Canada, 15–20 April 2018. [Google Scholar] [CrossRef]
- Cook, R.L. Stochastic sampling in computer graphics. ACM Trans. Graph. (TOG) 1986, 5, 51–72. [Google Scholar] [CrossRef]
- Zosso, D.; Tran, G.; Osher, S.J. Non-Local Retinex—A Unifying Framework and Beyond. SIAM J. Imaging Sci. 2015, 8, 787–826. [Google Scholar] [CrossRef]
- McCann, J.J. Retinex at 50: Color theory and spatial algorithms, a review. J. Electron. Imaging 2017, 26, 031204. [Google Scholar] [CrossRef]
- Horn, B.K. Determining lightness from an image. Comput. Graph. Image Process. 1974, 3, 277–299. [Google Scholar] [CrossRef]
- Morel, J.M.; Petro, A.B.; Sbert, C. A PDE formalization of Retinex theory. IEEE Trans. Image Process. 2010, 19, 2825–2837. [Google Scholar] [CrossRef]
- Funt, B.V.; Ciurea, F.; McCann, J.J. Retinex in MATLABTM. J. Electron. Imaging 2004, 13, 48–57. [Google Scholar] [CrossRef]
- Rahman, Z.u.; Jobson, D.J.; Woodell, G.A. Multi-scale retinex for color image enhancement. In Proceedings of the IEEE international conference on image processing (ICIP), Lausanne, Switzerland, 19 September 1996; Volume 3, pp. 1003–1006. [Google Scholar] [CrossRef]
- Jobson, D.J.; Rahman, Z.; Wooden, G.A. A multiscale retinex for bridging the gap between color images and the human observation of scenes. IEEE Trans. Image Process. 1997, 6, 965–976. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Kimmel, R.; Elad, M.; Shaked, D.; Keshet, R.; Sobel, I. A variational framework for retinex. Int. J. Comput. Vis. 2003, 52, 7–23. [Google Scholar] [CrossRef]
- Elad, M. Retinex by two bilateral filters. In Proceedings of the International Conference on Scale-Space Theories in Computer Vision, Hofgeismar, Germany, 7–9 April 2005; pp. 217–229. [Google Scholar] [CrossRef]
- Wei, C.; Wang, W.; Yang, W.; Liu, J. Deep Retinex Decomposition for Low-Light Enhancement. In Proceedings of the British Machine Vision Conference (BMVC), Newcastle, UK, 3–6 September 2018. [Google Scholar]
- Li, P.; Tian, J.; Tang, Y.; Wang, G.; Wu, C. Deep retinex network for single image dehazing. IEEE Trans. Image Process. 2020, 30, 1100–1115. [Google Scholar] [CrossRef] [PubMed]
- Grosse, R.; Johnson, M.; Adelson, E.; Freeman, W. Ground-truth dataset and baseline evaluations for intrinsic image algorithms. In Proceedings of the International Conference on Computer Vision (ICCV), Kyoto, Japan, 29 September–2 October 2009; pp. 2335–2342. [Google Scholar] [CrossRef]
- Gehler, P.; Rother, C.; Kiefel, M.; Zhang, L.; Scholkopf, B. Recovering intrinsic images with a global sparsity prior on reflectance. In Proceedings of the Neural Information Processing Systems (NIPS), Granada, Spain, 12–17 December 2011; pp. 765–773. [Google Scholar]
- Barron, J.; Malik, J. Color constancy, intrinsic images, and shape estimation. In Proceedings of the European Conference on Computer Vision (ECCV), Firenze, Italy, 7–13 October 2012; pp. 57–70. [Google Scholar] [CrossRef]
- Li, Y.; Brown, M. Single image layer separation using relative smoothness. In Proceedings of the Computer Vision and Pattern Recognition Conference (CVPR), Columbus, OH, USA, 23–28 June 2014; pp. 2752–2759. [Google Scholar] [CrossRef]
- Land, E.H.; McCann, J.J. Lightness and retinex theory. J. Opt. Soc. Am. 1971, 61, 1–11. [Google Scholar] [CrossRef]
- Ciurea, F.; Funt, B.V. Tuning retinex parameters. J. Electron. Imaging 2004, 13, 58–64. [Google Scholar] [CrossRef] [Green Version]
- Itti, L.; Koch, C.; Niebur, E. A model of saliency-based visual attention for rapid scene analysis. IEEE Trans. Pattern Anal. Mach. Intell. 1998, 20, 1254–1259. [Google Scholar] [CrossRef] [Green Version]
- Sugimoto, K.; Kamata, S. Efficient constant-time Gaussian filtering with sliding DCT/DST-5 and dual-domain error minimization. ITE Trans. Media Technol. Appl. 2015, 3, 12–21. [Google Scholar] [CrossRef] [Green Version]
- Sugimoto, K.; Kyochi, S.; Kamata, S. Universal approach for DCT-based constant-time Gaussian filter with moment preservation. In Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Calgary, AB, Canada, 15–20 April 2018. [Google Scholar] [CrossRef]
- Fukushima, N.; Maeda, Y.; Kawasaki, Y.; Nakamura, M.; Tsumura, T.; Sugimoto, K.; Kamata, S. Efficient Computational Scheduling of Box and Gaussian FIR Filtering for CPU Microarchitecture. In Proceedings of the Asia-Pacific Signal and Information Processing Association Annual Summit and Conference (APSIPA ASC), Honolulu, HI, USA, 12–15 November 2018. [Google Scholar] [CrossRef]
- Tomasi, C.; Manduchi, R. Bilateral Filtering for Gray and Color Images. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), Bombay, India, 7 January 1998. [Google Scholar] [CrossRef]
- Sugimoto, K.; Fukushima, N.; Kamata, S. 200 FPS Constant-time Bilateral Filter Using SVD and Tiling Strategy. In Proceedings of the IEEE International Conference on Image Processing (ICIP), Taipei, Taiwan, 22–25 September 2019. [Google Scholar] [CrossRef]
- Ulichney, R.A. Dithering with blue noise. Proc. IEEE 1988, 76, 56–79. [Google Scholar] [CrossRef]
- Mitsa, T.; Parker, K. Digital halftoning using a blue noise mask. In Proceedings of the International Conference on Acoustics, Speech, and Signal Processing (ICASSP), Toronto, ON, Canada, 14–17 April 1991. [Google Scholar] [CrossRef]
- Lou, L.; Nguyen, P.; Lawrence, J.; Barnes, C. Image Perforation: Automatically Accelerating Image Pipelines by Intelligently Skipping Samples. ACM Trans. Graph. 2016, 35, 1–14. [Google Scholar] [CrossRef]
- Gastal, E.S.L.; Oliveira, M.M. Domain Transform for Edge-Aware Image and Video Processing. ACM Trans. Graph. 2011, 30, 1–12. [Google Scholar] [CrossRef]
- Gastal, E.S.L.; Oliveira, M.M. Adaptive Manifolds for Real-Time High-Dimensional Filtering. ACM Trans. Graph. 2012, 31, 1–13. [Google Scholar] [CrossRef]
- Wu, W.; Weng, J.; Zhang, P.; Wang, X.; Yang, W.; Jiang, J. URetinex-Net: Retinex-Based Deep Unfolding Network for Low-Light Image Enhancement. In Proceedings of the Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA, 18–24 June 2022; pp. 5901–5910. [Google Scholar] [CrossRef]
- Gayoung, L.; Yu-Wing, T.; Junmo, K. Deep Saliency with Encoded Low level Distance Map and High Level Features. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016. [Google Scholar] [CrossRef] [Green Version]
- Maeda, Y.; Fukushima, N.; Matsuo, H. Effective Implementation of Edge-Preserving Filtering on CPU Microarchitectures. Appl. Sci. 2018, 8, 1985. [Google Scholar] [CrossRef] [Green Version]
- Maeda, Y.; Fukushima, N.; Matsuo, H. Taxonomy of Vectorization Patterns of Programming for FIR Image Filters Using Kernel Subsampling and New One. Appl. Sci. 2018, 8, 1235. [Google Scholar] [CrossRef]
Image | a | b | c | d | e | f | g | h | Ave. |
---|---|---|---|---|---|---|---|---|---|
Random | 0.8609 | 0.7173 | 0.9084 | 0.8896 | 0.8163 | 0.8566 | 0.8637 | 0.7697 | 0.8353 |
URetinex-Net [59] | 0.5159 | 0.4322 | 0.8307 | 0.5318 | 0.5179 | 0.6167 | 0.6596 | 0.3889 | 0.5617 |
LR3M [6] | 0.7539 | 0.488 | 0.8846 | 0.8482 | 0.6364 | 0.8077 | 0.8114 | 0.5941 | 0.7280 |
Saliency (OpenCV) | 0.3831 | 0.4790 | 0.5980 | 0.2976 | 0.5483 | 0.5108 | 0.4966 | 0.5993 | 0.4891 |
SaliencyELD [60] | 0.4230 | 0.2832 | 0.4301 | 0.1945 | 0.3101 | 0.4858 | 0.3074 | 0.3216 | 0.3445 |
Proposed | 0.1618 | 0.3275 | 0.3727 | 0.1364 | 0.2494 | 0.2159 | 0.2556 | 0.2842 | 0.2504 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Oishi, S.; Fukushima, N. Retinex-Based Relighting for Night Photography. Appl. Sci. 2023, 13, 1719. https://doi.org/10.3390/app13031719
Oishi S, Fukushima N. Retinex-Based Relighting for Night Photography. Applied Sciences. 2023; 13(3):1719. https://doi.org/10.3390/app13031719
Chicago/Turabian StyleOishi, Sou, and Norishige Fukushima. 2023. "Retinex-Based Relighting for Night Photography" Applied Sciences 13, no. 3: 1719. https://doi.org/10.3390/app13031719
APA StyleOishi, S., & Fukushima, N. (2023). Retinex-Based Relighting for Night Photography. Applied Sciences, 13(3), 1719. https://doi.org/10.3390/app13031719