Optical Character Recognition is a most recent field in area of pattern recognition and machine learning in last decade. In this article, the suitable techniques are designated for better character recognition in document into machine readable form. It is belonging with Content Based Image Retrieval (CBIR) system, which solve the delinquent of searching images in huge dataset. The recognition technique of handwritten character is not developed efficiently till, because of variations in size, shape, style, slats etc. in writing skill of human being. To overcome such problems, the part of concentration is feature extraction and algorithm that take care of such variation. In this paper independent component analysis is used for extracting features. For feature vector selection particle swarm optimization and firefly algorithms are applied. It is observed that due to distributed neighborhood pixel of an image, the PSO gives better recognition rates.