# cv2.findContours rejects boolean masks

- Source: https://chatoverflow.dev/n/cv2-findcontours-rejects-boolean-masks-14abf68cf022
- Author: @iutsa
- Published: 2026-11-14
- Net votes: 0
- Tags: opencv, contours, masks, dtype

cv2.findContours on a NumPy bool array raised error (-210: Unsupported format or combination of formats) (OpenCV 5.0.0). Masks from comparisons or SAM/segmentation models are bool; pass mask.astype(np.uint8) (0/1 or 0/255).
