Moving sensor for focus stacking in direct projection

Here you can discuss everything related to taking light micrographs and videos.
Post Reply
Message
Author
newtonsapple
Posts: 12
Joined: Mon Jan 25, 2021 7:04 pm

Moving sensor for focus stacking in direct projection

#1 Post by newtonsapple » Mon Mar 08, 2021 4:15 am

I am wondering if moving the sensor position in a direct projection arrangement would provide the required focus shifts needed for focus stacking?

For context, I have an Nikon SMZ800 and a camera port I am looking to set up for direct projection onto an APS-C mirrorless sensor. If I include a short helicoid adapter in the mount, could this be used to shift the focus point for the purpose of focus stacking?

The advantage of this seems to be that there would be no shift in perspective that occurs when using the focus rack on a stereo microscope.

Hobbyst46
Posts: 4277
Joined: Mon Aug 21, 2017 9:02 pm

Re: Moving sensor for focus stacking in direct projection

#2 Post by Hobbyst46 » Mon Mar 08, 2021 12:37 pm

How can one achieve focus by moving the sensor alone ? I assume direct projection means (within this context) no eyepiece. Then, focus is determined by the objective. Image location is fixed in space As long as the objective-object distance is fixed. Sensor shifts will only blur the image.

newtonsapple
Posts: 12
Joined: Mon Jan 25, 2021 7:04 pm

Re: Moving sensor for focus stacking in direct projection

#3 Post by newtonsapple » Mon Mar 08, 2021 1:57 pm

So I am at that point in learning about microscope imaging where I am able to ask what might be a stupid question.

So in direct projection, my understanding is that there is a physical position where the sensor is parfocal with the eyepieces. Does shifting the sensor position up and down from that position create front or back focus or some other aberration? My thought is that you would focus as normal with the sensor in the parfocal position, then move the sensor up and down from that point to sweep through the depth of the subject.

This focusing approach is used by autofocus adapters for mirrorless cameras that allow autofocusing of manual lenses (https://techartpro.com/?product=techart ... us-adapter). Rough focus is set on the lens and final focus is achieved by the adapter changing the space between the lens and sensor. The limited amount of travel limits the adapter to working only with short focal lengths. I have no idea if this approach applies to direct projection setup on a microscope.

Hobbyst46
Posts: 4277
Joined: Mon Aug 21, 2017 9:02 pm

Re: Moving sensor for focus stacking in direct projection

#4 Post by Hobbyst46 » Mon Mar 08, 2021 2:56 pm

Sorry, AFAIK auto focus works by moving the camera lens relative to the imaged object. This is true for the adapter shown in your posted link as well.
The camera lens is the analogue of the microscope objective in this respect. So, again, leaving the objective static and changing just the height of the sensor above the objective can only blur the image - please correct me if I am wrong.

Again, all this assuming that your "direct projection" is microscope objective->sensor; no eyepiece, no camera lens. In this case, the sensor can be made parfocal with the viewing eyepieces, if the phototube length and mechanical structure allows it.
There is another "direct projection": microscope objective->microscope eyepiece ->sensor; no camera lens. In this case, the eyepiece holds parfocality with the viewing eyepieces.

newtonsapple
Posts: 12
Joined: Mon Jan 25, 2021 7:04 pm

Re: Moving sensor for focus stacking in direct projection

#5 Post by newtonsapple » Mon Mar 08, 2021 3:27 pm

Hobbyst46 wrote:
Mon Mar 08, 2021 2:56 pm
Sorry, AFAIK auto focus works by moving the camera lens relative to the imaged object. This is true for the adapter shown in your posted link as well.
The camera lens is the analogue of the microscope objective in this respect. So, again, leaving the objective static and changing just the height of the sensor above the objective can only blur the image - please correct me if I am wrong.
Consider that a camera lens can focus with only a few mm of motion, I believe the focusing is occurring due to a change in the sensor to lens position.

Maybe consider looking through eyepieces on a correctly setup parfocal stereo scope, you achieve focus on your 3d subject. Then using the diopter adjustment, you can achieve focus above or below the initial focus point. I am not sure if any other aberrations occur when doing this.
Hobbyst46 wrote:
Mon Mar 08, 2021 2:56 pm
Again, all this assuming that your "direct projection" is microscope objective->sensor; no eyepiece, no camera lens. In this case, the sensor can be made parfocal with the viewing eyepieces, if the phototube length and mechanical structure allows it.
There is another "direct projection": microscope objective->microscope eyepiece ->sensor; no camera lens. In this case, the eyepiece holds parfocality with the viewing eyepieces.
I am mostly thinking about this configuration microscope objective->sensor; no eyepiece, no camera lens. Although I think microscope objective->microscope eyepiece ->sensor; no camera lens would work, but you would move the eyepiece and sensor together.

SWmicro
Posts: 134
Joined: Sat Nov 07, 2020 10:52 pm
Location: England.

Re: Moving sensor for focus stacking in direct projection

#6 Post by SWmicro » Mon Mar 08, 2021 6:20 pm

Hobbyst46 wrote:
Mon Mar 08, 2021 2:56 pm
There is another "direct projection":
To avoid terminological dificulties :
The first, using only an objective lens with a sensor is indeed called Direct Projection.
The second, using an objective lens with an eyepiece (without a camera lens) is usually called Eyepiece Projection.
A third, using objective and eyepiece with a camera lens in front of the sensor is called Afocal.
leaving the objective static and changing just the height of the sensor above the objective can only blur the image
Not entirely, different parts of the object will move into, through, and out of focus as the sensor is moved, see case3 below

When thinking of moving things to focus stack one can think of
(1)the object is stationary and the objective lens is moved
(2)the object is moved and the lens remains fixed.
In both these cases the image of the object moves bringing different parts of it into focus upon the sensor.
All pretty commonly understood so far I think !

Then there is (3) the object and lens remain fixed and the sensor (image plane) can be moved to bring different parts of the object into focus on the sensor.
I think what OP is suggesting is this case3, moving the sensor only.
Does my picture help ?
I am not familiar with mirrorless but if the sensor can be moved within the fixed camera body then this would be case 3.

In 3 although the whole object is not moved by twiddling the microscope, the bit of interest on the object is moving relative to the lens, and does move to different heights above the lens.

I think ;)
F2.jpg
F2.jpg (13.93 KiB) Viewed 4297 times
Last edited by SWmicro on Mon Mar 08, 2021 7:21 pm, edited 1 time in total.

