difference detection using edge detection without threshold