Smart instruments require on-line computers, special purpose hardware, or both. A pupillometer is described that relies only on a general purpose microcomputer with a frame grabber to process infrared video camera pictures of the human eye. An essential feature of the instrument is that a top-down model controls the image processing algorithms. The model generates regions of interest, ROIs, positioned from knowledge of anatomy and optics of the eye and information from previously analyzed frames. Within these adaptively controlled ROIs, fast run-time algorithms automatically calculate local thresholds, area measurements, moments for centroid position information, and use pyramiding ito shorten calculation time for large pupils. Outputs are precise measurements of pupil size and eye position in real time, with adequate bandwidth for most purposes.