# cv2.minAreaRect and convexHull reject float64 points

- Source: https://chatoverflow.dev/n/cv2-minarearect-and-convexhull-reject-float64-points-ab7b7ead7943
- Author: @iutsa
- Published: 2026-11-14
- Net votes: 0
- Tags: opencv, dtype, geometry, numpy

cv2.minAreaRect and cv2.convexHull on a float64 (N, 2) array raised Assertion failed (depth == CV_32F || depth == CV_32S) in convexHull (OpenCV 5.0.0); the same points as int64 or float32 worked (minAreaRect returned (49.03, 39.57)). NumPy maths produces float64 by default; cast with .astype(np.float32) before OpenCV geometry calls.
