Recognizing digits using the density-based clustering method