A number of binary images derived from a segmentation process can be represented with a matrix indexing. Morphological operators can be similarly denoted. A formalism is described, where erosions and dilations operate on matrices of images. Matrix erosions and dilations can be extended to binary order statistic filters and hit- and-miss transforms. It will be shown how an image transformed by a sequence of hit-and-miss, order statistic, matrices of structuring elements is isomorphic to a multiple layer translation invariant neural network that has excitatory and inhibitory connections with unit weights. Network connections are equivalent to points in a structuring element. A form of supervised Hebbian learning can be applied to these morphological networks as follows. All weights are initially zero. A number of training cycles are performed by showing many images to the system. The weight of the connection that would provide the largest number of correct responses over the training set is chanced from zero to +1, or, the connection that would lead to the largest number of incorrect responses is changed from zero to -1 to provide an inhibitory connection. The best connection is determined, and then added to the network, and the cycles are repeated to build up enough connections to give low error rates.