Universal edge detection, e.g. for copy counting

Universal edge detection, e.g. for copy counting