I tested ClusteringComponents with the examples provided in the Documentation Center (http://reference.wolfram.com/mathematica/ref/ClusteringComponents.html) of Mathematica. In Options > DistanceFunction there is an example provided how to apply your own DistanceFunction:
ClusteringComponents[{{1, 2}, 3, {10, 11}, {12, {13}}, 14}, 2, 1,
DistanceFunction -> (Abs[Length[#1] - Length[#2]] &)]
I tried to apply this to an image without any success. I only ended up with some very strange looking error messages. After a few more tests I found the following solution. First of all, ClusteringComponents seems to work with a selfmade DistanceFunction only if you provide the ImageData of a grayscale image. The following works:
Colorize@ClusteringComponents[ImageData[ColorConvert[img, "GrayScale"]], 3,
DistanceFunction -> (Norm[#1 - #2] &)]
I applied this to the following image

with the resulting image:

So at least it seems to work :) I really wonder what the implementation of ClusteringComponents looks like. To me this function is a little mystery now...
ClusteringComponents[]doesn't seem to accept a customDistanceFunction. Just those listed in the help – belisarius Jan 25 at 8:06