DETECTION OF IRREGULAR POINTS BY REGULARIZATION IN NUMERICAL DIFFERENTIATION AND AN APPLICATION TO EDGE DETECTION