This paper proposes a new similarity measure for the content-based image retrieval (CBIR) systems. The similarity measure is based on the multidimensional generalization of the Wald-Wolfowitz (MWW) runs test and the k-means clustering algorithm. The performance comparisons between the proposed method and the current CBIR method based on MWW runs test were performed, and it can be seen that the proposed methods outperform the current method in the sense that the proposed method provides higher performance than the current method for the same computational time.