Estimation of the degree of polarization through computational sensing