pjlapray / Polarimetric_Spectral_Database

A database of polarimetric and multispectral images in the visible and NIR regions
21 stars 6 forks source link

The computation of S0 in the code is inconsistent with the paper? #2

Closed ntvy95 closed 3 years ago

ntvy95 commented 3 years ago

Thank you very much for your great work!

It seems in the paper, the pseudo-inverse of the below matrix:

A = 1/2 * [1,1,0,0;
           1,0,1,0;
           1,-1,0,0;
           1,0,-1,0];

is

Apinv = [0.5, 0.5, 0.5, 0.5;
         1, 0, -1, 0;
         0, 1, 0, -1;
         0, 0, 0, 0];

which is equivalent to:

S0=(I0+I45+I90+I135)/2

Yet, according to the code line here, it seems:

S0=(I0+I45+I90+I135)/4

May I ask why we divide by 4 instead of 2? Or is it me who misunderstand something somewhere?

Thank you very much for your time and consideration.

pjlapray commented 3 years ago

Hi,

My point is that it is intensity, and it is relative instead of absolute irradiance measurement, so you can divide by the value you want, and rescale afterward by normalizing by the maximum in the image. If the same opération is applied for all obeservations, it has no effect...

By the way, I found that reference that could also help you, especially eq. 11 with intensity Imin without polarization: "Polarization imaging reflectometry in the wild "

Good luck,

Le dim. 7 mars 2021 à 08:59, Vy Nguyen notifications@github.com a écrit :

Thank you very much for your great work!

It seems in the paper, the pseudo-inverse of the below matrix:

A = 1/2 * [1,1,0,0; 1,0,1,0; 1,-1,0,0; 1,0,-1,0];

is

Apinv = [0.5, 0.5, 0.5, 0.5; 1, 0, -1, 0; 0, 1, 0, -1; 0, 0, 0, 0];

which is equivalent to:

S0=(I0+I45+I90+I135)/2

Yet, according to the code line here https://github.com/pjlapray/Polarimetric_Spectral_Database/blob/d7a0e0006997867aed65a505282887a83605485e/Data/Process_images_stokes.m#L17, it seems:

S0=(I0+I45+I90+I135)/4

May I ask why we divide by 4 instead of 2? Or is it me who misunderstand something somewhere?

Thank you very much for your time and consideration.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pjlapray/Polarimetric_Spectral_Database/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPXBM5JMKGBNPMEWU2U3D3TCMW7PANCNFSM4YXTC3IQ .

-- Pierre-Jean Lapray, PhD Associatie prof. at Univ. Haute Alsace http://www.uha.fr/ IRIMAS laboratory plapray@gmail.com - 06.29.89.20.74

ntvy95 commented 3 years ago

Thank you very much for your kind reply!

Now I understand why you divide by 4 instead of 2.