Changed image to uint8 or double for specific functions