Traffic Speed Radar (OpenCV/Image Processing)
HTML-код
- Опубликовано: 6 фев 2025
- This video is my project for a traffic speed radar using (Python, OpenCV) . Here's the link to the codes:
GitHub Link : github.com/dha...
24th November Update:
I have altered SpeedRadar2 and tracker2 slightly to solve 2 errors that popped up during implementation:
1. The frame.resize() error at the end of the video.
2. The folder does not exist error for saving SpeedRecord.txt. The folder will now be created in the same directory of the python file.
You may want to delete the TrafficRecord folder each time before running the code to save the new results.
You saved me from a lot of research hours. Thanks a lot for sharing your project
What if I want these to work on diff videos will it work does it requires training or just need to make changes in given code like roi n speed (Also how to set speed for diff vid) ..
Plz help my final presentation of BE project is on 2 June it's urgent 🙏🙏
Congrats!
Idk really why youtube is recommending me this, maybe bc last days I've been watching vids about proximity sensors (mostly microwave ones).
I've seen a couple of options of measuring speed using video processing, same as you propose and I find that a great idea. I enjoy your showing, is very educational.
Pd i was searching about microwave ones just for testing funcionalitys over pir or ultrasonic ones
Thank you ! What project are you working on?
What if I want these to work on diff videos will it work does it requires training or just need to make changes in given code like roi n speed (Also how to set speed for diff vid) ..
Plz help my final presentation of BE project is on 2 June it's urgent 🙏🙏
You saved my BTP, thanks😭
Super cool, congratulations!
I love your work
from japan
What if I want these to work on diff videos will it work does it requires training or just need to make changes in given code like roi n speed (Also how to set speed for diff vid) ..
Plz help my final presentation of BE project is on 2 June it's urgent 🙏🙏
can i get output as vehicle type and corressponding speed with time stamp......preferably in excel format?
Very nice project. Good work!
What if I want these to work on diff videos will it work does it requires training or just need to make changes in given code like roi n speed (Also how to set speed for diff vid) ..
Plz help my final presentation of BE project is on 2 June it's urgent 🙏🙏
I woud be great if there were an output video. Great Job
Great Job
Why dataset is not created what if I want to add video other than these
Can someone plz help me with the speed function? How is 214 calculated?
What if I want these to work on diff videos will it work does it requires training or just need to make changes in given code like roi n speed (Also how to set speed for diff vid) ..
Plz help my final presentation of BE project is on 2 June it's urgent 🙏🙏
how to make this video work for all different videos
What if I want these to work on diff videos will it work does it requires training or just need to make changes in given code like roi n speed (Also how to set speed for diff vid) ..
Plz help my final presentation of BE project is on 2 June it's urgent 🙏🙏
Sir , will it be helpful with 4hr long video.
I got the video you used already
can you look the issue of frame = cv2.resize(frame, None, fx=0.5, fy=0.5) please
Isn't the logic for calculating the time wrong here? You're calculating the time using the wall clock time of the system, which would be slower when you're processing the video ( I assume as that was what happened in my case). I calculated the speed by tracking the frame that the vehicle enters the first region ( or line) and the frame in which it leaves the second region. Dividing by the video's FPS we can get the actual time it took.
your method could fail like you mentioned above imagine your system heats up or it has to process something else so you could get lower fps this might be inaccurate
What if I want these to work on diff videos will it work does it requires training or just need to make changes in given code like roi n speed (Also how to set speed for diff vid) ..
Plz help my final presentation of BE project is on 2 June it's urgent 🙏🙏
Would this work perfectly even if the road is horizontal?
By computing the necessary value also?
Hello, may I ask what kind of testing or analysis did you do for this system review?
exceed wala folder share kr dyn please??? jis main Images hun
Sir thank you so much am also working on the same project. Please can I get the code and videos? To help me out?
thank you so much
Hello how can i have the file speed record.txt becuse my code give me error and give me the file not find
Can someone plz help the metere calculation 214
If we run the whole video it returns a error and summary is also not coming , but if we stop in between everything works fine. Can u please help in this .
Hello have you worked on these project using diff video?? Will you plz help me out
Can you plz assist me in the thing that how to implement it in live traffic and give that live data to arduino and to send this information to every nearby vehicle...so that we can avoid traffic congestion and accidents
Hey Ashar, I won't be able to assist you at the moment. But if I do a similar project, I'll let you know
Hello have you worked on these project using diff video?? Will you plz help me out
If used from a moving vehicle, detecting the velocity of surrounding vehicles would it work? The speed differentials would be low, >50 kmp
What if I want these to work on diff videos will it work does it requires training or just need to make changes in given code like roi n speed (Also how to set speed for diff vid) ..
Plz help my final presentation of BE project is on 2 June it's urgent 🙏🙏
Great work. Is their a paper on it? Can u calculate the headway between the vehicles?
do you have the video
This project does not calculate headway between vehicles, but it is a feasible idea.
I haven't made a paper on it
What if I want these to work on diff videos will it work does it requires training or just need to make changes in given code like roi n speed (Also how to set speed for diff vid) ..
Plz help my final presentation of BE project is on 2 June it's urgent 🙏🙏
good job.
How 214.15 is calculated mathematically? And
If 214.15 is the value for this footage does this mean that this project will give false values for other videos and we would have to change this value for other videos in order to get correct values Everytime?
Yes, 214.15 is the value for this particular footage. It will vary for other footage.
The easiest way to calculate the number is by taking a reference vehicle first, and calculate the speed backwards. (which I used)
A more complicated approach would be to take into consideration the distance between the lines, time taken, frame rate and lag due to computation.
Also note that the red lines are horizontal as the camera is right above the road. Depending on the footage you are using, you may have to tilt those red lines. (having markings on the road helps)
What if I want these to work on diff videos will it work does it requires training or just need to make changes in given code like roi n speed (Also how to set speed for diff vid) ..
Plz help my final presentation of BE project is on 2 June it's urgent 🙏🙏
Great work … Do you know how to calculate trajectory calculations of Vehicles.?
Thank you!
I haven't worked on trajectory yet...but this video on Murtaza's Workshop might help.
ruclips.net/video/PVtmK8LmYpA/видео.html
It works on the trajectory of Basket Balls
thanks a lot
What if I want these to work on diff videos will it work does it requires training or just need to make changes in given code like roi n speed (Also how to set speed for diff vid) ..
Plz help my final presentation of BE project is on 2 June it's urgent 🙏🙏
Im having a bit problem...here as below
File "c:\Users\Asus99\Desktop\PhD-Research-Papers\SpeedRadar-OpenCV-\SpeedRadar2.py", line 29, in
frame = cv2.resize(frame, None, fx=0.5, fy=0.5)
cv2.error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src
esize.cpp:4052: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
same goes here
What if I want these to work on diff videos will it work does it requires training or just need to make changes in given code like roi n speed (Also how to set speed for diff vid) ..
Plz help my final presentation of BE project is on 2 June it's urgent 🙏🙏
sir can you re-provide the video you used on this project it seems you have removed that video from your github
Can you share the Video you use sir?
Sir the video you added is not available in the drive anymore
I was in need of that video as a reference video for the project.
Can you please share the video you used to my mail or add in the drive link you provided
I just noticed it accidently got deleted. I put it up again on the same link. Thanks for calling it out.
What if I want these to work on diff videos will it work does it requires training or just need to make changes in given code like roi n speed (Also how to set speed for diff vid) ..
Plz help my final presentation of BE project is on 2 June it's urgent 🙏🙏
hey can you please provide the link of the video that you used
I just noticed it accidently got deleted. I put it up again on the same link. Thanks for calling it out.
Any one Guide me to the paper
you only check live CAM for speed measurement ?
This is not a live cam. It is a pre-recorded video
Sir, the distance you have taken 214 is in meter pr pixel ?
That number differs for different footages. I calculated that number by taking the first car to go at around 50 km/hr.
The rest of the vehicles speed would be calculated depending on that.
we can also use java sir
Yes, you can. However, Python is better to use when it comes to image processing and AI related projects.
What radar did you use?
sir can you assist me in writting a program for classification of vehicles
Is this from a live video? What all categories of vehicles are you trying to use?
Maybe this video would help. (I have not tried it myself)
ruclips.net/video/XoMiveY_1Z4/видео.html
Can anyone help me, why I can't find TEXT FILE SUMMARY in TextEdit? I use macOS
You might have to make some changes to the code.
TEXT FILE SUMMARY is done in tracker2.py from lines 93-111.
'filet' is the variable that stores the text file
love your work,
i hope you don't mind if used your code to my project
What if I want these to work on diff videos will it work does it requires training or just need to make changes in given code like roi n speed (Also how to set speed for diff vid) ..
Plz help my final presentation of BE project is on 2 June it's urgent 🙏🙏
How to read Arabic numbers
hii sir can you share produk katalog for me because i need solution in indonesia speed radar and Overdimension detection
thanks
Documentation of this project is available in the Github link provided under "Review 3". Will that do?
Good Job and nice video...Please i tried to locate the video but I cant get it. Please can you upload the video please
What if I want these to work on diff videos will it work does it requires training or just need to make changes in given code like roi n speed (Also how to set speed for diff vid) ..
Plz help my final presentation of BE project is on 2 June it's urgent 🙏🙏
Please fix Error line 17
object_detector = cv2.createBackgroundSubtractorMOG2(history=None, varThreshold=None)
typeError: an integer is required (got type NoneType)
I think the issue might be the version of opencv..
Are you using PyCharm? It should work there
traffic record file is not in source code
The traffic record file is created by running the code. The folder stores images (screenshots) from the video. The folder is not required before running the code.
What if I want these to work on diff videos will it work does it requires training or just need to make changes in given code like roi n speed (Also how to set speed for diff vid) ..
Plz help my final presentation of BE project is on 2 June it's urgent 🙏🙏
Sir import cv2 me error aa rhi hai
You have to install the library first before running the program.
Try using "pip install opencv-python" in the terminal.
حافظين اماكنهم مهما غيروها 😂 انتبهو من طريق الملك فهد وانت داخل من طريق القصيم وجهك جنوب في سرعة ١٠٠ كاميرا وقدام بمسافة بسيطة كامرتين لا تتعدو ١٠٠ انتبهو وعند اللفة حقت الدائري الشمالي في سيارة كورولا توقف على جنب فيها كاميرا على الطبلون انتبهو منها وبعدها ب كيلو واقل كاميرا متحركة
this is a bullshit nothing work
Hi Dhananjay, I am working on a similar kind of project and I want to talk to you related that. I have send you a linked connection request please accept it and we can talk over there.
Hello Aman have you implemented these project for diff videos?