change edge distortion to do ratio averaging in log space