Posted by Charles Shearer 1 on 21/04/2019 11:53:55:
Hi John,
Oh no! I feel project creep kicking in here. If I understand you correctly I need to physically add said encoder to the linear rail?
Much as I'd like to declare version 1.0 – this intrigues me, I'll have to look into this.
Can they actually have the resolution to detect the microstep sizes I'm using?
Any further detail appreciated.
Thanks
Charles
Charles probably doesn't need to worry about absolute position. He's frame stacking on focus to increase depth of field rather than to improve signal-to-noise as the astronomers do.
Given an object like the head of a wasp, I guess Charles would start by focussing a highly magnifying camera lens on the very front of the insects head. As the camera is only in focus in that particular plane, most of the head will be more-or-less blurred, not a good photo. Moving the camera to focus on the middle part produces another image, again mostly blurred but now with the central plane in sharp focus. Repeating after moving the camera to focus on the rear of the head, and you get 3 mostly blurred photos, each of which is good at one point. Focus stacking creates a new picture by combining the in-focus parts of the three duds, essentially by ignoring anything in each image that's blurred.
Charles hasn't said what his lens is, but no doubt it's far more tightly focussed than would allow a good photo to be captured from only 3 images, hence he proposes to take 2 or 3 hundred. Provided he has a reasonably spaced sequence of images it should work without any need for CNC-level precision or accuracy. I don't think focus stacking needs to know how far the camera is moved, nor is it critical to move the camera exactly the same distance each time. A few missed steps resulting in duplicate images are unlikely to make much difference. The software cares little what the distance between frames actually is; whatever image it gets, blur is suppressed and focus retained.
What might cause trouble is moving the camera backwards and forwards during a run. As moving the camera along the rail alters the apparent size of the subject the focus stacking software likely compensates by resizing frames on the assumption camera movement is linear. Either forwards or backwards, but never a mixture.
The number of steps needed to get a good composite is related to the depth of focus of the lens. Too few steps and the composite will be inferior to the best possible, too many steps wastes time because adjacent photos don't differ enough in focus to matter, and they increase the risk of unwanted artefacts appearing due to computer processing.
Dave