Interpreting Graph Cuts as a Max-Product Algorithm