A method for optical pattern recognition which is based on the human visual system and is suitable for hardware implementation is presented. The system is composed of two stages. The first stage detects local features such as line orientation, linestops, corners, and intersections to create a feature map, which represents the number of these features and hence is invariant to position, size, and slight deformation of an input pattern. The next stage is a multilayered neural network that classifies an input pattern to one of predefined categories using the feature map. We have found a method of detecting these features in analog hardware which would considerably speed up the process of pattern recognition. The decomposition of an input pattern into lines with different orientations is done by an array of two-dimensional orientation sensors. We have built an orientation sensor which is invariant to the position, size, and contrast of an input pattern. The generation of the feature map is currently being done in software which receives its inputs from the line orientation sensor. Linestops, corners and intersections are detected after a series of convolution and thresholding operations for each orientation. The convolution operation can be mapped into hardware using a resistive grid technique. The simulation with an example of character recognition showed that the proper selection of convolution kernels and thresholds can detect local features described above and demonstrated the feasibility of a full hardware implementation of a feature detector.