Object-Detection-and-Distance-Measurement icon indicating copy to clipboard operation
Object-Detection-and-Distance-Measurement copied to clipboard

issues reg opencv accessing webcam on windows 10

Open Harshavardhan-PR opened this issue 3 years ago • 3 comments

[ WARN:[email protected]] global D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (1752) CvCapture_MSMF::grabFrame videoio(MSMF): can't grab frame. Error: -1072875772

hello , i am trying to run the file object_detection.py and i am getting this same error over and over , it worked perfectly fine before 2 months, but i had to delete all the files , when i tried to reinstall all the requirements and run i am getting these , i searched the stack overflow couldnt find anything helpful , i set the id val=0 to run on webcam locally . Can you please tell me why i am getting this error . Thanks in advance.

Harshavardhan-PR avatar Jan 03 '22 04:01 Harshavardhan-PR

2022-01-03 (2)

Harshavardhan-PR avatar Jan 03 '22 04:01 Harshavardhan-PR

I fixed this error by following the suggestions made by @Roggu92 in https://github.com/paul-pias/Object-Detection-and-Distance-Measurement/issues/42#issuecomment-983405853 - The TL;DR is that I needed the weight files and I was essentially able to remove all version from YOLOv4/requirements.txt

I also had the error return temporarily due to poor lighting.

pradoz avatar Jan 11 '22 04:01 pradoz

Check out the following relevant and easiest implementation.

https://github.com/HassanBinHaroon/object_detection-PLUS-distance_estimation-v1

HassanBinHaroon avatar Aug 20 '22 02:08 HassanBinHaroon