Version 1. which is to be optimalized and only realise image registering.