Defining the costs
Treat the image as a graph
q
c
p
Want to hug image edges:  how to define cost of a link?
the link should follow the intensity edge
want intensity to change rapidly ?  to the link
 c » - |difference of intensity ? to link|