Fast Approximate Energy Minimization