Text Recognition with k-means Clustering