elerac / polanalyser

Polarization image analysis tool. Demosaicing, Stokes vector, Mueller matrix.
MIT License
148 stars 26 forks source link

circular polarization #1

Closed yimuchunshu closed 1 year ago

yimuchunshu commented 3 years ago

if have to consider circular polarization ,how to modify the code to calculate 4x4 Mueller matrix with circular polarizer

elerac commented 3 years ago

Hi, @yimuchunshu!

I am focusing on circular polarization and would like to extend the program to handle all polarization states. I'm trying to develop the code to handle circular polarization (see circular branch). But the calculation of the 4x4 Mueller matrix is not yet available. Currently, I am very busy, so development is temporarily suspended.

To calculate the 4x4 Mueller matrix, it is recommended to modify calcMueller. In particular, it is the matrix A that is to be modified. A is determined by the light source and the camera side polarization elements and represents the relationship between the Mueller matrix and the captured intensity. So you should rewrite A to take into account the effect of the both linear and circular polarizers used for the measurement.

For your reference, here is how to calculate the 3x3 Mueller matrix. The relationship between the polarizer angles (_thetalight, _thetacamera), the intensity (i), and the Mueller matrix (_M1d) is expressed in matrix form as   i = a _M1d and   a = [1, cos(_thetalight), sin(_thetalight), cos(_thetacamera), cos(_thetacamera)cos(_thetalight), cos(_thetacamera)sin(_thetalight), sin(_thetacamera), sin(_thetacamera)cos(_thetalight), sin(_thetacamera)sin(_thetalight)].T (1x9)   _M1d = [m11, m12, m13, m21, m22, m23, m31, m32, m33] (9x1) Considering the combination of several angles, it can be extended to   I = A _M1d and   I = [i1, i2, ... , iN] (Nx1)   A = [a1, a2, ... , aN] (Nx9) All that remains is to solve the least-squares problem using a pseudo-inverse matrix.   _M1d = Apinv I

yimuchunshu commented 3 years ago

Thank you very much,

elerac commented 1 year ago

I have updated this project to v2.0.0. It can calculate the 4x4 Mueller matrix. If you remember, please check it!

yimuchunshu commented 1 year ago

Thanks a lot

yimuchunshu commented 1 year ago

I have updated this project to v2.0.0. It can calculate the 4x4 Mueller matrix. If you remember, please check it!

i do remember