Image feature based automatic correction of low-frequency spatial intensity variations in MR images