as a side note for things that use the 'uvc' webcam video driver, there's $20-25 microscopes now that are standard usb webcams. Cheap things with plastic lenses. If you had a need to set up a fixed mounted microscope taking 30fps imagery of things on a production line (perhaps for a non critical quality control test?), you could totally do it with a rpi and one of these.
https://trendowner.com/products/1000x-zoom-usb-microscope-ca...