Update obtainframes.m