Traffic Speed Radar (OpenCV/Image Processing)

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 มิ.ย. 2021
  • This video is my project for a traffic speed radar using (Python, OpenCV) . Here's the link to the codes:
    GitHub Link : github.com/dhananjaymenon/Spe...
    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.

ความคิดเห็น • 96

  • @theleadersway980
    @theleadersway980 ปีที่แล้ว +3

    You saved me from a lot of research hours. Thanks a lot for sharing your project

    • @kokandarshan4173
      @kokandarshan4173 ปีที่แล้ว

      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 🙏🙏

  • @orojasp
    @orojasp 2 ปีที่แล้ว +1

    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

    • @dsmtutorials3209
      @dsmtutorials3209  2 ปีที่แล้ว

      Thank you ! What project are you working on?

    • @kokandarshan4173
      @kokandarshan4173 ปีที่แล้ว

      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 🙏🙏

  • @alexandrecp3183
    @alexandrecp3183 2 ปีที่แล้ว +1

    Super cool, congratulations!

  • @sanjusabu5488
    @sanjusabu5488 8 หลายเดือนก่อน

    You saved my BTP, thanks😭

  • @svetlinzarev3453
    @svetlinzarev3453 2 ปีที่แล้ว

    Very nice project. Good work!

    • @kokandarshan4173
      @kokandarshan4173 ปีที่แล้ว

      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 🙏🙏

  • @Sovligor_qishlogi
    @Sovligor_qishlogi 9 หลายเดือนก่อน

    thank you so much

  • @alph4966
    @alph4966 2 ปีที่แล้ว +1

    I love your work
    from japan

    • @kokandarshan4173
      @kokandarshan4173 ปีที่แล้ว

      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 🙏🙏

  • @johndilinller9672
    @johndilinller9672 2 ปีที่แล้ว

    I woud be great if there were an output video. Great Job

  • @Techsucker222
    @Techsucker222 5 หลายเดือนก่อน

    Great Job

  • @bxoz3352
    @bxoz3352 10 หลายเดือนก่อน

    Would this work perfectly even if the road is horizontal?
    By computing the necessary value also?

  • @johnlloyd5047
    @johnlloyd5047 6 หลายเดือนก่อน

    Hello, may I ask what kind of testing or analysis did you do for this system review?

  • @Kishi1969
    @Kishi1969 2 ปีที่แล้ว +1

    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

  • @ikkeniikkewel
    @ikkeniikkewel 2 ปีที่แล้ว

    good job.

  • @kokandarshan4173
    @kokandarshan4173 ปีที่แล้ว

    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 🙏🙏

  • @prashanthvines-dp8dx
    @prashanthvines-dp8dx 8 หลายเดือนก่อน

    how to make this video work for all different videos

  • @muhammadzaidhasan2848
    @muhammadzaidhasan2848 6 หลายเดือนก่อน

    can i get output as vehicle type and corressponding speed with time stamp......preferably in excel format?

  • @UshieThomas-kd9kv
    @UshieThomas-kd9kv 11 หลายเดือนก่อน

    Sir thank you so much am also working on the same project. Please can I get the code and videos? To help me out?

  • @99dynasty
    @99dynasty ปีที่แล้ว

    If used from a moving vehicle, detecting the velocity of surrounding vehicles would it work? The speed differentials would be low, >50 kmp

    • @kokandarshan4173
      @kokandarshan4173 ปีที่แล้ว

      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 🙏🙏

  • @devanshsharma5159
    @devanshsharma5159 2 ปีที่แล้ว +4

    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.

    • @altayerkul9010
      @altayerkul9010 ปีที่แล้ว

      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

    • @kokandarshan4173
      @kokandarshan4173 ปีที่แล้ว

      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 🙏🙏

  • @susheel170
    @susheel170 2 ปีที่แล้ว

    Great work … Do you know how to calculate trajectory calculations of Vehicles.?

    • @dsmtutorials3209
      @dsmtutorials3209  2 ปีที่แล้ว

      Thank you!
      I haven't worked on trajectory yet...but this video on Murtaza's Workshop might help.
      th-cam.com/video/PVtmK8LmYpA/w-d-xo.html
      It works on the trajectory of Basket Balls

  • @muhammadzaidhasan2848
    @muhammadzaidhasan2848 6 หลายเดือนก่อน

    Sir , will it be helpful with 4hr long video.

  • @itexpert6784
    @itexpert6784 ปีที่แล้ว

    exceed wala folder share kr dyn please??? jis main Images hun

  • @iswastikmishra
    @iswastikmishra ปีที่แล้ว

    sir can you re-provide the video you used on this project it seems you have removed that video from your github

  • @maryamrezaie5203
    @maryamrezaie5203 2 ปีที่แล้ว

    What radar did you use?

  • @AmhiMalvani-ys3io
    @AmhiMalvani-ys3io ปีที่แล้ว

    Why dataset is not created what if I want to add video other than these

  • @user-jg7ki4ml8w
    @user-jg7ki4ml8w ปีที่แล้ว

    Hello how can i have the file speed record.txt becuse my code give me error and give me the file not find

  • @adithyamurali-hs5ut
    @adithyamurali-hs5ut ปีที่แล้ว

    thanks a lot

    • @kokandarshan4173
      @kokandarshan4173 ปีที่แล้ว

      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 🙏🙏

  • @deborinabarman9860
    @deborinabarman9860 ปีที่แล้ว

    Can someone plz help the metere calculation 214

  • @user-gj4xk8wn8w
    @user-gj4xk8wn8w ปีที่แล้ว

    Great work. Is their a paper on it? Can u calculate the headway between the vehicles?

    • @vissuuu69
      @vissuuu69 ปีที่แล้ว

      do you have the video

    • @dsmtutorials3209
      @dsmtutorials3209  ปีที่แล้ว

      This project does not calculate headway between vehicles, but it is a feasible idea.
      I haven't made a paper on it

    • @kokandarshan4173
      @kokandarshan4173 ปีที่แล้ว

      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 🙏🙏

  • @shahidumar6513
    @shahidumar6513 2 ปีที่แล้ว +1

    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?

    • @dsmtutorials3209
      @dsmtutorials3209  2 ปีที่แล้ว

      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)

    • @kokandarshan4173
      @kokandarshan4173 ปีที่แล้ว

      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 🙏🙏

  • @chandanyadav-dg8eh
    @chandanyadav-dg8eh 2 ปีที่แล้ว

    Sir, the distance you have taken 214 is in meter pr pixel ?

    • @dsmtutorials3209
      @dsmtutorials3209  2 ปีที่แล้ว

      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.

  • @-lh-3439
    @-lh-3439 ปีที่แล้ว +3

    Can someone plz help me with the speed function? How is 214 calculated?

    • @kokandarshan4173
      @kokandarshan4173 ปีที่แล้ว

      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 🙏🙏

  • @asharazeem3692
    @asharazeem3692 2 ปีที่แล้ว +2

    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

    • @dsmtutorials3209
      @dsmtutorials3209  2 ปีที่แล้ว +1

      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

    • @AmhiMalvani-ys3io
      @AmhiMalvani-ys3io 11 หลายเดือนก่อน

      Hello have you worked on these project using diff video?? Will you plz help me out

  • @Kishi1969
    @Kishi1969 2 ปีที่แล้ว

    Can you share the Video you use sir?

  • @Kishi1969
    @Kishi1969 2 ปีที่แล้ว +1

    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'

    • @tarikulislam-jw5fh
      @tarikulislam-jw5fh ปีที่แล้ว +1

      same goes here

    • @kokandarshan4173
      @kokandarshan4173 ปีที่แล้ว

      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 🙏🙏

  • @pranav-fl1kz
    @pranav-fl1kz 2 ปีที่แล้ว +1

    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 .

    • @AmhiMalvani-ys3io
      @AmhiMalvani-ys3io 11 หลายเดือนก่อน

      Hello have you worked on these project using diff video?? Will you plz help me out

  • @user-lr3py7hq8c
    @user-lr3py7hq8c 2 ปีที่แล้ว

    Please fix Error line 17
    object_detector = cv2.createBackgroundSubtractorMOG2(history=None, varThreshold=None)
    typeError: an integer is required (got type NoneType)

    • @dsmtutorials3209
      @dsmtutorials3209  2 ปีที่แล้ว

      I think the issue might be the version of opencv..
      Are you using PyCharm? It should work there

  • @candirenaldi7974
    @candirenaldi7974 2 ปีที่แล้ว

    love your work,
    i hope you don't mind if used your code to my project

    • @kokandarshan4173
      @kokandarshan4173 ปีที่แล้ว

      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 🙏🙏

  • @laminemerrad8145
    @laminemerrad8145 2 ปีที่แล้ว

    Any one Guide me to the paper

  • @duniaku642
    @duniaku642 2 ปีที่แล้ว

    Can anyone help me, why I can't find TEXT FILE SUMMARY in TextEdit? I use macOS

    • @dsmtutorials3209
      @dsmtutorials3209  2 ปีที่แล้ว

      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

  • @duanduan3736
    @duanduan3736 2 ปีที่แล้ว

    you only check live CAM for speed measurement ?

    • @dsmtutorials3209
      @dsmtutorials3209  2 ปีที่แล้ว

      This is not a live cam. It is a pre-recorded video

  • @uditdp6962
    @uditdp6962 ปีที่แล้ว

    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

    • @dsmtutorials3209
      @dsmtutorials3209  ปีที่แล้ว

      I just noticed it accidently got deleted. I put it up again on the same link. Thanks for calling it out.

    • @kokandarshan4173
      @kokandarshan4173 ปีที่แล้ว

      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 🙏🙏

  • @kurniahadisetiana9123
    @kurniahadisetiana9123 2 ปีที่แล้ว

    hii sir can you share produk katalog for me because i need solution in indonesia speed radar and Overdimension detection
    thanks

    • @dsmtutorials3209
      @dsmtutorials3209  2 ปีที่แล้ว

      Documentation of this project is available in the Github link provided under "Review 3". Will that do?

  • @nimeshanand4579
    @nimeshanand4579 2 ปีที่แล้ว

    sir can you assist me in writting a program for classification of vehicles

    • @dsmtutorials3209
      @dsmtutorials3209  2 ปีที่แล้ว

      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)
      th-cam.com/video/XoMiveY_1Z4/w-d-xo.html

  • @memo20250
    @memo20250 ปีที่แล้ว

    I want to file pdf

  • @lavitratyagi
    @lavitratyagi ปีที่แล้ว

    hey can you please provide the link of the video that you used

    • @dsmtutorials3209
      @dsmtutorials3209  ปีที่แล้ว

      I just noticed it accidently got deleted. I put it up again on the same link. Thanks for calling it out.

  • @Kishi1969
    @Kishi1969 2 ปีที่แล้ว

    Good Job and nice video...Please i tried to locate the video but I cant get it. Please can you upload the video please

    • @kokandarshan4173
      @kokandarshan4173 ปีที่แล้ว

      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 🙏🙏

  • @abdalarmden7382
    @abdalarmden7382 ปีที่แล้ว

    How to read Arabic numbers

  • @91-ritikjain36
    @91-ritikjain36 2 ปีที่แล้ว

    we can also use java sir

    • @dsmtutorials3209
      @dsmtutorials3209  2 ปีที่แล้ว

      Yes, you can. However, Python is better to use when it comes to image processing and AI related projects.

  • @concnew1420
    @concnew1420 2 ปีที่แล้ว

    Sir import cv2 me error aa rhi hai

    • @dsmtutorials3209
      @dsmtutorials3209  2 ปีที่แล้ว

      You have to install the library first before running the program.
      Try using "pip install opencv-python" in the terminal.

  • @aymanjamal6130
    @aymanjamal6130 8 หลายเดือนก่อน

    حافظين اماكنهم مهما غيروها 😂 انتبهو من طريق الملك فهد وانت داخل من طريق القصيم وجهك جنوب في سرعة ١٠٠ كاميرا وقدام بمسافة بسيطة كامرتين لا تتعدو ١٠٠ انتبهو وعند اللفة حقت الدائري الشمالي في سيارة كورولا توقف على جنب فيها كاميرا على الطبلون انتبهو منها وبعدها ب كيلو واقل كاميرا متحركة

  • @itexpert6784
    @itexpert6784 ปีที่แล้ว

    traffic record file is not in source code

    • @dsmtutorials3209
      @dsmtutorials3209  ปีที่แล้ว

      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.

    • @kokandarshan4173
      @kokandarshan4173 ปีที่แล้ว

      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 🙏🙏

  • @user-om7du4il1u
    @user-om7du4il1u 24 วันที่ผ่านมา

    this is a bullshit nothing work

  • @abhinavaman8008
    @abhinavaman8008 ปีที่แล้ว +1

    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.

    • @AmhiMalvani-ys3io
      @AmhiMalvani-ys3io 11 หลายเดือนก่อน

      Hello Aman have you implemented these project for diff videos?