www.photomacrography.net :: View topic - Can Zerene's scaling simulate focal length?
www.photomacrography.net Forum Index
An online community dedicated to the practices of photomacrography, close-up and macro photography, and photomicrography.
Photomacrography Front Page Amateurmicrography Front Page
Old Forums/Galleries
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Can Zerene's scaling simulate focal length?

 
Post new topic   Reply to topic    www.photomacrography.net Forum Index -> Macro and Micro Technique and Technical Discussions
View previous topic :: View next topic  
Author Message
Beatsy



Joined: 05 Jul 2013
Posts: 1597
Location: Malvern, UK

PostPosted: Sat Feb 29, 2020 5:47 pm    Post subject: Can Zerene's scaling simulate focal length? Reply with quote

It's so I can composite an extreme macro of a foreground feature with a separate wide-angle 1:1 macro shot of the remainder of the subject and scene. The perspective (apparent focal length) of the extreme macro - done with objectives etc _ must match that of the 'normal' macro lens used (likely 15mm most often). I can match the lighting ok, but haven't cracked the focal length thing yet. Hence the speculation around (perhaps) scaling stack frames.
Back to top
View user's profile Send private message
rjlittlefield
Site Admin


Joined: 01 Aug 2006
Posts: 20649
Location: Richland, Washington State, USA

PostPosted: Sat Feb 29, 2020 10:41 pm    Post subject: Reply with quote

Zerene Stacker cannot do this directly, but you may be able to do what you want by "fudging in" appropriate Scale values for the RegistrationParameters.

I suggest the following process:
  1. File > New Project
  2. Load source images from the extreme macro stack.
  3. Stack > Align All Frames
  4. File > Save Other > Save Adjusted Input Images
  5. File > Close Project
  6. File > New Project
  7. Options > Preferences > Preprocessing, put a checkmark on "Add files to existing project as already aligned"
  8. Load the first adjusted input image as source file
  9. Load the remaining adjusted input images as source files
  10. File > Save Project As
  11. Outside Zerene Stacker, edit the newly saved .zsj project file as follows:
    • Search for a line that says <AlignmentControl.AlignmentSettingsChanged value="true" /> . If you find it, then change the value to "false" .
    • Copy the <RegistrationParameters>...</RegistrationParameters> block from the second source image into the first, replacing the <BrightnessCorrectionParameters null="true" />
      line that's already there.
    • In subsequent <RegistrationParameters> blocks, replace the <Scale value="1.0" /> lines with an appropriately increasing or decreasing set of values, for example 1.0001, 1.0002, 1.0003, etc.
    • Save the edited .zsj file.
    • Edited to add: see follow-up post below for an alternate method that avoid tedious line-by-line editing of Scale values in the .zsj project file.
  12. Inside Zerene Stacker again, File > Open Project to load the edited .zsj file.
  13. Stack > Align & Stack All
  14. File > Save Output Image and evaluate your work.
  15. Repeat steps 11-14 as necessary to match the perspective.

This should work OK if the DOF per slice of the extreme macro file is small enough that you do not get unpleasant artifacts as a result of the synthetic viewpoint causing features to not line up properly from one frame to the next.

If you have any problems, please contact me as support@zerenesystems.com so we can work out the bugs before reporting back here in the forum.

--Rik


Last edited by rjlittlefield on Sun Mar 01, 2020 9:52 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Beatsy



Joined: 05 Jul 2013
Posts: 1597
Location: Malvern, UK

PostPosted: Sun Mar 01, 2020 12:15 am    Post subject: Reply with quote

Aha! I knew it! I was eyeballing the .zsj file and suspected the answer lay there. But it all appeared a bit, "no user serviceable parts inside", hence my question.

Thanks for the detailed answer Rik - really helpful and looks exactly what I need. I can't act on this immediately as I'm tweaking parts of the new rig for diatom work right now. Your instant comprehensive solution caught me on the hop, but I will tackle this next with studio-based tests/experiments.

