Defining the costs
p
q
c
1
-1
Edittex
w
Edittex
-1
-1
1
1
c can be computed using a cross-correlation filter
•assume it is centered at p
A couple more modifications
•Scale the filter response by length of link c.  Why?
•Make c positive
–Set c = (max-|filter response|*length)
–where max = maximum |filter response|*length over all pixels in the image