Retrieval of Visually Similar Images for Handwritten Documents Through Agglomerative Hierarchical Clustering