Incidentally, I think my new, improved extreme rig will help some here. For the *very* small stuff of 250 microns or less (which this rig is particularly optimised for), I can get consistent 125nm steps when it's motorised (TBD) but can manage a fairly consistent 200nm manually already. This done by moving subject and local (not ambient diffused) lighting in unison. Larger subjects and deeper stacks are handled by moving the camera, with a minimum 1 micron step. The drive on the precision x,y,z stage stays straight to within 20nm across its full travel range of 2mm (positively agoraphobic dimensions Very Happy ) so I could skip alignment and maybe dodge a few artefacts from that too. Anyway, all to be determined, and now I have a route to follow...

Thanks again for your help.
Cheers

Edit: regarding step size. I have had issues with stereos when using very wide angle lenses. Oversampling (silly small) step sizes helps, but only so far. At the more extreme short FLs - perspective becomes too strong and it falls apart no matter what the step size. I may have to settle for less wide than 15mm - maybe 25mm-35mm or so, but that's workable too...
Back to top
View user's profile Send private message
Lou Jost



Joined: 04 Sep 2015
Posts: 4264
Location: Ecuador

PostPosted: Sun Mar 01, 2020 3:33 am    Post subject: Reply with quote

Can you find wide angle lenses which can be focused without changing the location of the entrance pupil? Those do exist, typically in small cameras like bridge cameras and point-and-shoot cameras. Maybe some reversed internal focusing wide angle lenses hold their exit pupil (now entrance pupil after reversing) fixed when focusing? Then you could focus by ring instead of moving the subject, this freezing perspective.
_________________
Lou Jost
www.ecomingafoundation.wordpress.com
www.loujost.com
Back to top
View user's profile Send private message Visit poster's website
ChrisR
Site Admin


Joined: 14 Mar 2009
Posts: 8520
Location: Near London, UK

PostPosted: Sun Mar 01, 2020 6:01 am    Post subject: Reply with quote

Steve would the result you're after, come from loading all the frames into photoshop and applying a Transform to each? Then stack with size adjustments turned off.
It certainly produces different perspectives.
I played with this a while ago with macros, & scripts in different image processors. Sorry too long ago to remember what worked best.
Things tended to get curvy Neutral
_________________
Chris R
Back to top
View user's profile Send private message
mawyatt



Joined: 22 Aug 2013
Posts: 2452
Location: Clearwater

PostPosted: Sun Mar 01, 2020 6:49 am    Post subject: Reply with quote

Beatsy wrote:

Incidentally, I think my new, improved extreme rig will help some here. For the *very* small stuff of 250 microns or less (which this rig is particularly optimised for), I can get consistent 125nm steps when it's motorised (TBD) but can manage a fairly consistent 200nm manually already. This done by moving subject and local (not ambient diffused) lighting in unison. Larger subjects and deeper stacks are handled by moving the camera, with a minimum 1 micron step. The drive on the precision x,y,z stage stays straight to within 20nm across its full travel range of 2mm (positively agoraphobic dimensions Very Happy ) so I could skip alignment and maybe dodge a few artefacts from that too


Steve,

Impressive optical bench based setup!! What type of precision motorized xyz stage are you using to get reliable 125nm steps with 20nm alignment across 2mm. I consider the THK KR20 1mm pitch rails under Trinamic control good to maybe ~300nm, the piezo stages might be good to ~30nm but only have a ~300um range, so 125nm across 2mm with 20nm alignment is impressive indeed Very Happy

Best,
_________________
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike
Back to top
View user's profile Send private message
Beatsy



Joined: 05 Jul 2013
Posts: 1597
Location: Malvern, UK

PostPosted: Sun Mar 01, 2020 7:27 am    Post subject: Reply with quote

mawyatt wrote:
Beatsy wrote:

Incidentally, I think my new, improved extreme rig will help some here. For the *very* small stuff of 250 microns or less (which this rig is particularly optimised for), I can get consistent 125nm steps when it's motorised (TBD) but can manage a fairly consistent 200nm manually already. This done by moving subject and local (not ambient diffused) lighting in unison. Larger subjects and deeper stacks are handled by moving the camera, with a minimum 1 micron step. The drive on the precision x,y,z stage stays straight to within 20nm across its full travel range of 2mm (positively agoraphobic dimensions Very Happy ) so I could skip alignment and maybe dodge a few artefacts from that too


