Detecting meandering rivers in images I have $n$ surfaces: $z_i(x,y)$ with a measured attribute (variable) on each surface: $a_i(x,y)$. Most of the surfaces will have a random distribution of the attribute across the surface, but some surfaces (the interesting ones) will show a meandering river pattern: 



I need your help in coming up with a measure that will tell us which of the $n$ surfaces are most likely to have such a pattern.

There are many possible maps with the same histogram as shown below; so the measure needs to "reward" spatial continuity.
To illustrate this I have created a random image with nearly the same histogram as the river image:


So image statistics ala entropy may only be part of the solution.

Here is an example of an image without a meandering river pattern:


My images are synthetic (made in Matlab). In real life the image without the pattern may have somewhat more spatial continuity in the form of small blobs of similar value.

Here are the images in grayscale:
A very simple measure would be to compare each row in the image with the row above it, allowing some horizontal shift.

I've hacked together this simple algorithm in Mathematica:

Mean[MapThread[
  Function[{line1, line2},
   Min[Table[Norm[line1 - RotateLeft[line2, shift]], {shift, -5, 5}]]
   ], {s[[2 ;;]], s[[;; -2]]}]]


It simply takes each pair of adjacent rows, rotates one of the rows by -5..5 pixels, and takes the smallest euclidean distance. This yields one euclidean distance for each row pair. I simply take the mean (but depending on your actual data, a truncated mean or median might be more robust).

These are the results I get for artificially generated samples (Formula: Normalize(random noise * (1-factor) + signal * factor))



If I plot the result against the signal strength, the algorithm seems to measure the "meandering river signal strength" quite well:



EDIT: I forgot to normalize the input samples. Fixed that an uploaded new result images