Combinatorial And Convex Optimization For Probabilistic Models In Computer Vision