You could also try running a moving window over the image with a filter that is sum of the pixel values inside. Tune the size to say double the size of the bridge width. You should expect to see a fairly sharp transition when you run off the bridge onto the shore.