PyImageSearch / imutils

A series of convenience functions to make basic image processing operations such as translation, rotation, resizing, skeletonization, and displaying Matplotlib images easier with OpenCV and Python.
MIT License
4.53k stars 1.02k forks source link

Fix【wrong type】about eyesCenter #270

Open BeGentleman opened 2 years ago

BeGentleman commented 2 years ago

Error Info:【TypeError: Can't parse 'center'. Sequence item with index 0 has a wrong type】 Cause by: eyesCenter's element's type is numpy.int64, which is need an int type Solved by: change numpy.int64 into int type sources: eyesCenter = ((leftEyeCenter[0] + rightEyeCenter[0]) // 2, (leftEyeCenter[1] + rightEyeCenter[1]) // 2) -> eyesCenter = (int((leftEyeCenter[0] + rightEyeCenter[0]) // 2), int((leftEyeCenter[1] + rightEyeCenter[1]) // 2))

AiDeepAlgo commented 2 years ago

I want to verify this fix, I have tested this. I'm also asking if this can be marge and integrated into a new release. thanks

mlgarrett commented 1 year ago

i too would love to see this fix merged as soon as possible! i have tested it as well and casting to int does make it work.

mcp292 commented 1 year ago

Fixes https://github.com/PyImageSearch/imutils/issues/278.

iaglourenco commented 11 months ago

Any possibility to merge this PR?