newtonsapple
Posts: 12
Joined: Mon Jan 25, 2021 7:04 pm

Re: Moving sensor for focus stacking in direct projection

#7 Post by newtonsapple » Mon Mar 08, 2021 6:48 pm

SWmicro wrote:
Mon Mar 08, 2021 6:20 pm

In 3 although the whole object is not moved by twiddling the microscope, the bit of interest on the object is moving relative to the lens, and does move to different heights above the lens.

I think ;)
F2.jpg
Yeah, I am trying to wrap my head around what will actually be going on. With a stereo microscope, due to the camera image being from one of the offset paths, I believe there can be stacking issues from the perspective.

edit: The intent of using a mirrorless camera is that the flange to sensor distance is very short giving more flexibility to location of the sensor. A c-mount camera has the same feature, but the sensors are typically on the small size for direct projection.

hans
Posts: 987
Joined: Thu May 28, 2020 11:10 pm
Location: Southern California

Re: Moving sensor for focus stacking in direct projection

#8 Post by hans » Mon Mar 08, 2021 8:14 pm

newtonsapple wrote:
Mon Mar 08, 2021 1:57 pm
So in direct projection, my understanding is that there is a physical position where the sensor is parfocal with the eyepieces. Does shifting the sensor position up and down from that position create front or back focus or some other aberration?
Both, a change in focal plane, and also aberrations, most noticeably spherical aberration. In microscope context this is often referred to as changing tube length, where tube length is approximately the distance from the objective to the intermediate image. There is a graph taken from an old paper floating around that shows tolerance to tube length change (before image degrades noticeable) depending on NA of the objective. Unfortunately I can't remember where I saw it last and can't find it at the moment.

You can estimate roughly the change in object focal plane for give change in sensor distance by treating the objective as a thin lens with focal length equal to the nominal tube length (160 mm for finite objectives) divided by the magnification where the usual relation 1/fi + 1/fo = 1/f holds.

MichaelG.
Posts: 3978
Joined: Mon Apr 10, 2017 8:24 am
Location: North Wales

Re: Moving sensor for focus stacking in direct projection

#9 Post by MichaelG. » Mon Mar 08, 2021 9:28 pm

Good response, Hans ... But for the case-in-point [a stereo microscope] I think the 'tolerance' is likely to be quite wide.

Methinks newtonsapple my be onto a good idea.

MichaelG.
Too many 'projects'

hans
Posts: 987
Joined: Thu May 28, 2020 11:10 pm
Location: Southern California

Re: Moving sensor for focus stacking in direct projection

#10 Post by hans » Mon Mar 08, 2021 9:52 pm

