Stamp Community Family of Web Sites
Thousands of stamps, consistently graded, competitively priced and hundreds of in-depth blog posts to read
Stamp Community Forum
 
Username:
Password:
Save Password
Forgot your Password?

Welcome Guest! Need help? Got a question? Inherit some stamps?
Our stamp forum is completely free! Register Now!

DIY Microscope Camera

 
To participate in the forum you must log in or register.
Author Previous TopicReplies: 13 / Views: 907Next Topic  
Valued Member

United States
51 Posts
Posted 10/28/2021   8:04 pm  Show Profile Bookmark this topic Add poofo to your friends list Get a Link to this Message
I use a stereo microscope quite a bit with my stamps. I also have a large monitor on my stamp table I use for playing Nintendo Switch. So I wanted to add a camera to the microscope and connect it to that fancy monitor.

After doing some research, I discovered these really cool microscope cameras with built in image analysis software. 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.

I documented the parts I used here:

https://richmit.github.io/microscop...l#rpi-camera



-mitch
Send note to Staff

Valued Member
Learn More...
United States
55 Posts
Posted 10/29/2021   08:52 am  Show Profile Bookmark this reply Add Wshuwahere77 to your friends list  Get a Link to this Reply
Wow! That is impressive.

How long did it take you to configure that? Did you write all that code or integrate existing scripts together?

Thanks for sharing!
Send note to Staff  Go to Top of Page
Pillar Of The Community
United States
568 Posts
Posted 10/29/2021   10:21 am  Show Profile Bookmark this reply Add jconey to your friends list  Get a Link to this Reply
Wow, I like it. Very cool. I have a cheap (low cost) digital that I use but it of course connects to the PC. I made a stand from an old desk lamp.

I checked out your parts list and code.

I really like the on screen scale your setup has. Reading the RPI button info I presume the scale integral to the software not the scope. It says the software is tied directly to the scopes settings but If so how is it calibrated for the surface point regardless of focal distance? Also, how do you re-calibrate if needed? Or did I miss it somewhere. I have not really combed through the code yet.

If you don't mind my asking:
- How much did the microscope itself cost?
- Do you also use it for other things or just stamps?
- Is this microscope front lit and back lit?
- Does changing the eyepiece register in the scopes settings and auto adjust the software? Or isn't that necessary?

Here's a screen shot for my setup. The small lines are 1/2 MM and this is a screen shot from one of my 27" monitors. My scale is of course just laying on the stamp, not built in to the software.

Send note to Staff  Go to Top of Page
Valued Member
United States
51 Posts
Posted 10/29/2021   12:17 pm  Show Profile Bookmark this reply Add poofo to your friends list  Get a Link to this Reply

Quote:

Wshuwahere77:

How long did it take you to configure that? Did you write all that code or integrate existing scripts together?


The hardware was easy. I just bolted everything together. No soldering. That bit took perhaps an hour or two.

Setting up the OS, installing ImageJ, coding up the scripts and macros, etc... This took a three evenings till I was happy with it. OTOH, I just pushed up an update yesterday to add a few features -- so really that part is never "done". ;)
Send note to Staff  Go to Top of Page
Valued Member
United States
51 Posts
Posted 10/29/2021   5:16 pm  Show Profile Bookmark this reply Add poofo to your friends list  Get a Link to this Reply

Quote:
jconey: I really like the on screen scale your setup has. Reading the RPI button info I presume the scale integral to the software not the scope. It says the software is tied directly to the scopes settings but If so how is it calibrated for the surface point regardless of focal distance? Also, how do you re-calibrate if needed? Or did I miss it somewhere.


For a given camera, the image scale is determined by three things for a scope like mine:

- The zoom factor -- this scope goes from 1x to 8x
- The Auxiliary lens -- I have two: 1.0x & 0.63x
- The camera objective -- I have two: 0.32x & 0.5x

When the image comes up in ImageJ, I hit the scale button and it pops up a dialog to collect the three values above. When I say the software is tied to the scope, I mean that I have pre-programmed the values I use into the dialog box pull down menus. The software then knows how convert image pixels to real units like mm or inches. You then can simply draw on the image, and it will measure what you draw. Here is a screen shot of measuring the design size of a WF:



Note: The above image is an old one of me measuring a WF from a scan -- the image is not from the microscope.


Quote:
jconey: How much did the microscope itself cost?


The scope is a Leica S8APO. Back when the S8 was being manufactured it was the top of Leica's stereo microscope line, and thus was/is absurdly expensive. I see them going on eBay from $2K to about $8K depending upon condition.

That said, the RPI camera will work on any scope that can accept a c-mount camera -- from a $200 amscope to a $200,000 Leica.


Quote:
jconey: Do you also use it for other things or just stamps?


I have two stereo microscopes (Leica S4E and S8APO). The S4E is mostly dedicated to electronics soldering and other messy work while the S8 is my general go-to for the rest. If I were to guess for the S8, I would say 60% stamps and 40% everything else.

Optically the S8APO scope is uniquely suited to philately. It is unusually bright (more on that later). The optical design is fully APO -- no detectable geometric distortion and the colors are true. With correct lighting I can even do color matching under the scope.

On my to-do list is to calibrate the color of the display so that I can do color matching from the monitor.


Quote:
jconey: Is this microscope front lit and back lit?


