Matlab - open close time images