I do not know of a sensor like that.
If I had a digital camera looking at the pictire on the wall, or some part of the picture, then by looking at the data, some idea of focuse could be found. If the projector focus control was motor driven and could be driven through focus, back and forth, the best focus spot could be found.
Focus is when the blacks are most black, whites are brightest, and the edges are steepest. To say that another way, move away from gray.