saimj7 / People-Counting-in-Real-Time

People Counting in Real-Time with an IP camera.
MIT License
528 stars 263 forks source link

not connecting to web cam #53

Closed SHIVARAJ6602 closed 1 year ago

SHIVARAJ6602 commented 1 year ago

image

I'm try to connect to My webcam as I don't have acess to IPcam now, and getting this error.

Starting the live stream.. Traceback (most recent call last): File "C:\Users\HP\Desktop\Real-Time-People-Counting\run.py", line 353, in run() File "C:\Users\HP\Desktop\Real-Time-People-Counting\run.py", line 100, in run frame = imutils.resize(frame, width = 500) File "C:\ProgramData\Anaconda3\lib\site-packages\imutils\convenience.py", line 69, in resize (h, w) = image.shape[:2] AttributeError: 'NoneType' object has no attribute 'shape'

works with a video file , but cannot connect to webcam for live feed.

XiaShenyue commented 1 year ago

image

I'm try to connect to My webcam as I don't have acess to IPcam now, and getting this error.

Starting the live stream.. Traceback (most recent call last): File "C:\Users\HP\Desktop\Real-Time-People-Counting\run.py", line 353, in run() File "C:\Users\HP\Desktop\Real-Time-People-Counting\run.py", line 100, in run frame = imutils.resize(frame, width = 500) File "C:\ProgramData\Anaconda3\lib\site-packages\imutils\convenience.py", line 69, in resize (h, w) = image.shape[:2] AttributeError: 'NoneType' object has no attribute 'shape'

works with a video file , but cannot connect to webcam for live feed.

============================================================================ I don’t know if you have solved this problem. My webcam has the same problem as yours. If you find a solution, please let me know. Thank you.

SHIVARAJ6602 commented 1 year ago

I had solved problem, but unfortunately I don’t have the project files anymore and I can’t remember how I did it. 😞 i can help if you share more info(error msg).

XiaShenyue commented 12 months ago

I had solved problem, but unfortunately I don’t have the project files anymore and I can’t remember how I did it. 😞 i can help if you share more info(error msg).

Thank you for taking the time to answer my question. I will continue to try. Thank you.

saimj7 commented 7 months ago

@XiaShenyue did you try this? To run on a webcam, set "url": 0 in utils/config.json https://github.com/saimj7/People-Counting-in-Real-Time?tab=readme-ov-file#webcam