Skip to content
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

Coordinate system of .trc #16

Open
JoanCharmant opened this issue Sep 27, 2024 · 6 comments
Open

Coordinate system of .trc #16

JoanCharmant opened this issue Sep 27, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@JoanCharmant
Copy link

This looks like an awesome project. I tried it on a few videos and it seems pretty robust

I would like to integrate the output in Kinovea. I'll write a parser for the .trc files it produces.
Could you explain the coordinate system used? I see the .trc says "units" is meters but I'm not sure about where to find the scaling factor in order to remap that to the image size of the video.

@JoanCharmant
Copy link
Author

Ah, I see this comment

# Select only the keypoints that are in the model from skeletons.py, invert Y axis, divide pixel values by 1000

@JoanCharmant
Copy link
Author

JoanCharmant commented Sep 28, 2024

OK, it's working. I made a quick experiment with keeping all the posture visible at once combined with camera motion estimation. 😀

t6-onion-skinning

At the moment I'm using these options:

sports2d --video_input "long_jump.mp4" --filter False --interp_gap_smaller_than 500 --show_graphs False  --display_angle_values_on None

I remove the filtering to get the raw data to match the image better, as I'm going to do the filtering on my side afterwards anyway, and this is more for visual feedback than measurements I think for now. Interpolation seems always better than filling gaps with the last value when there is motion.

I was using display_angle_values_on=None to evaluate how well the stick figure sticks to the person without the clutter of the angles, I think it could be good to have an option to not draw the angle shapes either and just have the body model.

@davidpagnon
Copy link
Owner

davidpagnon commented Oct 3, 2024

Hi, sorry I was away from my computer for a few days. I'm glad you figured it out!

I plan to add a feature for calibrating the camera (i.e. to obtain coordinates in meters rather than in px), it will come when I have a moment.

I think it could be good to have an option to not draw the angle shapes either and just have the body model.

Noted! I don't have time for it right now but I'll include this feature as soon as I do :)

@davidpagnon
Copy link
Owner

I've just realized that you are the author of Kinovea, which is one of the most widely used tools in biomechanics courses around the world. Congrats on making such a tool free and open-source!

Could you keep me updated when you manage to integrate the output with Kinovea? I'll direct people to Kinovea in the doc.

@JoanCharmant
Copy link
Author

JoanCharmant commented Oct 7, 2024

Yes for sure!

I don't know much about .trc format but if they have a provision for exporting raw pixel coordinates it could be interesting as an option. Or document the transform in the readme near the angle conventions.

This issue can be closed as far as I'm concerned. Thanks!

@davidpagnon davidpagnon added the enhancement New feature or request label Oct 8, 2024
@davidpagnon
Copy link
Owner

Hi, I just released a new version with the option not to display and calculate angles (--calculate_angles False)

For your interest, in the next few days (hopefully), I'm going to add some calibration option for computing coordinates in meters rather than in pixels. And then if people do not choose this option, they will get raw pixel coordinates rather than this weird *1000 multiplication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants