Extracting edges from images is a widely used first step in processing. A different view on the well known enhancement/thresholding approach for edge detection is presented in this paper. The structure of a two layer feed forward neural network is comparable to the structure of enhancement/thresholding edge detectors. It is possible to calculate an optimal edge detector with a certain predefined network structure and training set, by training the neural network with examples of edge and nonedge patterns. The back propagation learning rule is used for optimization of the network. The choice of the network structure and the training set are very important, because they determine the final behavior of the network. The paper describes which network structures were selected and how the training sets were generated. Some of the experiments are described, and observations of the convolution kernels for edge enhancement that are formed during training. Finally the results are evaluated and compared with the results of edge detectors based on the Sobel, Marr-Hildreth and Canny edge enhancement algorithms. It appears that the neural network edge detector can be made very robust against noise and blur and in most tests outperforms the others.