Step 5: Stacking webcam pictures, introduction

The photos in step 4 showed a fair amount of sensor noise.  There is a trick to fixing this which one can borrow from amateur astronomers who use webcams to image the moon and planets (like this moon photo that I took using a webcam, Avi Stack and my 8" F/4.5 telescope--more photos here).  Instead of taking a single picture, one takes a short movie containing a number of frames.  The ones I did ranged from 30-90 frames (i.e., one to three seconds).  Then one uses stacking software to combine the frames into a better image.  Good stacking software also allows you to use wavelets to adjust sharpness in pretty sophisticated ways.

I used the free Avi Stack for stacking (you can also use the also free Registax), which works on Windows, Mac and Linux.  You can capture the video with your webcam's software, but I found that it's better to use wxAstroCapture, available for Windows and Linux, as my webcam software wanted to produce .mpg files, and then I had to convert them to .avi files with Windows Movie Maker.  

So, install Avi Stack (on Windows, you just unzip it into any directory where you want it) and and any video capture software you need.  You need to make sure your capture software produces videos in a format Avi Stack can understand.  See Section 2.3 of the Avi Stack manual for supported formats.  On Windows, I strongly recommend you follow the instructions in Section 2.3 to install support for additional Windows .avi codecs: go here, and download the krsgravi.zip file by unzipping its contents into the directory where Avi Stack got installed.

Once you have all this installed, capture a small .avi segment of your sample with your webcam.  Don't worry if there is noise jumping around.  Here's an example.

<p>I want to build electronics microscope. For tracking surface mount circuit boards. Is this article good enough or more modifications required. Image processing probably will require. Webcam are good enough for having high resolution images? I would like to try this article with 25MP webcam. Will it work fine?</p><p>Thanks :-)</p>
do u think this could work if one just has a couple of microscope lenses? i have a lens and an eyepiece lying around and no actual microscope<br><br>other than this I can't think of any other uses for the lens
It should, if you find a way to mount the lens and eyepiece securely enough. You'd basically be building your own microscope. Maybe you can take a PVC or aluminum tube and mount the lens at one end and the eyepiece at the other. The objective might say on it how far the focal plane is from the objective (standard numbers range from 170mm to 210mm). If not, you can play around with around 180mm length.<br> <br> Then you need to suspend the tube and lens securely in such a way that you can move them up and down to focus. If I were doing it, I would consider something like my wooden&nbsp;<a href="http://www.instructables.com/id/Simple-wooden-Crayford-style-focuser/">telescope focuser</a>. &nbsp;This works better with an aluminum tube than PVC, since PVC will bend under the pressure. &nbsp;You'd need a fair amount of pressure to hold the weight of the camera in that focuser (I didn't design the focuser for holding a camera). &nbsp;There are other options, like maybe some version of <a href="http://www.instructables.com/id/Airline-portable-8-Dobsonian-telescope/#step7">this</a>. &nbsp;Alternately, you might find some way of keeping the tube fixed and moving the sample up and down.<br> <br> If you use an objective and a lensless camera (webcam or a point-and-shoot with lens removed) in place of the eyepiece, that'll reduce weight a bit.
Good point, though the newer DSLRs have such high resolution that even a small image circle is fine.<br><br>Still, maybe the best thing would be a point-and-shoot with lens removed (actually, hanging off to the side, or else the camera will think it's broken and not work), like some people use for astronomy but without the complications of timed exposures. The image sensor is bigger than on the webcam but small enough to nicely fit the image circle. The webcam's image sensor is so small that it makes for a little too much magnification (I suppose one could put in a focal reducer, though).
There are two problems I've read about with using a lensless SLR on a normal microscope. First is that typically the image sensor is way to big for the image circle that the microscope projects. Second is that it may not be possible to focus because the image sensor is set way back in the camera behind the mirror. <br>Micro 4/3 cameras may work, as they have smaller sensors as well as a shorter flange focus distance (no mirror.) I don't think I've looked into this since the micro 4/3 system was out though.
I like it very cool.<br>The first part involving the camera on the microscope is quite similar to something I have been doing for a few years for wildlife photography; I'll be entering an 'ible about it as soon as I have selected a few pictures to accompany the text.<br>Oddly my better half said she unpacked a really nice microscope in the charity shop she volunteers at today, guess who is going to buy it in the morning? ;-)<br>
I assume you mean that you've been hooking up the camera to the eyepiece of a spotting scope? Yes, I've been finding that what what works for telescopes tends to work for microscopes. I've done it with the last total <a href="http://prussastro.blogspot.com/2010/12/lunar-eclipse.html">eclipse of the moon</a>&nbsp;and <a href="http://prussastro.blogspot.com/2010/11/clavius.html">Clavius</a>&nbsp;and a <a href="http://www.flickr.com/photos/pruss/3399046722/">crescent moon</a>&nbsp;(and Venus and Jupiter, but the results were poorer), though I think most of these are with the camera hand-held.
I just posted the 'ible I mentioned if you are interested take a look here:-<br> <a href="http://www.instructables.com/id/Close-Up-Wildlife-Photography-Without-Hi-Tech-Equi/">http://www.instructables.com/id/Close-Up-Wildlife-Photography-Without-Hi-Tech-Equi/</a><br>
Not exactly..... :-)<br>I will be posting the 'ible soon you will see what I mean then.<br>I do like the idea though, now all I have to do is get hold of a suitable scope.
I wonder if you would get even better results with stacking and a webcam if you had the sample on a slowly movable stage and moved it slowly, the way astronomical images on a non-tracking telescope do.
I must say, this is actually a very useful and informative Instructable. Very well done and lots of description and photos to back it up! There's so many instructables coming out now that are pure BS.
Cool method and great photos!
I am from Argentina. I will try your method. Its awesome, thanks.

About This Instructable


117 favorites


More by arpruss: Photos from phone to Minecraft Star Wars and Star Trek in Minecraft with Raspberry Jam Mod A rainbow of fractals in Minecraft
Add instructable to: