Skip to content

Polylines bad argument: expected Ptr<cv::UMat> for argument 'img' #181

@LiamSimons

Description

@LiamSimons

Only for some images the text detection fails with the error:
cv2.polylines(img, [poly.reshape((-1, 1, 2))], True, color=(0, 0, 255), thickness=2)
cv2.error: OpenCV(4.6.0) 👎 error: (-5:Bad argument) in function 'polylines'

Overload resolution failed:

  • Layout of the output array img is incompatible with cv::Mat
  • Expected Ptrcv::UMat for argument 'img'

I have looked for a difference between the working and to failed images but cannot seem to find a difference?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions