runAll('the_video.avi',[],[]); or runAll('the_video.avi',leftMask,rightMask); Make sure to add the Inscribed_Rectangle folder to Paths in Matlab