jorgem0 / traffic_counter Goto Github PK
View Code? Open in Web Editor NEWUsing Python and OpenCV to count cars on a highway.
Using Python and OpenCV to count cars on a highway.
while run traffic_counter.py on live cameras I am getting the following error.
I tried with different camera IP addresses the codes is unable to display video it only display for 2 to 3 seconds and video stops in the live stream.
-3074457345618259.0 30.0 1920 1080
Traceback (most recent call last):
File "C:\Users\OM_PRAJWL_NAMAHA\Desktop\github\imp\traffic_counter\traffic_counter.py", line 231, in
curcent = df.iloc[int(framenumber)][str(carids[currentcarsindex[i]])]
File "C:\Program Files\Python36\lib\site-packages\pandas\core\indexing.py", line 1500, in getitem
return self._getitem_axis(maybe_callable, axis=axis)
File "C:\Program Files\Python36\lib\site-packages\pandas\core\indexing.py", line 2230, in _getitem_axis
self._validate_integer(key, axis)
File "C:\Program Files\Python36\lib\site-packages\pandas\core\indexing.py", line 2139, in _validate_integer
raise IndexError("single positional indexer is out-of-bounds")
Hello,
i have found you great Project in Youtube. I will do the same as you, but i habe a Raspberry Pi 3B+. At the Moment i install OpenCV. Which packages i need for this Project?
Best Regards
Rolf
When I change your code like this >>
#cap = cv2.VideoCapture('cars.mp4')
cap = cv2.VideoCapture('rtsp://admin:[email protected]/Streaming/Channels/102');
for use with real video from camera. It's always have problem about index out of bound in this line >>
curcent = df.iloc[int(framenumber)][str(carids[currentcarsindex[i]])]
like a it cannot get value. So how can I resolve this. Now I would like to create code to get the car image
for processing LPR in the server. if you can do this for me. I can pay money to you.
Thank you
I try to test but i do not know why speed is so slow
When i try to run the program it shows this error - line 28, in
image = cv2.resize(frame, (0, 0), None, ratio, ratio) # resize image
cv2.error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-wvn_it83\opencv\modules\imgproc\src\resize.cpp:4051: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
How to fix this? Pls help
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.