The goal of edge detection is to determine whether a point in an image is an edge point. This is done by applying first and second derivative operators to detect the greatest change in image intensity. In this paper, we propose a new method where the threshold, represented by the average 𝑎̅, is calculated within a neighborhood of I(x1,x2). This approach not only reduces processing time but also ensures that no pixels are missed. Pixels below the threshold are replaced after enhancement. We extend this work by applying the Canny edge detector (CED) to detect boundaries in MRI images of abnormal brains affected by intraventricular hemorrhage (IVH). Two thresholds are used: the hysteresis threshold in the CED and our proposed statistical threshold, which works alongside traditional edge operators like Sobel, Prewitt, and Laplacian.