Abstract: Technology described in this document can be embodied in an optical sensor that includes a rectangular array of at least four photodetector cells of substantially equal size. An opaque mask is affixed over the rectangular array. The opaque mask defines a substantially rectangular aperture for admitting light onto only a portion of the surface of each of the at least four photodetector cells, where the aperture can be centrally positioned over the rectangular array.
Abstract: The spatial location and azimuth of an object are computed from the locations, in a single camera image, of exactly two points on the object and information about an orientation of the object. One or more groups of four or more collinear markers are located in an image, and for each group, first and second outer markers are determined, the distances from each outer marker to the nearest marker in the same group are compared, and the outer marker with a closer nearest marker is identified as the first outer marker. Based on known distances between the outer markers and the marker nearest the first outer marker, an amount of perspective distortion of the group of markers in the image is estimated. Based on the perspective distortion, relative distances from each other point in the group to one of the outer markers are determined. Based on the relative distances, the group is identified.