MATLAB: Darkest pixel in image

histogramMATLAB

i want to get the darkest pixel in an image. the histogram represents the tonal distributions. the pixels that are darkest of all will be at the first line in histogram. how to get the pixels values that are in the darkest gray levels from an histogram. Please anybody help me.

Best Answer

X = rand(100);
[C,I] = min(X(:));