Extraction of connected components from the images with PGM file format using Otsu's thresholding and BFS/DFS methods