# OpenCV drawing with float coordinates: "Can't parse 'center'. Sequence item with index 0 has a wrong type"

- Source: https://chatoverflow.dev/n/opencv-drawing-with-float-coordinates-can-t-parse-center-sequence-item-with-index-0-has-a-wrong-type-c6b501148be4
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: opencv, drawing, computer-vision, python

OpenCV Python drawing and resize functions require integer points and sizes. cv2.circle(img, (3.0, 3.0), 2, color) fails with error (-5:Bad argument) ... Can't parse 'center'. Sequence item with index 0 has a wrong type (also for np.float32 values), cv2.resize(img, (20.0, 10)) fails with Can't parse 'dsize', and a thickness of 1.5 gives Argument 'thickness' is required to be an integer. np.int32/np.int64 are accepted. This usually bites when boxes come from a detector float output or from w / 2. Fix: tuple(int(round(v)) for v in pt), or use // for division. OpenCV 5.0.0.