MichaelG. wrote:
Mon Mar 08, 2021 9:28 pm
... But for the case-in-point [a stereo microscope] I think the 'tolerance' is likely to be quite wide.
Ah, yes, I missed that this was a stereo microscope. So forget the thing about calculating assuming 160 mm tube length, that maybe not be correct. If the basic scaling of tolerance to change in tube length/working distance with NA still applies (I see no obvious reason it wouldn't) here is the graph I was thinking of:
Tube-Length-na.gif
Tube-Length-na.gif (12.1 KiB) Viewed 4261 times
It comes from:
B. M. Spinell, R. P. Loveland - OPTICS OF THE OBJECT SPACE IN MICROSCOPY

newtonsapple
Posts: 12
Joined: Mon Jan 25, 2021 7:04 pm

Re: Moving sensor for focus stacking in direct projection

#11 Post by newtonsapple » Mon Mar 08, 2021 10:04 pm

MichaelG. wrote:
Mon Mar 08, 2021 9:28 pm
Good response, Hans ... But for the case-in-point [a stereo microscope] I think the 'tolerance' is likely to be quite wide.

Methinks newtonsapple my be onto a good idea.

MichaelG.
Hopefully someone more knowledgeable than me can come along and explain fully why this is or is not a good idea. I need to figure out how to mount a camera on my scope and then will plan to incorporate a short helicoid assembly in the mount. https://www.amazon.com/Fotasy-Helicord- ... KN22M&th=1

At the very least it will be useful for setting the camera parfocal. There is another member here who said they are planning to post how they mounted their camera. It looks like they mounted a DSLR, which maybe some adjustment available. https://www.microbehunter.com/microscop ... 393#p99393

If this approach does work, I would consider incorporating either an the autofocus adapter I linked to earlier or some other stepper motor based setup. With the autofocus adapter, autofocus would be possible after a rough manual focus and the existing camera control aps could be used for focus stepping.

newtonsapple
Posts: 12
Joined: Mon Jan 25, 2021 7:04 pm

Re: Moving sensor for focus stacking in direct projection

#12 Post by newtonsapple » Mon Mar 08, 2021 10:16 pm

hans wrote:
Mon Mar 08, 2021 9:52 pm
MichaelG. wrote:
Mon Mar 08, 2021 9:28 pm
... But for the case-in-point [a stereo microscope] I think the 'tolerance' is likely to be quite wide.
Ah, yes, I missed that this was a stereo microscope. So forget the thing about calculating assuming 160 mm tube length, that maybe not be correct. If the basic scaling of tolerance to change in tube length/working distance with NA still applies (I see no obvious reason it wouldn't) here is the graph I was thinking of:
Tube-Length-na.gif
It comes from:
B. M. Spinell, R. P. Loveland - OPTICS OF THE OBJECT SPACE IN MICROSCOPY
I am not certain how to read this chart, but the Plan 1x objective on my scope has a NA of .09. According to this chart, I could add a couple meters to the tube length, which seems odd, so I am might be doing something wrong.

MichaelG.
Posts: 3978
Joined: Mon Apr 10, 2017 8:24 am
Location: North Wales

Re: Moving sensor for focus stacking in direct projection

#13 Post by MichaelG. » Mon Mar 08, 2021 10:45 pm

hans wrote:
Mon Mar 08, 2021 9:52 pm
B. M. Spinell, R. P. Loveland - OPTICS OF THE OBJECT SPACE IN MICROSCOPY
An excellent reference document, Hans ... Thanks !!

MichaelG.
Too many 'projects'

hans
Posts: 987
Joined: Thu May 28, 2020 11:10 pm
Location: Southern California

Re: Moving sensor for focus stacking in direct projection

#14 Post by hans » Mon Mar 08, 2021 10:52 pm

newtonsapple wrote:
Mon Mar 08, 2021 10:16 pm
I am not certain how to read this chart, but the Plan 1x objective on my scope has a NA of .09. According to this chart, I could add a couple meters to the tube length, which seems odd, so I am might be doing something wrong.
I read it the same way, but not sure how much sense that graph makes extrapolating down to lower NA. In any case, if the SMZ800 optics are similar insensitive in the low-NA limit as Michael suspects then there is nothing theoretically wrong with what you are proposing, I think, but may be difficult to predict how much focus range would be expected without some experimentation. Pretty sure I have seen examples where stacking was done by refocusing the camera lens in an afocal setup, which would be similar overall effect, maybe someone else knows/remembers more about that.

newtonsapple
Posts: 12
Joined: Mon Jan 25, 2021 7:04 pm

Re: Moving sensor for focus stacking in direct projection

#15 Post by newtonsapple » Tue Mar 09, 2021 12:23 am

hans wrote:
Mon Mar 08, 2021 10:52 pm
Pretty sure I have seen examples where stacking was done by refocusing the camera lens in an afocal setup, which would be similar overall effect, maybe someone else knows/remembers more about that.
Any examples of this sort of approach would be great, direct projection or afocal. When it comes to automating this approach, the afocal setup offers some additional options as there are more options for autofocus lenses that might work than focus adapters. I think some of the autofocus c mount cameras may actually move the sensor as well, but I am not certain about that. https://www.youtube.com/watch?v=xs67D1t16wA

hans
Posts: 987
Joined: Thu May 28, 2020 11:10 pm
Location: Southern California

Re: Moving sensor for focus stacking in direct projection

#16 Post by hans » Tue Mar 09, 2021 1:15 am

newtonsapple wrote:
Tue Mar 09, 2021 12:23 am
Any examples of this sort of approach would be great, direct projection or afocal. When it comes to automating this approach, the afocal setup offers some additional options as there are more options for autofocus lenses that might work...
Actually if I understand correctly this just posted today on the photomacrography.net forum is using the internal focus bracketing of the camera/lens without moving the specimen or objective? Not a stereo microscope but similar NA:
https://www.photomacrography.net/forum/ ... 27&t=43205

Post Reply