Resample Op and UI: CPM estimation and image resampling