Raspberry Pi Microscope Camera - Page 1
Forum section: electronics / projects

author: richmit
author_rank: Contributor
timestamp: October 23, 2021, 09:48:22 pm
content: Not much to this "project" really, but I have been very happy with it so far.Microscope cameras with built in image analysis software are pretty cool. Simply connect the camera to your monitor & mouse, and you can do simple image processing and measurement without a computer. These solutions are expensive for what you get, and the analysis software is pretty limited. So I thought, why not build my own? It's just a tiny computer and a camera in a compact case after all. If I used a Raspberry Pi, then I could actually run my favorite image analysis software (Fiji/ImageJ) right on the camera.Most the work was on the software end. Getting the Pi configured, a couple scripts, and writing an ImageJ extension to capture & process images from the camera. All the code is on github:https://richmit.github.io/microscope/leicaS8apo.html#rpi-camera

author: jfiresto
author_rank: Frequent Contributor
timestamp: October 24, 2021, 07:42:27 am
content: Good job. I like the massive "lens" on that camera.I used to do a lot of awk/sed/sh programming, but I would have used Python – especially on a RPi!

author: nuh
author_rank: Newbie
timestamp: October 24, 2021, 07:47:58 pm
content: It looks very good. Congratulations.

author: JBeale
author_rank: Frequent Contributor
timestamp: October 27, 2021, 12:52:10 am
content: Looks nice! I must say when I saw "Raspberry Pi" (among the least-expensive computers), I did not expect to see it being used on a Leica microscope!

author: richmit
author_rank: Contributor
timestamp: October 28, 2021, 11:45:02 pm
content: Someone ask me via PM if this microscope is a good choice for soldering. I figured others might have the same question, so I'm posting my answer here.The S8APO is a fantastic microscope; however, it is designed for tasks quite different from soldering. In the stock configuration its lowest magnification is too high (10x), its FOV (24mm) is to narrow, and its working distance (75mm) is too short. While Leica provides auxiliary lenses that can transform this scope into one suitable for soldering, I can't recommend this option because the lenses that provide a suitable working distance also significantly degrade the scope's optical performance. It seems wrong to pay for an APO scope, and then render it non-APO with an auxiliary lens!

author: richmit
author_rank: Contributor
timestamp: October 28, 2021, 11:53:31 pm
content: Quote from: JBeale on October 27, 2021, 12:52:10 amThat irony is not lost on me -- my wife even joked about it when I was building it!The very first question I had after the idea occurred to me was how well the RPI would work for image processing applications -- I use a Java application called Fiji/ImageJ. It turns out it works OK. Operations lag a bit compared to my laptop, but it is pretty usable. At this point, if I were to replace any component of the setup it would be the PI HQ camera. The IMX477 is a good sensor for what it is, but something like an IMX183 would give me a better FOV.

author: jfiresto
author_rank: Frequent Contributor
timestamp: October 29, 2021, 06:03:43 am
content: Quote from: richmit on October 28, 2021, 11:45:02 pmI can sympathize. You have similar issues with the auxiliary lenses Leica/Wild has you use with some of their M series microscopes – that place simple achromats in front of APO and semi-plan objectives.My wild guess is that the APO version of the S8 does not sell in great enough numbers to justify its own line of lenses. Although APO versions would be an improvement, the microscope would still be viewing through their less well corrected sides and give the aberration issues you get in a common main objective microscope.

author: richmit
author_rank: Contributor
timestamp: October 29, 2021, 03:32:04 pm
content: Quote from: jfiresto on October 29, 2021, 06:03:43 amI should have mentioned this in my post. Leica did make 3 APO auxiliary lenses for the s8 (0.63x, 1.6x, & 2.0x), but I think you are correct in that they didn't sell many of them as they never show up on ebay. The working distance on the 0.63x is 101mm -- too short, IMO, for soldering. For longer working distances you have to resort to non-APO lenses. They actually made a 0.32x non-APO specifically for the S8 which I have never tried. The lenses made for the other scopes in the S lineup (S4 & S6) willmostlywork on the S8 -- you get a lot of color fringing & the FOV is smaller than spec. They made a couple of variable working distance lenses as well as 0.32x & 0.5x. Unlike the S8 lenses, the ones for the S4 & S6 are pretty easy to find on ebay.For soldering I use a Leica S4E with a 0.5x aux.