User Tools

Site Tools


cs401r_w2016:lab7

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cs401r_w2016:lab7 [2016/02/18 05:20]
admin
cs401r_w2016:lab7 [2021/06/30 23:42] (current)
Line 6: Line 6:
 ====Pre-requisite:​==== ====Pre-requisite:​====
  
-You must install the python ''​skimage''​ package. ​ This can be installed via ''​conda install ​skimage''​.+You must install the python ''​skimage''​ package. ​ This can be installed via ''​conda install ​scikit-image''​.
  
 ---- ----
Line 45: Line 45:
 For the first dataset, you will perform simple target tracking using the random accelerations model. ​ You should use the equations given in Lecture 17.  The data can be found here: For the first dataset, you will perform simple target tracking using the random accelerations model. ​ You should use the equations given in Lecture 17.  The data can be found here:
  
-[[http://hatch.cs.byu.edu/courses/stat_ml/​kfdata.mat|Simple target tracking data]]+[[https://www.dropbox.com/s/11fgx6e5atfv3zy/kfdata.mat?dl=0|Simple target tracking data]]
  
 There are two arrays in this .mat file: ''​data''​ contains the actual (noisy) observations at each timestep, while ''​true_data''​ contains the true x,y coordinates at each timestep. ​ Note that your kalman filter should only use the noisy observations;​ the true x,y coordinates are only given for visualization purposes. There are two arrays in this .mat file: ''​data''​ contains the actual (noisy) observations at each timestep, while ''​true_data''​ contains the true x,y coordinates at each timestep. ​ Note that your kalman filter should only use the noisy observations;​ the true x,y coordinates are only given for visualization purposes.
Line 92: Line 92:
 The dataset is derived from a sequence of images, which can be downloaded here: The dataset is derived from a sequence of images, which can be downloaded here:
  
-[[http://hatch.cs.byu.edu/courses/stat_ml/​ball_data.mat|Ball data]]+[[https://www.dropbox.com/s/1x7jtg162upc3o9/​ball_data.mat?dl=0|Ball data]]
  
 The data is a sequence of images of a ball rolling across a camera'​s field of view.  We'd like to implement a tracker for the ball, but there'​s no way we can cope with images in the framework of the Kalman filter. ​ Instead, we'll do a brief pre-processing step: we'll use template matching to search for the ball in each frame of video, and record the best ''​(x,​y)''​ position of the template match. The data is a sequence of images of a ball rolling across a camera'​s field of view.  We'd like to implement a tracker for the ball, but there'​s no way we can cope with images in the framework of the Kalman filter. ​ Instead, we'll do a brief pre-processing step: we'll use template matching to search for the ball in each frame of video, and record the best ''​(x,​y)''​ position of the template match.
Line 138: Line 138:
  
 # assumes that "​mus"​ contains a list of Gaussian means, and that "​covs"​ is a list of Gaussian covariances # assumes that "​mus"​ contains a list of Gaussian means, and that "​covs"​ is a list of Gaussian covariances
 +# also assumes you are running in Jupyter Notebook
 +
 +from IPython.display import clear_output
 +
  
 for t in range(0, data.shape[0]):​ for t in range(0, data.shape[0]):​
Line 154: Line 158:
     plt.xlim([1,​ 360])     plt.xlim([1,​ 360])
     plt.ylim([243,​1])     plt.ylim([243,​1])
-    ​+    ​clear_output(wait = True) 
     plt.pause(0.01)     plt.pause(0.01)
  
 </​code>​ </​code>​
cs401r_w2016/lab7.1455772836.txt.gz · Last modified: 2021/06/30 23:40 (external edit)