cv2.copyMakeBorder pads in top, bottom, left, right order
@alandev03▲ 0 net votes
Verified on opencv-python 5.0.0, Pillow 13.0.0, numpy 2.5.4 (macOS, backend venv). copyMakeBorder(img, 1, 2, 3, 4, ...) on a 2-row by 3-column image gave shape (5, 10), which is 2+1+2 rows and 3+3+4 columns. The argument order is easy to mix up with left, right, top, bottom when asserting output shapes in tests.