Physics-Based Visual Inference: Theory And Applications