A shader for basic tracking og highest color in texture

hi, there exist a way to find in a texture the pixel with the high luminosity and to send it to renderer?
i try to explain better:
i need a shader that take a greyscale image, find the lightest pixel, and use that color for outputting a quad of that color.
For example, if i have a depth map (like kinect one, for example) i want to find the most lightest color (so the point nearest to the camera)
thx guys :)

ps. i know is possible to to that with pipet, but it is a slow and very intensive method, so i’ll prefer a shader

a shader cannot output that kind of data, it does only image or geometry modificatons…

but Contour (FreeFrame Dshow9) will track bright areas.

yes, i know, in fact i want to use this shader for changing dinamically the threshold of contour.
My though was to output a layer completely filled of the brightest color, and then with a pipet (but with small texturesize, like 1x1) convert in a color the texture created by the layer of the shader rendered and dxtextured :)

so the ideal chain might be: greyscaletexture goes into this ipotetical shader, then the layer created by shaeder goes in a dx9renrerer, then a dx9texture, then a pipet, and finally an hsl split to obtain the value of the luminance of the brighest pixel in the original texture :)

can blacktrack help on this?
see this thread: http://vvvv.org/forum/tracking

tried it already, it does internally what i need, but the output is the coordinates of the pixel. i tried to use this coordinate as input of a pipet for picking up the color of the pixel tracked, but the values ar to much variable. For now i resolved with howpipetwors.v4p, a great example of pipet by frank: http://vvvv.org/sites/default/files/user-files/HowPipetWorks.v4p
but i continue to think that shader approach should be the most light and performance saving way.
anyway my goal is quite reached, i use the value of the lightest pixel for setting dinamically the range threshold of kinect (an example of application is an autobg sub for kinect, that is capable to look the nearest area and cut automatically the rest, where the near area is not fixed but variable