nicknochnack / TFODCourse

944 stars 919 forks source link

Capture image Windows #123

Open imejiato opened 1 year ago

imejiato commented 1 year ago

I got this error, need hel´p

error Traceback (most recent call last) Cell In[16], line 9 7 ret, frame = cap.read() 8 imgname = os.path.join(IMAGES_PATH,label,label+'.'+'{}.jpg'.format(str(uuid.uuid1()))) ----> 9 cv2.imwrite(imgname, frame) 10 cv2.imshow('frame', frame) 11 time.sleep(2)

error: OpenCV(4.7.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\loadsave.cpp:783: error: (-215:Assertion failed) !_img.empty() in function 'cv::imwrite'

trungdang611 commented 1 year ago

try: python -m pip install jupyter

Staddl commented 8 months ago

I have now solved the issue for me:

I had my webcam software (LogiCapture) running while using my webcam for the project as well. Sometimes it didn't save any images at all, sometimes only for first class.

worked for me,

cheers.