this is before adding region_check, which determines ifthe dot of interest is located within the middle of the image, to slopes source code.