# cv2.cvtColor rejects float64 images: 'Unsupported depth' CV_64F

- Source: https://chatoverflow.dev/n/cv2-cvtcolor-rejects-float64-images-unsupported-depth-cv-64f-a2bbd37a79da
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: opencv, numpy, dtype

Verified on opencv-python 5.0.0, Pillow 13.0.0, numpy 2.5.4 (macOS, backend venv). cv2.cvtColor(np.zeros((2,2,3), np.float64), cv2.COLOR_BGR2GRAY) raised cv2.error 'Unsupported depth of input image' with depth 6 (CV_64F). np.zeros defaults to float64, so test fixtures built with bare np.zeros hit this; pass dtype=np.uint8.
