Experimental

Part 1: Arduino with Distance Sensor

For this experiment you need the same experimental set up as Experiment 1, which can be found here. Set the distance sensor around 1m above the ground, pointing at the ground. Release the ball from rest immediately under the sensor and record the position of the ball until it stops moving. It is important to make sure you release the ball exactly from rest so that the ball does not gain any horizontal movement throughout its bouncing. 

Repeat this part of the experiment three times, resulting in three independent and separate data sets.

Deleverable #2: Submit the Arduino code needed to run the distance sensor and collect the data.

Part 2: Video Analysis with Logger Pro (Manual Object Detection)

For this part and the next part you will need a phone, tablet, or camera capable of recording a short video. Using a stand if you have one or propping the device up, record a video of your ball bouncing after being released from rest ~1.0 meters above the ground. Make sure the video captures the entire path of the ball (including the release and the floor) and that you record the ball until it has stopped bouncing. 

For both this part and the next one it does not matter if the background of the video is solid, however the analysis for the next part will be easier if the only thing moving in the video is the ball. A higher frame rate will make the analysis more accurate, but you can reduce the video quality to reduce the size of the video (either while taking the video or as a post-processing step).

For this step you will need to transfer your video to one of the Mac lab computers in Bracy 141/142 (which lab is avalible will depend on the day, do not interrupt an ongoing class). Download the video to the computer and import the video into Logger Pro. This step will be similar to experiments occassionally performed in PHY 101. Use Logger Pro's video analysis tools to plot the y position of the ball as a function of time. You do not have to peform the object detection on every frame of the video, but your data points should be close enough together to get a good data set. Make sure you are clicking on the same part of the ball each time. You may find it useful to mark a spot on the video with a Sharpie before taking the video.

Once you have finished the video analysis, export the times and y-positions to either your own computer or your Google Drive account for the data analysis portion of the experiment.

Deliverable #3: Submit a screenshot of your analysis in Logger Pro

Part 3: Automated Object Detection

This portion of the experiment will use the same video as Part 2, but instead of using manual object detection (accomplished in Logger Pro by clicking on the ball during each frame of the video), we will be using two methods of automatic object detection. 

Open the notebook located here, click "Open in Colab". Once the notebook is open in Colab, download it as a ".ipynb" file and move the file to the same folder as your video. You may have to install some libraries and edit the code to get it working (talk to me if you have any trouble). This method will work best if you have a very high frame rate video where nothing movies except for the ball. 

Once you think you know how the code works, check with me.

Deliverable #4: Explain how the first automated video analysis code detects the position of the ball. 

* This part of the experiment is based of a module of the DSECOP project written by Karan Shah. The original project can be found here. If you are unfamilar with how computers handle image and video data, it may benefit you to go through the first notebook of this module for your own education.