GolfEditor¶
Application to manually select the various trackers on the frame.
Editor for user to select the various trackers.
usage: golfeditor [-h] [--prefix PREFIX] framedir
Positional Arguments¶
- framedir
Filename or dir holding all the frame files.
Named Arguments¶
- --prefix, -p
Prefix for json file(s). Append prefix to frame file but with .json suffix.
Default: “”
Contents¶
Editor to mark the various trackers by hand.
- golfdetection.golfeditor.create_parser()¶
Create a command line parser.
- golfdetection.golfeditor.edit_frame(frame_fname, json_prefix, msg)¶
Edit the frame fname and store the result in the json file.
- Parameters
frame_fname – Frame filename.
json_prefix – Prefix added to json filename.
msg – Message to display on the frame
- Return next state
Indicates whether to go to next/prev frame.
- golfdetection.golfeditor.main()¶
Main program
- golfdetection.golfeditor.mouse_event_handler(event, x, y, flags, frame)¶
Event handler to detect mouse clicks. Handles left button down click. The currently selected tracker is maintained in a global variable.
- golfdetection.golfeditor.process_key_pressed()¶
Process key stroke and set the gui state and trackers. Currently only tracking the ball and club shaft position.
- golfdetection.golfeditor.show_frame_main()¶
Display a copy of the orig frame with the messages.