I was working on my computer and I lifted my mouse and rotated it. Light from the tube light which was 2-3 meters away from my mouse fell on the mouse sensor, the cursor started moving as if I shook the mouse. It also worked with a torch. My knowledge says that mouse uses the red light from mouse diode for capturing images. So how this work? Or my knowledge is incomplete?

  • 1
    There is a tiny camera in the mouse. You can confuse it as it is not designed to work with such a conditions. The "tubelight" spectrum may very well contain the light the camera is sensitive to. – Eugene Sh. Dec 19 '18 at 14:54
  • Torch = flashlight, right? Or did an open flame make the mouse move? And tube light = fluorescent bulb, like a long 3ft-4ft straight tube, or smaller one? – Xen2050 Dec 28 '18 at 3:59

The mouse camera has a lens that is extremely near-sighted - its focus is mere millimeters: it is looking at small details of the surface you're scanning. How those details move from frame-to-frame give the motion result that is given back to your computer.

When you move the mouse away from the surface, it sees an image so extremely blurred that no details are available for its image processing. It can see light, but it appears the same brightness for every pixel in its tiny frame. No motion is detected.

Any light source can cast a shadow (perhaps from the edge of the mouse's shell bottom where the camera opening resides). As this shadow moves across the frame, your mouse may momentarily see it as a "detail-that-moves" and detect that as motion.
There is really nothing special about the red LED light source in the mouse. It is just a steady source of light to illuminate the surface where the camera is looking. It might change intensity to adapt to surfaces of different reflectivity.

  • Yes the cursor moves when shadow passes over the lens. – pra9 Dec 19 '18 at 16:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.