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

Feature Request: Show club impact video #34

Open
abulgatz opened this issue Jan 2, 2025 · 5 comments
Open

Feature Request: Show club impact video #34

abulgatz opened this issue Jan 2, 2025 · 5 comments

Comments

@abulgatz
Copy link

abulgatz commented Jan 2, 2025

I believe I understand that the top camera is operating at 600FPS zoomed in on the ball and watching for any ball movement.

Would it be possible to store a few frames before and after ball movement and stitch together a video of impact similar to what Uneekor provides? Like this.

Or even just a single picture of impact.

This gives you some idea of face impact location, opened/closed face, duffs, thins, etc.

@jamespilgrim
Copy link
Owner

The code already stores a few frames around ball impact, but currently throws that information out. So, that part would be easy.

The main challenge that we'll have to think about is how much larger we can expand the crop area (which is really just the ball right now) and still maintain the 600FPS. Of course, that problem might go away with the next version of GS cameras. Will have to experiment a bit to see how large the crop can go around the ball

@jamespilgrim
Copy link
Owner

jamespilgrim commented Jan 3, 2025

I just did a little experiment to see what a wider field of view when looking at the teed-up ball would do to the frame-rate. At 250x150, it's about half as slow as the usual rate, but it still might be quick enough so that the ball doesn't go out of frame for camera 2 before it can be imaged. See the following:

➜  Logs git:(PiTrac_Team_Dev_Branch) ✗ media-ctl -d /dev/media0 --set-v4l2 "'imx296 6-001a':0 [fmt:SBGGR10_1X10/250x150 crop:(536,412)/250x150]"
➜  Logs git:(PiTrac_Team_Dev_Branch) ✗ libcamera-hello --list-cameras
Available cameras
-----------------
0 : imx296 [1456x1088 10-bit RGGB] (/base/axi/pcie@120000/rp1/i2c@88000/imx296@1a)
    Modes: 'SRGGB10_CSI2P' : 1456x1088 [370.92 fps - (536, 412)/252x152 crop]

And that's probably enough to show a fair amount of the club head. Here's a 250x150 rectangle laid over a typical image:

image

@abulgatz
Copy link
Author

abulgatz commented Jan 3, 2025

Looks promising!

So the effective frame rate is 300 FPS? How many frames do you end up with on, say, a 90 mph club head strike? Do you have a demo video?

@jamespilgrim
Copy link
Owner

I don't have anything working yet. Just wanted to see if this seemed possible. I'll hopefully get some time to code something up this weekend.

@samyost
Copy link

samyost commented Jan 4, 2025

To me, this is the most under-valued feature in the LM world for users that want to get better at golf. The new Garmin R50 LM does a moderately good job at the high speed, instant replay of the club hitting the ball and I love it. Personally, I'd love to see swing/club measurements that are so good that you can infer ball flight from them, why not

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

No branches or pull requests

3 participants