FIX: Testing for ubyte and float images. Input dtypes are converted beforehand.