patch image border from localize linkage