A bit of an anecdote, but a lab in our building got some expensive fancy digital microscope. But we noticed that if you took a cheap old school microscope and stuck an iPhone on the lens the resulting images were infinitely more crisp vivid and high-res
The only obstacles are getting consistent colors and calibration as well as making a mount to hold the phone at the right distance from the lens
For example look at the top end Raspberrypi sensor. It's a pathetic 12MP. That's like a ten year old phone or so?
I think the processing is also not to be entirely dismissed. There is frame stacking that extends the dynamic range and there is compression and other complex DSP going on that is necessary (b/c 50MP of raw pixel data is a ton of raw data to pull off the sensor). Realistically you probably can only do some of that in software
However, the camera/sensor isn't the clever bit. The main benefit of OpenFlexure is the automated stage. The range of motion is small and the motion is slow so it really isn't the right microscope for looking at something like a bug leg. But if you want to take loads of high resolution images with a high powered objective and stitch them into a composite image (or take time-lapses automatically autofocusing regularly) we are considerably smaller, more affordable and more customisable than commercial alternatives. With lots of options for scripting.
As an example of what is possible, check out this multi-gigapixel composite image of a cervical smear, and the resolution when you zoom in: https://images.openflexure.org/cap_demo/viewer.html Note, this is collected with an experimental branch of the software (of course open source). We need to do some tidying and bugfixes before it is ready for release.
You could then either have an automated stage, or a hand operated one, or just move your slide by hand under the microscope.
I think the camera can then be a RPi or a phone or anything else
That's the core reason why the Foldscope is so popular. It really does work well.
These standard ones are certainly useful for high magnification, but they don't really work at all for anything opaque. For the average person doing this on a hobby level, looking at random objects slightly beyond macro level is far more interesting than having to painfully prepare slides for things you aren't even sure are actually there or not.
If you’re thinking of something like a metallurgical microscope, those are more involved and expensive, but again, eBay.
The leds could be better and/or brighter but works for looking at stuff and for photography with a 3D printed phone holder on one of the ocular lenses.