A new contrast based autofocusing technique for high resolution imaging of rotating targets