An edge is a set of connected pixels lying on the boundary between two regions that differ in pixel intensity. Accordingly, several gradient-based edge detectors have been developed that are based on measuring local changes in gray-value; a pixel is declared to be an edge pixel if the change is significant. However, the minimum value of intensity change that may be considered to be significant remains a question. Therefore, it makes sense to calculate the edge strength at every pixel on the basis of the intensity gradient at that pixel point. This edge strength gives a measure of the potentiality of a pixel to be an edge pixel. In this paper, we propose to use a set of fuzzy rules to estimate the edge strength. This is followed by selecting a threshold — only pixels having edge strength above the threshold are considered to be edge pixels. This threshold is selected such that the overall probability of error in identifying edge pixels, i.e. the sum of the probability of misdetection and the probability of false alarm, is minimum, minimization is achieved via particle swarm optimization (PSO) algorithm. Experimental results demonstrate the effectiveness of our proposed edge detection method over some other standard gradient-based methods.