Removing noise from image and binary image conversion