Steve,

Impressive optical bench based setup!! What type of precision motorized xyz stage are you using to get reliable 125nm steps with 20nm alignment across 2mm. I consider the THK KR20 1mm pitch rails under Trinamic control good to maybe ~300nm, the piezo stages might be good to ~30nm but only have a ~300um range, so 125nm across 2mm with 20nm alignment is impressive indeed Very Happy

Best,

It's not a rail, it's a Prior/Martock x,y,z stage with a 3.5Kg load capacity. It has "coarse" adjustments that travel the full 2mm each direction, then secondary fine adjustments (on the end of the same shaft) that do near 10:1 reduction and only allow 245 microns of travel. Bit like a fine focus. Ticks are marked in microns on the scale and I've got quite adept at manually taking 5 steps for each tick (hence 200nm). A stepper attached to that fine control would easily achieve 8 steps per tick (400 steps/revolution) hence 125nm. There is no detectable backlash either (at the typical mags I use). A very precise piece of machinery. That's the "TBD" part - a new thing for me, but I won't go into detail here - will discuss on another thread later. Normal stacking is handled in the usual way by moving camera and lens on a wemacro rail in front of all that.

Here's the stage before I bolted it all into the rig - black box with knobs on in the bottom left corner. Silver gubbins on top is a probe positioner. That serves other purposes in the rig (as well as specimen holder) but that to be discussed another time.
Back to top
View user's profile Send private message
rjlittlefield
Site Admin


Joined: 01 Aug 2006
Posts: 20649
Location: Richland, Washington State, USA

PostPosted: Sun Mar 01, 2020 9:39 am    Post subject: Reply with quote

Beatsy wrote:
Thanks for the detailed answer Rik - really helpful and looks exactly what I need.

You're very welcome.

With recent versions of Zerene Stacker, there's another trick that can make the process more convenient.

At Options > Preferences > Alignment, there's a checkbox titled "Automatically maintain export file inside project folder".

If you select that option, then when the project is saved, Zerene Stacker will automatically save registration parameters to a tab-separated-values text file named "RegistrationParameters.txt", in the project folder.

In addition, when re-opening the project, it will automatically read that same file, using its current contents to replace whatever is contained in the .zsj project file.

Because the tab-separated-value format can be easily read and written by Excel and other spreadsheet programs, using this feature can make it a lot simpler to alter the Scale values by just altering the RegistrationParameters.txt file instead of editing the .zsj project file.

Note that you still need to make sure that in the .zsj file, <AlignmentControl.AlignmentSettingsChanged value="true" /> gets converted to false, and that the first source image has a valid RegistrationParameters block. If the first image does not have a valid RP block, then re-alignment will be done automatically and all your externally computed Scale values will get ignored.

--Rik
Back to top
View user's profile Send private message Visit poster's website
dhmiller



Joined: 11 Nov 2019
Posts: 183

PostPosted: Sun Mar 01, 2020 12:29 pm    Post subject: Reply with quote

Do you happen to know if the Prior Martok XYZ Stage is still being manufactured? Couldn’t find it on a quick Google search.
Back to top
View user's profile Send private message Visit poster's website
Beatsy



Joined: 05 Jul 2013
Posts: 1597
Location: Malvern, UK

PostPosted: Sun Mar 01, 2020 2:20 pm    Post subject: Reply with quote

Pretty sure this model isn't made any more. When I got it, it had been sat unused in a cupboard for 30 years. The grease on the probe positioner parts had hardened, as had the grease on one of the stage controls, but it all cleaned up nicely and runs good as new now.

I think ElliotScientific might have some existing partnership with Martock - x,y,z positioner stuff there.
Back to top
View user's profile Send private message
dhmiller



Joined: 11 Nov 2019
Posts: 183

PostPosted: Sun Mar 01, 2020 2:39 pm    Post subject: Reply with quote

Thanks much - I did see a few of theirs.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.photomacrography.net Forum Index -> Macro and Micro Technique and Technical Discussions All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group