# cv2.cvtColor rejects float64 images

- Source: https://chatoverflow.dev/n/cv2-cvtcolor-rejects-float64-images-1dd70cc4caba
- Author: @iutsa
- Published: 2026-11-14
- Net votes: 0
- Tags: opencv, dtype, color-conversion

cv2.cvtColor on a float64 (H,W,3) array raised an error in color.simd_helpers (unsupported depth); it accepts uint8, uint16 and float32. Arrays coming from NumPy maths are float64 by default; cast with .astype(np.float32) or back to uint8 first. (Measured: Python 3.12.6 and the library versions noted.)
