The usual way linear polarisation is measured is by shining polarised light onto a polarising filter, rotating that filter and then using Malus' law to fit the data to a $I_0 cos^2(\theta_{beam} - \theta_{polariser})$ shape. By finding the angular position of the intensity peak we can infer the angle of polarisation of the incoming beam.
Now, assume we shine a beam of a certain spread in the transverse plane, having different polarisations everywhere. If we shine this beam onto a polariser, we will get a pattern of intensities $I(x, y) = I_0 cos^2(\theta_{beam}(x, y) - \theta_{polariser})$. We can find the values of $\theta_{beam}(x, y)$ as follows:
- Calibration -- rotate $\theta_{polariser}$ and calculate $\max_{x, y} (\theta_{beam}(x, y))$, the peak intensity. The maximum of the peak intensity over all values of $\theta_{polariser}$ will give you $I_0$.
- Fix $\theta_{polariser}$ to the value that gives the maximum peak intensity. Now you know that you have aligned your polariser with one of the polarisations present in the beam. Then, the ratio $I(x,y) / I_0$ will give you $cos^2(\theta_{beam}(x, y) - \theta_{polariser})$, from which $\theta_{beam}(x, y)$ can be inferred.
This method works for polarisation that is constant in time. For other types of polarisation, you can always take a snapshot over a short period of time that has roughly constant polarisation. Or, if the polarisation is circular, you can use a quarter waveplate to convert it to linear.