Yes. The scope base has full spectrum lighting from top and bottom as well as stage inserts for true dark-field operation. My stamp table is well illuminated by two daylight, LED lamps mounted about 4 feet from the surface. The S8APO is a very bright microscope, and most of the time I don't even turn on the microscope illumination. For example, the image on the screen of the TI circuit board below is a live 30 fps video feed from the microscope illuminated with nothing but my desk lamps.




Quote:
jconey: Does changing the eyepiece register in the scopes settings and auto adjust the software? Or isn't that necessary?


The image is captured through the scope's documentation port directly from the microscope's primary optics -- it is not passed through the eyepieces. Note that the camera is connected to this port via a "camera objective" that plays the role of an eyepiece for the camera. The FOV for the camera is a function of the sensor size and this camera objective. For the RPI HQ sensor a camera objective of 0.32x delivers roughly the same view as a 10x eyepiece.

Send note to Staff  Go to Top of Page
Edited by poofo - 10/30/2021 10:21 am
Pillar Of The Community
United States
568 Posts
Posted 10/29/2021   5:22 pm  Show Profile Bookmark this reply Add jconey to your friends list  Get a Link to this Reply
Nice! Thank you for the time/effort you took in answering my questions.
Send note to Staff  Go to Top of Page
Edited by jconey - 10/29/2021 5:24 pm
Pillar Of The Community
Learn More...
United States
3373 Posts
Posted 10/30/2021   07:20 am  Show Profile Bookmark this reply Add angore to your friends list  Get a Link to this Reply
Interesting setup. Is the image of the Washington Franklin a typical image? It looks soft.
Send note to Staff  Go to Top of Page
Al
Valued Member
United States
51 Posts
Posted 10/30/2021   10:19 am  Show Profile Bookmark this reply Add poofo to your friends list  Get a Link to this Reply

Quote:
angore: Is the image of the Washington Franklin a typical image? It looks soft.


I just wanted to show what it looked like using Fiji/ImageJ to measure something, and reused an old image -- a 2400 DPI scan from my flatbed scanner. It's not from the microscope at all.

Here are a few examples fresh off the scope:

An embossed stamp illuminated from the side:



And a couple of my favorite stamps:





I do get a little bit of fuzziness on the left and right. The focus is too long on one side and short on the other because the camera sensor is ever so slightly tilted on the board. I need to readjust it with the mounting screws, and then glue them down with Loctite to keep it from wiggling.
Send note to Staff  Go to Top of Page
Edited by poofo - 10/30/2021 10:54 am
Valued Member
United States
51 Posts
Posted 11/14/2021   3:10 pm  Show Profile Bookmark this reply Add poofo to your friends list  Get a Link to this Reply
I never realized how bad my scans are... Here is a sample. Microscope on the left at minimum magnification, and Epson V300 scan at 2400 DPI on the right:



Here is a link to the full sized image:

https://www.mitchr.me/SS/bof/scanVS...cope/svm.png

Send note to Staff  Go to Top of Page
New Member
2 Posts
Posted 01/23/2022   11:21 pm  Show Profile Bookmark this reply Add janniesophia to your friends list  Get a Link to this Reply
This https://theoptics.org/best-microsco...or-students/ is really impressive. I must ask which image analysis software is built-in with your cameras ImageJ is probably the best known and longest-lived open-source software for biomedical image analysis. Even though the program is so widely used, ImageJ is an experimental system and NIH does not assume any responsibility for its use by other parties.
Send note to Staff  Go to Top of Page
Valued Member
United States
51 Posts
Posted 01/24/2022   12:01 am  Show Profile Bookmark this reply Add poofo to your friends list  Get a Link to this Reply
I have used ImageJ for many a great many years now -- the Fiji distribution for the last several years. It's focus on image measurement is far more useful for the kinds of things I want to do with stamp images than tools like Photoshop or GIMP. That said, it seems like it is not very popular with stamp collectors.
Send note to Staff  Go to Top of Page
Pillar Of The Community
Learn More...
United States
3373 Posts
Posted 01/24/2022   06:29 am  Show Profile Bookmark this reply Add angore to your friends list  Get a Link to this Reply
I had never heard of ImageJ.+
Send note to Staff  Go to Top of Page
Al
Pillar Of The Community
United States
568 Posts
Posted 01/24/2022   4:37 pm  Show Profile Bookmark this reply Add jconey to your friends list  Get a Link to this Reply
Just downloaded ImageJ from NIH. I'll give it a try.
Send note to Staff  Go to Top of Page
Valued Member
United States
51 Posts
Posted 01/24/2022   4:52 pm  Show Profile Bookmark this reply Add poofo to your friends list  Get a Link to this Reply
I have been using the Fiji version of ImageJ 2 for quite a while. It's just ImageJ 2 with a ton of extra packages installed, and an auto-update system. You can get it here:

https://imagej.net/software/fiji/?Downloads

Lots of people still use ImageJ 1 -- it is super stable. I just like all the extra stuff. ;)
Send note to Staff  Go to Top of Page
  Previous TopicReplies: 13 / Views: 907Next Topic  
 
To participate in the forum you must log in or register.


Go to Top of Page
Disclaimer: While a tremendous amount of effort goes into ensuring the accuracy of the information contained in this site, Stamp Community assumes no liability for errors. Copyright 2005 - 2022 Stamp Community Family - All rights reserved worldwide. Use of any images or content on this website without prior written permission of Stamp Community or the original lender is strictly prohibited.
Privacy Policy / Terms of Use    Advertise Here
Stamp Community Forum © 2007 - 2022 Stamp Community Forums
It took 0.22 seconds to lick this stamp. Powered By: Snitz Forums 2000 Version 3.4.05