sampling 5000 frames to calculate covariance matrix