Closed Shakarim94 closed 5 years ago
Thank you for your careful check. However, in the original code, we have considered the color image channels and the noise generation demo works fine on my computer. In line 47, we define three noise level for each channel. you can re-check and run the code. If I have some mistake, I would love to merge your code in CBDNet repository.
Ok, I am little confused and want to clarify some things.
1) In the 'AddNoiseMosai.m' function if we don't specify sigma_c and sigma_s they are created automatically and each of them are 1x3 vectors, so each channel has its own noise level. However, if I just run the 'Test_Realistic_Noise_Model.m' code, sigma_c and sigma_s are only scalars. Therefore, noise_c_map had only one channel 421x381x1, and I hade size mismatch on line 63 of 'AddNoiseMosai.m'. So I think the lines 26 and 27 in 'Test_Realistic_Noise_Model.m' should be changed so that sigma_c and sigma_s are 1x3 vectors.
2) Now I am confused with 'L'? I thought it was luminance which doesn't have any color information (only one channel), then we apply Bayer filter and then demosaicing to obtain sRGB image. But turns out the 'L' is written as irradiance in the paper and it has 3 channels? P.S. I am aware that there is a mistake in equation 1, x should be replaced with L.
Thank you very much for clarifications!
noise_c_map didn't contain the channel dimension and the 'Test_Realistic_Noise_Model.m' didn't run on the given colored image