Traffic Speed Radar (OpenCV/Image Processing)

Поделиться
HTML-код
  • Опубликовано: 5 сен 2024
  • 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.

Комментарии • 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 🙏🙏

  • @-lh-3439
    @-lh-3439 2 года назад +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 🙏🙏

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

  • @alexandrecp3183
    @alexandrecp3183 2 года назад +1

    Super cool, congratulations!

  • @sanjusabu5488
    @sanjusabu5488 Год назад

    You saved my BTP, thanks😭

  • @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

  • @muhammadzaidhasan2848
    @muhammadzaidhasan2848 9 месяцев назад

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

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

  • @johndilinller9672
    @johndilinller9672 2 года назад

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

  • @johnlloyd5047
    @johnlloyd5047 10 месяцев назад

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

  • @bxoz3352
    @bxoz3352 Год назад

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

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

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

  • @AmhiMalvani-ys3io
    @AmhiMalvani-ys3io Год назад

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

  • @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 Год назад

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

  • @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 Год назад

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

  • @Techsucker222
    @Techsucker222 9 месяцев назад

    Great Job

  • @prashanthvines-dp8dx
    @prashanthvines-dp8dx Год назад

    how to make this video work for all different videos

  • @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

  • @UshieThomas-kd9kv
    @UshieThomas-kd9kv Год назад

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

  • @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 2 года назад +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 🙏🙏

  • @99dynasty
    @99dynasty 2 года назад

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

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

  • @Sovligor_qishlogi
    @Sovligor_qishlogi Год назад

    thank you so much

  • @itexpert6784
    @itexpert6784 Год назад

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

  • @deborinabarman9860
    @deborinabarman9860 Год назад

    Can someone plz help the metere calculation 214

  • @muhammadzaidhasan2848
    @muhammadzaidhasan2848 9 месяцев назад

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

  • @iswastikmishra
    @iswastikmishra 2 года назад

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

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

  • @ikkeniikkewel
    @ikkeniikkewel 2 года назад

    good job.

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

  • @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

  • @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.
      ruclips.net/video/PVtmK8LmYpA/видео.html
      It works on the trajectory of Basket Balls

  • @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

  • @maryamrezaie5203
    @maryamrezaie5203 2 года назад

    What radar did you use?

  • @chandanyadav-dg8eh
    @chandanyadav-dg8eh 3 года назад

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

    • @dsmtutorials3209
      @dsmtutorials3209  3 года назад

      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.

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

  • @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

  • @Kishi1969
    @Kishi1969 2 года назад

    Can you share the Video you use sir?

  • @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.

  • @laminemerrad8145
    @laminemerrad8145 2 года назад

    Any one Guide me to the paper

  • @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)
      ruclips.net/video/XoMiveY_1Z4/видео.html

  • @abdalarmden7382
    @abdalarmden7382 Год назад

    How to read Arabic numbers

  • @memo20250
    @memo20250 Год назад

    I want to file pdf

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

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

  • @aymanjamal6130
    @aymanjamal6130 Год назад

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

  • @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.

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

  • @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.

  • @user-om7du4il1u
    @user-om7du4il1u 4 месяца назад

    this is a bullshit nothing work

  • @abhinavaman8008
    @abhinavaman8008 2 года назад +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 Год назад

      Hello Aman have you implemented these project for diff videos?