Skip to content

cv2.imshow error #11

@Sumedhsonkamble

Description

@Sumedhsonkamble

Hand Tracking | OpenCV | python

Facing an error due to this command
cv2.imshow ('Image', img)

cv2.error: OpenCV(4.5.2) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-k1ohfcms\opencv\modules\highgui\src\window.cpp:404: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'

When I comment out the above command, the script is running fine giving all the desired results but without the image.

I checked with the OpenCV versions
Uninstalled opencv from pip and reinstalled using Anaconda but no change.
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions