An algorithm for the localization of rotated and scaled objects