Convolutional Neural Network Training for RGBN Camera Color Restoration Using Generated Image Pairs
필름·전자재료 · (13) 프리즘 필름
기본 정보
- 저자
- DOI
- 10.1109/jphot.2020.3025088
- 저널
- IEEE photonics journal
- 발행년도
- 2020
- 발행기관
- Institute of Electrical and Electronics Engineers
- 피인용수
- 15
- 라이선스
- cc-by
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.1109/jphot.2020.3025088
- 토픽
- Color Science and Applications
- OpenAlex ID
- W3088107854
평가 내용
- 관련도
- 사업분야
- 필름·전자재료 · (13) 프리즘 필름
- 부 분야
- –
- R&D 측면
- –
- 확신도
- –
- 근거 용어
- –
- 판단 근거
- 임베딩 유사도 기반 평가로 '필름·전자재료 > 프리즘 필름' 분야에 선정된 논문입니다.
- R&D 활용 포인트
- –
- 평가 입력
- –
초록
본문 38,419자
본문 펼치기
섹션 본문 41문단 · 21,897자
(제목 없음)
1RGBN cameras that can capture visible light and near-infrared (NIR) light simultaneously produce better color image quality in low-light-level conditions. However, these RGBN cameras introduce additional color bias caused by the mixing of visible information and NIR information. The color correction matrix model widely used in current commercial color digital cameras cannot handle the complicated mapping function between biased color and ground truth color. Convolutional neural networks (CNNs) are good at fitting such complicated relationships, but they require a large quantity of training image pairs of different scenes. In order to achieve satisfactory training results, large amounts of data must be captured manually, even when data augmentation techniques are applied, requiring significant time and effort. Hence, a data generation method for training pairs that are consistent with target RGBN camera parameters, based on an open access RGB-NIR dataset, is proposed. The proposed method is verified by training an RGBN camera color restoration CNN model with generated data. The results show that the CNN model trained with the generated data can achieve satisfactory RGBN color restoration performance with different RGBN sensors.
Introduction
2Most commercial color digital cameras capture color spectral information through a Bayer 25% red, 50% green, 25% blue (RGGB) color filter array (CFA) coating in front of the sensor. The responses are limited to visible light. A single camera sensor can capture different spectral information at different pixel positions with a CFA at the cost of lower spatial resolution. Full-band color information for each pixel is calculated through demosaicing methods. In order to prevent the mixing of visible light and near-infrared (NIR) light, an infrared cut-off filter (IRCF) is placed in front of the sensor. A red, green, blue, near-infrared (RGBN) CFA has recently been introduced that replaces a green channel in the Bayer CFA with an NIR channel and IRCF removal. Several new types of RGBN CFAs have also been proposed [1], as shown in Fig. 1.
3RGBN cameras have wider spectral response than ordinary color visible cameras because of IRCF removal. They have a higher signal-to-noise ratio (SNR) but introduce extra color bias [2]. Hence, color restoration methods for RGBN cameras are necessary. Most RGBN camera color restoration methods calibrate a color correction matrix (CCM) through ordinary linear square regression (OLSR) by utilizing the chromatic values of the color checker. CCM methods that achieve satisfactory color correction results are widely used in Bayer CFA cameras, digital single lens reflex (DSLR) cameras, and mobile phone cameras. However, they do not work well on the RGBN camera color restoration task because of the more complicated color bias model and the arbitrary function form of reflection in scenes [2].The color bias is more severe for outdoor scenes with plants, as shown in Fig. 2.
4RGBN camera color restoration methods can be divided into CCM-based methods, spectral decomposition-based methods, sensor spectral response curve optimization methods, and learning-based methods.
5Park et al. [3] improved the traditional 3 × 4 CCM by introducing three cross-channel nonlinear constrains, specifically, RN, GN, and BN. Chen et al. [4] introduced cubic polynomial constraints whose higher-order coefficients of the NIR channel are zero. After quasi-linearization, a 3 × 19 CCM is calculated through OLSR. Monno et al. [5] applied a quadratic polynomial CCM method proposed by Hong et al. [6] and a root polynomial CCM method proposed by Finlayson et al. [7] to the RGBN camera color restoration task and calibrated CCMs utilizing the chromatic values of color checker patches. Han et al. [2] combined four kinds of regression methods and nine kinds of nonlinear methods and comprehensively studied CCM-based RGBN color restoration methods.
6Park et al. [8]- [10] proposed spectral decomposition-based methods that decompose the NIR channel into a color-relevant band and a color-irrelevant band and optimized CCM with statistical properties of different channels. Hertel et al. [11] optimized a CCM by calculating the transfer matrix of the sensor response curve and target response curve. The method is limited by the measurement accuracy of the sensor response. Yamashita [12]- [14] measured the response curve of each channel and calculated the ratio of the integral of the NIR channel curve to the integrals of each of the color channel curves, then directly subtracted the NIR channel from the color channels with fixed ratios that assumed these ratios would not change as the scene changed.
7Aguilera et al. [15] proposed a learning-based RGBN camera color restoration method with a simple network structure composed of two fully connected layers. Soria et al. [16] proposed the single sensor multispectral images dataset SSMID, which contains three kinds of scenes: scenes with vegetation, scenes without vegetation, and multi-period scenes. They also proposed an RGBN camera color restoration method using the same simple network structure with a different optimizer and activation function. Soria et al. [17] proposed ENDENet and CDNet for the color restoration task. Gharbi et al. [18] proposed HDR-Net, which combines a bilateral grid and local affine color transforms. It can fit arbitrary image augmentation strategy and color transform of training pairs and dozen times improved the calculation efficiency. Brooks et al. [19] proposed an "unprocessing" method generating noisy and noise-free training pairs by using open access datasets for the image denoising task. Jaroensri et al. [20] proposed a noisy and noise-free training pairs generation method utilizing a proposed image signal processing simulation pipeline and trained a denoising neural network using the generated training pairs.
8The core of the RGBN camera color restoration problem is to find an appropriate mapping function between the color bias image and the ground truth image. Deep learning methods have shown great ability for finding such complicated mapping functions of training data. However, a large number of color bias image and ground truth image training pairs are needed in order to train a deep neural network model. Setting up a training dataset containing different scenes is time-consuming. For the RGBN color restoration task, images captured with an IRCF are regarded as ground truth images. If only one RGBN camera is available, the ground truth images and color bias images are not captured simultaneously. Hence, elaborate image registration post-processing is needed to match moving objects in the scene. If two RGBN cameras are used for capturing the training pairs, carefully designed post-processing is still needed, such as eliminating camera shake, dealing with shifting illumination across the cameras, etc. Moreover, when the sensor parameters change significantly, one should setup a new dataset in order to get the best color restoration results.
9Hence, a method for generating training pairs for RGBN camera color restoration learning in a CNN is proposed. It aims at utilizing an RGB-NIR open access dataset to generate color bias image and ground truth image training pairs based on the target RGBN camera's parameters. A CNN is trained with the generated data to accomplish the RGBN camera color restoration task. The color restoration network can be rapidly retrained for new sensors or sensor parameters by modifying the data generation parameters.
10The remainder of this article is arranged as follows: In Section 2 we detail each step of the data generation method and training of the network using the generated data. In Section 3 we set up the experimental environment and describe the evaluation metrics used. In Section 4 we present, validate, and assess the results of the proposed color restoration method. In Section 5 we conclude this article and discuss future work.
Data Generation Method
11The open access RGB-NIR dataset used for data generation and training in this article was proposed by Brown and Susstrunk [21]. The dataset contains 477 RGB-NIR image pairs and 9 kinds of scenes. The standard RGB (sRGB) and NIR image pairs in the dataset have been processed by elaborate image registration and post-processing, such as gain control, white balance, NIR channel balance, gamma correction, etc. The proposed data generation method for RGBN camera color bias image and ground truth image pairs processes the RGB-NIR dataset images with inverse gamma correction, inverse white balance, inverse NIR channel balance, and inverse global gain based on the target RGBN camera parameters to transfer the RGB-NIR dataset images to target RGBN camera ground truth images. Then color bias is added to the ground truth images based on the color bias model, which results in color bias images. Then the generated color bias images and ground truth images are made training pairs and fed to the CNN. Finally, the output predicted images are processed by white balance and gamma correction as the final result. The pipeline of the proposed method is shown in Fig. 3.
Inverse Gamma Correction:
12To make images captured from different devices have the similar color appearance, gamma correction is applied to the image and the image in transferred to sRGB color space. We adopt the same gamma correction curve as reference [21] when we apply inverse gamma correction. Also, a numerical truncation process is adopted with threshold ε = 10 −8 in order to prevent numerical instability while training.
13The proposed inverse gamma correction is
14The histograms of sRGB images before and after applying inverse gamma correction are shown in Fig. 4.
Inverse Global Gain:
15The built-in auto gain control (AGC) algorithm of a camera calculates a global gain to amplify the original signal based on specific rules. Different imaging devices may adopt different AGC strategies, and the device manufacturer would not detail their AGC algorithm. Hence it is difficult to inverse global gain from the AGC algorithm point of view. However, for data generation, the question is simply to find a reasonable constant number to calculate inverse global gain.
16Assume the intensities of the target RGBN camera image X1 and the sRGB image X2 in the open access dataset are sampled from different exponential distributions, i.e., X1∼E(λ1), X2∼E(λ2). The probability density function of exponential distribution is For x ≥ 0, the maximum likelihood estimation of λ is the inverse of the sample mean. Let f 1 (x )and f 2 (x ) be the probability density function of X1 and X2. We could transfer X2's distribution to X1's distribution through equation (4).
17⎧
18For our test set images, the coefficient λ 1 /λ 2 = 0.74. The global gain is sampled from a normal distribution with μ = 0.74 and σ = 0.1., i.e., N(0.74, 0.1). The sampling procedure would generate images with different intensity distribution for data augmentation. The bias term 1 λ 2 ln λ 2 λ 1 would reversely compensate the generated intensity so the generated data would lack of very bright data and very dark data and reduce robustness. Hence, the bias term is abandoned during training.
Inverse White Balance and Inverse NIR Channel Balance:
19To make images have similar color appearance under different illumination, the output images are processed by white balance. A typical white balance algorithm calculates a 3 × 3 diagonal matrix whose diagonal elements are gains of the R, G, and B channels. The channel balance algorithm of an RGBN camera calculates a 4 × 4 diagonal matrix, including the NIR channel, denoted WBMatrix. The diagonal elements are gains of R, G, B, and NIR noted as Rgain, Ggain, Bgain, and Ngain. Then inverse white balance and inverse NIR channel balance are to multiply the inverse of WBMatrix for each channel, i.e.,
20Hence, the key is to find reasonable Rgain, Ggain, Bgain, and Ngain. The gray world assumption [22] is adopted in this article, which assumes that each channel has equal mean after white balance and NIR channel balance. For the target RGBN camera images in the test set, let mR, mG, mB, and mN be the means of the R, G, B, and NIR channel of the whole dataset, respectively. Let Ggain = 1; then Rgain = mG/mR, Bgain = mG/mB, and Ngain = mG/mN. We adopt Rgain = 0.8, Ggain = 1.0, Bgain = 2.0, and Ngain = 0.95 for our target RGBN camera. Actually, we sample Rgain, Bgain, and Ngain from different uniform distributions centered at 0.8, 2.0, and 0.95 for data augmentation, i.e., Rgain∼U(0.7,0.9), Bgain∼U(1.9,2.1), and Ngain∼U(0.85,1.05).
Color Bias Model:
21For commercial digital visible cameras, an IRCF is usually placed in front of the sensor to limit the response in the visible band. For RGBN cameras, because the R, G, and B channels transmit NIR light, there would be additional color bias. Take the R channel as an example. Let R b be all pixels of the R channel of the RGBN image. Let N b be all pixels of the NIR channel. Let R g be all pixels of the R channel of an image captured with IRCF. The color bias R is the residual of R b and R g . Then,
22where I (λ) is the spectral power distribution function of illumination; R(λ) is the scene spectral reflectance function relative to pixel position; S(λ) is the sensor's spectral response function; F R (λ) and F N (λ) are the spectral transmittance functions of the R channel filter and the NIR channel filter, respectively; and α is a constant. We do not overfit F R (λ) and F N (λ) during data generation and training. We assume F R (λ) and F N (λ) have constant transmittance C R and C N in the NIR band (700 nm-1100 nm). Then,
23Let ratioR be C R /C N and similarly calculate color bias coefficients ratioG and ratioB of the G channel and B channel. In this article, ratioR = 0.380, ratioG = 0.357, and ratioB = 0.489. The coefficients are calculated with OLSR using all test set images.
24Equation (6) and (7) assume that the N channel is not affected by the crosstalk of visible light. However, the manufactured NIR filter cannot block all visible light which would cause bias of color bias coefficients. Then,
25In order to take this bias into consideration, ratioR, ratioG, and ratioB are sampled from different uniform distributions centered at 0.380, 0.357, and 0.489 during training, i.e., ratioR∼U(0.33, 0.43), ratioG∼U(0.307, 0.407), and ratioB∼U(0.439, 0.539).
Training
26Here, we describe the RGBN camera color restoration CNN model built for this study. The training image pairs were generated by the generation method defined in Section 2.1. The output estimate images of the network were processed by white balance and gamma correction before calculation of loss, so that the color bias introduced by the white balance and gamma correction procedure was eliminated.
Data Generation:
27For NIR images in the RGB-NIR open access dataset, inverse global gain and inverse NIR channel balance were applied. For sRGB images, inverse gamma correction, inverse global gain, and inverse white balance were applied. Then color bias was added to the inversed sRGB images combined with inversed NIR images. The inversed sRGB images and RGBN images after adding color bias were fed into the CNN for training. The network output estimate color restoration images.
Network Structure:
28We adopted the U-Net [23] network structure, which has skip connection in the same scale layers in the encoder part and decoder part of the network. We used max-pooling for down sampling in the encoder part and bilinear interpolation for up sampling in the decoder part. We used Leaky-ReLU [24] as the activation function. Residual estimation strategy [25] was used. The detailed structure parameters are shown in Fig. 5.
Training:
29We used 10% of the data as a validation set. The test set was composed of images captured with the target RGBN camera experimental system. We randomly cropped the images into 128 × 128 patches for use as the training input of the network. Each image patch was randomly processed by data augmentation strategy including direct output, horizontal flip, vertical flip, rotate 90°clockwise, and rotate 90°counterclockwise. We used Adam [26] as the optimizer and the learning rate was set to 10 −4 . Other parameters of the Adam optimizer used the default settings. We used a batch size of 32 and L1 loss as the loss function. The network was trained with an NVIDIA GTX 1080.
Experimental Setup
30The framework of the RGBN experimental system is shown in Fig. 6. We used a Photonis NOCTURN XL camera with high sensitivity as the core imaging device. An Edmund TECHSPEC Vis-NIR 50 mm fixed-focus lens with high transmittance in both the visible band and NIR band was used as objective lens. A filter wheel was set between the sensor and the objective lens, driven by a FAULHABER 2250S024 BX4 CSD miniature brushless DC motor that can control the rotation angle precisely. The initial position of the filter wheel is controlled by a photoelectric switch as shown in Fig. 7(b). There are four holes on the filter wheel in which a THORLABS FD1D R,G,B,NIR filter designed for capturing high-contrast color images was placed. The R,G,B filters also have high transmittance in the NIR band. The NIR filter is a 700nm high-pass filter. The relative response curve of the sensor and filters is shown in Fig. 7(a). We used an FPGA and ARM based circuit to control and communicate all devices. A lithium battery module with a capacity of 6Ah is built into the system and powers all devices. The system could work 5 h continuously. The final system setup is shown in Fig. 8.
Evaluation Metrics
31We adopted angular error (AE), CIE 1976 L * a * b * color space color error ( E ab ), peak SNR (PSNR), and the structural similarity index measure (SSIM) to evaluate the color restoration results. The metrics are described in detail below.
321) AE AE is used to assess angular bias between two vectors. Smaller AE means more similar color vectors. Its equation is
33where X is the reference color vector and Y is the evaluated color vector.
342) E ab CIE1976 L * a * b * color space is a uniform color space that is usually used to assess color changes perceived by human vision. Small values are better. Its equation is [27]
35where f is the reference image, g is the test image, and "bit" is the image's bit depth.
4) SSIM
36The range of SSIM is (0, 1) and a bigger SSIM value is better. Its equation is [29]
37where μ f and μ g are the means of image f and g, respectively; σ f and σ g are standard deviations of image f and g;σ fg is the covariance of images f and g, and C 1 , C 2 , and C 3 are constants.
RGBN Camera Color Restoration Results
38The color restoration results are shown in Figs. 9-14. The proposed method is compared with the Chen et al. [4] method and the Han et al. [2] nonlinear regression method on test set. The evaluation metrics are shown in Table 1. The proposed method obtains better results on AE, E ab , and PSNR, but slightly worse results on SSIM compared with the Han method. Generally speaking, CCM-based color restoration methods potentially enhance image contrast and amplify image noise at the same time. Hence, additional image denoise post-processing is needed, which limits the efficiency of the algorithm. For specific scenes, the color restored images look reddish and over-enhanced after processing by CCM-based methods compared with the proposed method, as shown in Fig. 12(e) and Fig. 12(f). The leaves look reddish and the light spot on the trunk is over-enhanced. The proposed method outputs more stable and reliable restored color.
SSMID Dataset Color Restoration Results
39The proposed method was compared with ENDENet and CDNet [17] on the SSMID dataset. The color restoration results of the subset of SSMID called OMSIV are shown in Fig. 15. The evaluation metrics are shown in Table 2, in which 'x' means the metric is not adopted in the compared method. The mean PSNR increased 0.76 dB and mean SSIM increased 26.4% on the test set when training end-to-end with the proposed network structure. The mean PSNR slightly decreased while the mean SSIM was still better than ENDENet and CDNet from training with generated data. The ENDENet and CDNet provide better results on AE. Actually, PSNR and AE react to similar image properties, so it is confusing that ENDENet and CDNet perform better by the AE measure while having worse PSNR.
40It is worth noting that end-to-end training always produces the best results, but an end-to-end trained network cannot be generalized to different sensors. Thus, comparing the proposed method trained with generated data with ENDENet and CDNet, which are trained end-to-end, is unfair. The decrease of each metric is as expected but the proposed method still has better SSIM. The comparison here is provided as proof that the proposed method could get satisfactory color restoration results without a setup dataset containing a large number of images.
Conclusion
41RGBN cameras capture visible light and NIR light simultaneously, but introduce extra color bias with a more complicated function. The traditional CCM model does not provide satisfactory RGBN camera color restoration results. A CNN can fit the mapping function when a large set of training data is provided. However, setting up a dataset with large amount of data is time-consuming. Also, the trained CNN model cannot be generalized to other sensors. We have proposed here a training pipeline to generate training pairs utilizing an open access RGB-NIR dataset based on target RGBN camera parameters. We trained a CNN model with generated data to validate the results. The results show that the proposed method produces more reliable and more stable color restoration results than CCM-based methods. The proposed method could achieve similar color restoration results compared with end-to-end training networks and can be applied to different sensors. The proposed method can rapidly train a new CNN model with generated data when the sensor parameters are changed, without setting up a new dataset. However, the proposed method is limited by the open access dataset's image quality and scene richness. In future work, better color bias models could be further studied to generalize more accurate color bias images.
참고문헌 29건
- Adam: A Method for Stochastic Optimization 2014
- Enhancing Color Images of Extremely Low Light Scenes Based on RGB/NIR Images Acquisition With Different Exposure Times IEEE Transactions on Image Processing · Institute of Electrical and Electronics Engineers · 2015 10.1109/tip.2015.2448356
- Multiscale structural similarity for image quality assessment 2004 10.1109/acssc.2003.1292216
- Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classification 2015 10.1109/iccv.2015.123
- U-Net: Convolutional Networks for Biomedical Image Segmentation Lecture notes in computer science · Springer Science+Business Media · 2015 10.1007/978-3-319-24574-4_28
- Multi-spectral SIFT for scene category recognition 2011 10.1109/cvpr.2011.5995637
- A study of digital camera colorimetric characterization based on polynomial modeling Color Research & Application · Wiley · 2000 10.1002/1520-6378(200102)26:1<76::aid-col8>3.0.co;2-3
- A spatial processor model for object colour perception Journal of the Franklin Institute · Elsevier BV · 1980 10.1016/0016-0032(80)90058-7
- RGB-NIR multispectral camera Optics Express · Optica Publishing Group · 2014 10.1364/oe.22.004985
- Image Quality Metrics: PSNR vs. SSIM 2010 10.1109/icpr.2010.579
- Color Correction Using Root-Polynomial Regression IEEE Transactions on Image Processing · Institute of Electrical and Electronics Engineers · 2015 10.1109/tip.2015.2405336
- A low-cost VIS-NIR true color night vision video system based on a wide dynamic range CMOS imager IEEE Intelligent Vehicles Symposium · 2009 10.1109/ivs.2009.5164290
- Color correction with edge preserving and minimal SNR decrease using multi-layer decomposition Proceedings of SPIE, the International Society for Optical Engineering/Proceedings of SPIE · SPIE · 2012 10.1117/12.907987
- N-to-SRGB Mapping for Single-Sensor Multispectral Imaging 2015 10.1109/iccvw.2015.18
- Enhancing low-light color images using an RGB-NIR single sensor 2015 10.1109/vcip.2015.7457844
- Least Square based Multi-spectral Color Interpolation Algorithm for RGB-NIR Image Sensors 2015 10.5220/0005265000380045
- Color Restoration for Infrared Cutoff Filter Removed RGBN Multispectral Filter Array Image Sensor 2015 10.5220/0005263600300037
- Color Restoration of RGBN Multispectral Filter Array Sensor Images Based on Spectral Decomposition Sensors · Multidisciplinary Digital Publishing Institute · 2016 10.3390/s16050719
- Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising IEEE Transactions on Image Processing · Institute of Electrical and Electronics Engineers · 2017 10.1109/tip.2017.2662206
- RGBN Multispectral Images: A Novel Color Restoration Approach Advances in intelligent systems and computing · Springer Nature · 2017 10.1007/978-3-319-61578-3_15
- Deep bilateral learning for real-time image enhancement ACM Transactions on Graphics · Association for Computing Machinery · 2017 10.1145/3072959.3073592
- Low-light color image enhancement via iterative noise reduction using RGB/NIR sensor Journal of Electronic Imaging · SPIE · 2017 10.1117/1.jei.26.4.043017
- Multispectral single-sensor RGB-NIR imaging: New challenges and opportunities 2017 10.1109/ipta.2017.8310105
- Wide-Band Color Imagery Restoration for RGB-NIR Single Sensor Images Sensors · Multidisciplinary Digital Publishing Institute · 2018 10.3390/s18072059
- Single-Sensor RGB-NIR Imaging: High-Quality System Design and Prototype Implementation IEEE Sensors Journal · IEEE Sensors Council · 2018 10.1109/jsen.2018.2876774
- Generating Training Data for Denoising Real RGB Images via Camera Pipeline Simulation arXiv (Cornell University) · Cornell University · 2019 10.48550/arxiv.1904.08825
- Unprocessing Images for Learned Raw Denoising 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) · 2019 10.1109/cvpr.2019.01129
- (제목 없음) DROPS (Schloss Dagstuhl – Leibniz Center for Informatics) · Schloss Dagstuhl – Leibniz Center for Informatics · 2021 10.4230/lipics.cp.2021.42
- Nonlinear Regression Color Correction Method for RGBN Cameras IEEE Access · Institute of Electrical and Electronics Engineers · 2020 10.1109/access.2020.2971423