but fast and large depth of field are incompatible.
Compensate for a slow lens by either using a brighter light, a higher contrast scene, or both.
I took a small piece of aluminum foil and poked a hole in it. I bent it over the lens of an optical mouse. The aluminum foil totally covered the LED, and covered the lens except for the tiny pinhole. I aimed a 100 watt light bulb, with reflector, at a checkerboard pattern about a foot away. The modified mouse can track that checkerboard from about 18 inches away.
Note that the resolution is inversely proportional to the distance from the scene. Normally the lens is about a quarter inch from the surface. When it is a factor of 75 times farther away, the resolution is also worse by a factor of 75.
I like the mouse as a mouse, so I won't try to improve the performance of the pinhole. I think the pinhole lens would work much better as a replacement for the original lens, instead of being crumpled on top of the lens. This is an experiment that I'll leave for someone with an extra mouse.
--
Paul Haas, paulh at hamjudo dot com