K-means clustering from scratch on image to convert into binary image and Image denoising using median filter