A common problem in optical metrology is the determination of the exact location of an edge (a black/white transition). The use of cameras for this task has been restricted in the past because of their limited number of pixels and the lack of methods for subpixel accuracy edge detection. Analysis of the optical and electronic parts of modern solid-state cameras shows that it is possible to determine the exact location of an edge to subpixel accuracy, independently of the system's modulation transfer function. A novel algorithm for this purpose is presented together with an expression for the precision of the edge location as a function of pixel noise and edge step height. Experimental verification was carried out using a modified CCD camera coupled to an intelligent framestore (smart camera). Under optimum conditions the measured accuracy for the edge position was better than 1/140 of the pixel period, corresponding to less than 120 nm on the sensor surface of the camera. Applications of this novel method in metrology and micrometrology are discussed.