Polarization image and video processing code