Local and global motion by edge discontinuities