code to calculate correlation value over many frame data