-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
question #13
Comments
@suqian1988 Hi Mike, thanks for opening the issue! If you want all the bounces to be marked on the court, then 👇 tennis-tracking/predict_video.py Lines 337 to 339 in 91f0fa2
the list idx stores the frame numbers where the ball touches the court. So, change thistennis-tracking/predict_video.py Lines 357 to 370 in 91f0fa2
with this while True:
ret, frame = video.read()
if ret:
# if coords[i] is not None:
for loc in idx:
center_coordinates = int(xy[loc][0]), int(xy[loc][1])
radius = 3
color = (255, 0, 0)
thickness = -1
cv2.circle(frame, center_coordinates, 10, color, thickness)
i += 1
output_video.write(frame)
else:
break Didn't run the code myself, but should work. |
oh,on the small black court, right?
is there a way to mark the bounce points on the main court?
thank you so much.
Mike.
…On Mon, Feb 14, 2022 at 7:11 AM Shukur Sabzaliev ***@***.***> wrote:
@suqian1988 <https://github.com/suqian1988> Hi there, thanks for opening
the issue!
Yes, it sure can.
In README.md I included a gif image where the bounces are *marked in blue*,
here
[image: image]
<https://user-images.githubusercontent.com/78250180/153860050-72db9991-b505-4e7d-bebb-253f926a419c.png>
If you want all the bounces to be marked on the court, then 👇
https://github.com/ArtLabss/tennis-tracking/blob/91f0fa2ba740e9840d23c5c0bf3dbeb3b62cbe05/predict_video.py#L337-L339
the list idx stores the frame numbers where the ball touches the court.
So, change this
https://github.com/ArtLabss/tennis-tracking/blob/91f0fa2ba740e9840d23c5c0bf3dbeb3b62cbe05/predict_video.py#L357-L370
with this
while True:
ret, frame = video.read()
if ret:
# if coords[i] is not None:
for loc in idx:
center_coordinates = int(xy[loc][0]), int(xy[loc][1])
radius = 3
color = (255, 0, 0)
thickness = -1
cv2.circle(frame, center_coordinates, 10, color, thickness)
i += 1
output_video.write(frame)
else:
break
Didn't run the code myself, but should work.
Feel free to reopen the issue, anytime!
😄
—
Reply to this email directly, view it on GitHub
<#13 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGEJ6UWQI653EAP6G54SSILU3DWNHANCNFSM5OHCONCQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@suqian1988 No, the code provided will mark the bounces only on the real court itself. |
Can the tennis-tracking mark the ball bounce position in the video?
thank you very much.
Mike
The text was updated successfully, but these errors were encountered: