function demo_visualizeP(P2D)
imSize =  [1280 1280];

P2Db = permute(reshape(single(full(P2D(1:100:end,:))), [], imSize(1), imSize(2)), [2 3 1]);
figure, imshow3D(P2Db);

disp('Computing covariance matrix...');
Pcorr = P2D*P2D';
figure, 
subplot(1,2,1), imagesc(Pcorr)
axis image, colorbar
title('Measurement covariance matrix P*P''')
subplot(1,2,2), imagesc(log10(Pcorr))
axis image, colorbar
title('... on a log_{10} scale')

end