The code under the sync directory should complete the task of taking a force plate video and a raw csv file syncing them together. The motion video uses a bounding box (can be edited) and detects pixel differences (threshold can be modified). This has been explained in previous pull requests though. The new part is the graphing portion, that uses matplotlib to plot and animate a graph of ~10000 points, animating them at 60fps to match the frame rate of the video. The graph video is too accurate, as it is downsizing the original data portion, but going through ~10,000 points at 2400 fps will take a really long time to render and is unrealistic, so ive done my best to fix it. I then get the point where the force is greater than 1, meaning the plate is beginning to get pushed. I get the frame for that, and combine it with the video, adding excess blank frames on the graph video until it syncs perfectly with the movement video, doing some math to figure out how many frames of padding to add. I need to talk with data acquisition tomorrow to find a matching video and file to test with more to help me tweak the code, but is a good start for the base code.
The code under the
sync
directory should complete the task of taking a force plate video and a raw csv file syncing them together. The motion video uses a bounding box (can be edited) and detects pixel differences (threshold can be modified). This has been explained in previous pull requests though. The new part is the graphing portion, that uses matplotlib to plot and animate a graph of ~10000 points, animating them at 60fps to match the frame rate of the video. The graph video is too accurate, as it is downsizing the original data portion, but going through ~10,000 points at 2400 fps will take a really long time to render and is unrealistic, so ive done my best to fix it. I then get the point where the force is greater than 1, meaning the plate is beginning to get pushed. I get the frame for that, and combine it with the video, adding excess blank frames on the graph video until it syncs perfectly with the movement video, doing some math to figure out how many frames of padding to add. I need to talk with data acquisition tomorrow to find a matching video and file to test with more to help me tweak the code, but is a good start for the base code.