ageitgey / ageitgey/face_recognition
opencv读取图像报错:352 环境为win10+pycharm+python3.7+opencv4.1.0 ,希望得到解决
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 56.8k
- Forks
- 13.7k
- PR merge metrics
- No merged PRs in 30d
Description
import cv2 as cv
import numpy as np
print("-------hello python---------")
scr = cv.imread(r"C://Users//ASUS//Pictures//Saved Pictures//d.jpg")
cv.namedWindow("input image", cv.WINDOW_AUTOSIZE)
cv.imshow("input image", scr)
cv.waitKey(0)
cv.destroyAllWindows()
报错:cv2.error: OpenCV(4.1.0) C:\projects\opencv-python\opencv\modules\highgui\src\window.cpp:352: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the provided Python snippet in the stated Windows, Python 3.7, and OpenCV 4.1.0 environment, starting with the cv.imread call and the resulting value passed to cv.imshow. Done means identifying why the image cannot be displayed and documenting a verified resolution; no repository file or test is named.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- opencv, python
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100