Author Topic: Raspberry Pi Microscope Camera  (Read 1727 times)

0 Members and 1 Guest are viewing this topic.

Offline richmitTopic starter

  • Contributor
  • Posts: 43
  • Country: us
    • https://www.mitchr.me/
Raspberry Pi Microscope Camera
« on: October 23, 2021, 09:48:22 pm »
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

 
The following users thanked this post: Andy Watson, artag

Offline jfiresto

  • Frequent Contributor
  • **
  • Posts: 809
  • Country: de
Re: Raspberry Pi Microscope Camera
« Reply #1 on: October 24, 2021, 07:42:27 am »
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!
-John
 

Offline nuh

  • Newbie
  • Posts: 5
  • Country: tr
Re: Raspberry Pi Microscope Camera
« Reply #2 on: October 24, 2021, 07:47:58 pm »
It looks very good. Congratulations.
 

Offline JBeale

  • Frequent Contributor
  • **
  • Posts: 298
Re: Raspberry Pi Microscope Camera
« Reply #3 on: October 27, 2021, 12:52:10 am »
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!
 

Offline richmitTopic starter

  • Contributor
  • Posts: 43
  • Country: us
    • https://www.mitchr.me/
Re: Raspberry Pi Microscope Camera
« Reply #4 on: October 28, 2021, 11:45:02 pm »
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!
 

Offline richmitTopic starter

  • Contributor
  • Posts: 43
  • Country: us
    • https://www.mitchr.me/
Re: Raspberry Pi Microscope Camera
« Reply #5 on: October 28, 2021, 11:53:31 pm »
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!

That 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. 
 

Offline jfiresto

  • Frequent Contributor
  • **
  • Posts: 809
  • Country: de
Re: Raspberry Pi Microscope Camera
« Reply #6 on: October 29, 2021, 06:03:43 am »
... The S8APO is a fantastic microscope....  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!

I 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.
-John
 

Offline richmitTopic starter

  • Contributor
  • Posts: 43
  • Country: us
    • https://www.mitchr.me/
Re: Raspberry Pi Microscope Camera
« Reply #7 on: October 29, 2021, 03:32:04 pm »
... The S8APO is a fantastic microscope....  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!

I 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.

I 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) will mostly work 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. 

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf