Python Forum
need help with tracking a tennis ball in a video
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
need help with tracking a tennis ball in a video
#1
I have this python code, but it seems to be tracking something off to the side of the video. the code is supposed to draw a red circle around the ball so i know it can see it. but the red circle is off to the right, and only showing a little bit of it, please let me know what i need to fix. thanks

Attached Files

.py   balltracking5.py (Size: 2.83 KB / Downloads: 121)
Reply
#2
Maybe not just draw the largest circle, try drawing them all?


EDIT:
maybe do your speed calcs before drawing the ball and only draw positive speed items?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to make ball stay within frame nathanael 2 821 Nov-15-2025, 04:07 PM
Last Post: deanhystad
  motion tracking script ig? k4ne 0 1,358 Dec-13-2023, 02:00 AM
Last Post: k4ne
  satellite tracking module barryjo 1 2,489 Mar-01-2022, 03:23 AM
Last Post: Larz60+
  Full Body Tracking and Recognition with OpenCV principemestizo 0 2,465 Oct-18-2021, 04:47 PM
Last Post: principemestizo
  bouncing ball with variable collision points (in time) Zhaleh 1 3,956 Jul-24-2020, 02:54 PM
Last Post: Marbelous
  How can i change the direction of the ball based on player's xcor and ycor collisions MohammedSohail 0 2,816 May-25-2020, 08:39 AM
Last Post: MohammedSohail
  Tracking 2 biggest objects in OpenCV Nup 0 2,733 Nov-12-2019, 11:08 AM
Last Post: Nup
  ATM Tracking Issue Zsapp01 1 3,265 Jun-04-2019, 07:20 PM
Last Post: Yoriz
  AttributeError: 'Ball' object has no attribute 'hit_paddle' meza1123 1 4,935 Jan-30-2019, 07:25 PM
Last Post: buran
  How to desing an app for tracking workload Cuz 4 4,731 Jan-08-2019, 10:45 AM
Last Post: Cuz

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020