script and mainpage for frame difference segmentation