Helpful Posts Helpful Posts:  0
Results 1 to 15 of 15

Thread: Focus stacking question

  1. #1

    Join Date
    Mar 2009
    Location
    West Yorkshire
    Posts
    156

    Focus stacking question

    Been having a play at this with quite mixed results as the FOV changes with different focus settings on the lens. Anybody care to explain to me why this happens please?

    I've read some good stuff on here about adjusting the various image sizes to fit each other but I was wondering if there is a way to adjust the camera lens to a different focal length so that the images are registered. I'm using a zoom lens BTW, the 18-55 f/3.5/5.6 Mk1 Nikon for this. Here's my effort so far, but the eagle eyed amongst you will be able to see the join. If you look at the big version you'll all see what I mean!

    Focus stacking question

    Thanks in advance and as always with me C&C welcome

  2. #2
    Moderator Dave Humphries's Avatar
    Join Date
    May 2008
    Location
    Windsor, Berks, UK
    Posts
    16,748
    Real Name
    Dave Humphries :)

    Re: Focus stacking question

    Hi Jonathan,

    I thought this was a good effort; at a limited size, it's quite convincing.

    As for why FoV changes with focus, I know it happens.
    I had a look in the CiC tutorials but couldn't see anything that tackles this question, so I tried a google on your question and all I could find was something I couldn't understand.

    I think we'll have to set McQ on it, his time permitting.

    Cheers,

  3. #3

    Join Date
    Dec 2008
    Location
    New Zealand
    Posts
    17,660
    Real Name
    Have a guess :)

    Re: Focus stacking question

    I get the same thing happening with my L-series lenses; I just put it down to an (unfortunate) side-effect of glass elements moving inside the unit.

    Perhaps an alternative technige is to simply use a narrow aperture and shoot it from as far away as possible, with a long lens (even if you have to crop it a bit).

  4. #4

    Join Date
    Mar 2009
    Location
    West Yorkshire
    Posts
    156

    Re: Focus stacking question

    I think I'm getting the idea about the theory, after pondering a bit. My guess is that as the lens has to be moved away from the sensor to accomodate the focus of close-in things, the image scale goes up as a result. This means tha (obviously) the lens to sensor distance if the same as the focal length of the lens when focused at infinity, but the lens moves away from the sensor as the focus point gets closer.
    That means that the image scale varies with sensor to lens distance, so maybe I can make a table up and adjust the lens focal length at several points.

    Does this make any sense to anybody else????

  5. #5
    Moderator Dave Humphries's Avatar
    Join Date
    May 2008
    Location
    Windsor, Berks, UK
    Posts
    16,748
    Real Name
    Dave Humphries :)

    Re: Focus stacking question

    Possibly, there was a math formula on the link I posted, but I've no idea if it's correct.

    For the shot we're considering, it's only going to be small variations.

  6. #6
    milleniummuppet's Avatar
    Join Date
    Dec 2008
    Location
    Island Bay, Wellington, New Zealand
    Posts
    179
    Real Name
    Matt Fannin

    Re: Focus stacking question

    Firstly congratulations on an awesome image ( join problem aside ).
    Unfortunately I can not see an easy way out of this situation .
    You could take some steps back, and tighten the crop - but your just going to loose some of that dramatic effect that your obviously looking for.
    This problem is a difficult one ( I for one am not great on the subject ), but the best thing here ( in my opinion ) could be some photoshop magic .
    What do you have in the way of pp programs?

  7. #7

    Join Date
    Mar 2009
    Location
    West Yorkshire
    Posts
    156

    Re: Focus stacking question

    @ Colin - I couldn't get the same warp effect that I was looking for with a telephoto lens as the thing looked to "straight". It also didn't get round the shallow depth of field thing, though the movement was less pronounced between images.

    @ Milleniummuppet - thanks for the comment. I have Photoshop CS2 so I can play somewhat. Just wondering what you had in mind here though, as you've started me thinking about the magic bit. A straight on shot centered on the machine heads (or whatever the real name is) then warped in PS might work, but I'll loose half the frame in the crop. Stitching a "flat" image and then warping could work here, I'll have a play.

    Thanks for the feedback guys, I'm learning stuff now.

  8. #8

    Re: Focus stacking question

    Quote Originally Posted by Dave Humphries View Post
    all I could find was something I couldn't understand.

    I think we'll have to set McQ on it, his time permitting.
    Dave/Jonathan,

    Not sure that the web link actually helps here. The page describes how a 3d graphics engine works. Renderers like this are ideal, so are more like pinhole cameras with an infinitely small aperture, giving infinite depth of field. Although the equations use focus as a term, that is literally just the distance from the eye point to the plane where the image is assumed to be created.

    Jonathan's problem is really just the small amount of movement in the lenses as he focuses, exactly as Colin describes.

    Bests,
    Graham

  9. #9
    Moderator Dave Humphries's Avatar
    Join Date
    May 2008
    Location
    Windsor, Berks, UK
    Posts
    16,748
    Real Name
    Dave Humphries :)

    Re: Focus stacking question

    The page describes how a 3d graphics engine works.
    Ah, That might explain (partly) why I couldn't make too much sense of it

  10. #10
    milleniummuppet's Avatar
    Join Date
    Dec 2008
    Location
    Island Bay, Wellington, New Zealand
    Posts
    179
    Real Name
    Matt Fannin

    Re: Focus stacking question

    Hi Johnathan,
    Yes I really meant working with the images that you already have.
    e.g. using it to blend the images better - aligning the strings better etc, and removing some of the blur effect.
    I usually use a tablet though, which makes possibility's far greater.
    CS2 will do absolutely everything you'd need, the clone tool is usually the greatest power in situations like this - meaning you can invent new data from similar areas around it.
    I don't know how much you know about this kind of thing, but for example, the blur around the 'string tensioners' (?) can be minimized by taking samples from all around the object and carefully 'painting' the blur away ( this is where the tablet comes in ).
    This in combination with the obvious selection tools and pen tools can work for almost any application - given enough patience!
    I do recommend working on duplicate layers though, in case of irreversible errors ( when history space runs out ).

    See what you think,

  11. #11

    Join Date
    Dec 2008
    Location
    New Zealand
    Posts
    17,660
    Real Name
    Have a guess :)

    Re: Focus stacking question

    For what it's worth, I suggested to Canon that they incluse a "Focus Bracketing" option on high-end DSLRs, but perhaps this slight FoV change might be the final death nail in it's coffin.

    Although - having just sait that - off memory, software like Helicon Focus does have an option to try to alighn the images.

  12. #12

    Join Date
    Aug 2008
    Location
    Tokyo
    Posts
    22

    Re: Focus stacking question

    Quote Originally Posted by JonathanC View Post
    I think I'm getting the idea about the theory, after pondering a bit. My guess is that as the lens has to be moved away from the sensor to accomodate the focus of close-in things, the image scale goes up as a result. This means tha (obviously) the lens to sensor distance if the same as the focal length of the lens when focused at infinity, but the lens moves away from the sensor as the focus point gets closer.
    That means that the image scale varies with sensor to lens distance, so maybe I can make a table up and adjust the lens focal length at several points.

    Does this make any sense to anybody else????
    I think you have the right idea. For a reference, check out wikipedia article on focal length and go into the section "In Photography". The equation is (1/S1) + (1/S2) = (1/f). It's not explained all that well, so check out the Wikipedia article on Circle of Confusion for background.

    This has me thinking that you should be able to use Panotools (using Hugin or other front-end GUI) to adjust the photos to match up. Select the control points in the overlapping areas of sharp focus, and only adjust for the image parameter "view". When you run the stitcher engine, select the output to be the individual remapped images. You can then use these as the input to your stacking program.

    Just a thought, anyway. If you do try, I would like to know how it works out.

    Mike

  13. #13
    New Member jwight's Avatar
    Join Date
    May 2009
    Location
    Kettering, OH USA
    Posts
    5

    Re: Focus stacking question

    Quote Originally Posted by Colin Southern View Post
    For what it's worth, I suggested to Canon that they incluse a "Focus Bracketing" option on high-end DSLRs, but perhaps this slight FoV change might be the final death nail in it's coffin.

    Although - having just sait that - off memory, software like Helicon Focus does have an option to try to alighn the images.
    Just going to take a stab at this FWIW. Canon does have the depth of field setting on most of their DSLRs but it's obviously limited by the capabilities of the lens in use. In the photo above it might be possible to take a page from the large format book and use a tilt shift (or perspective control) lens to get the entire instrument in focus. Failing that, not sure it can be easily done digitally.

    John

  14. #14

    Join Date
    Mar 2009
    Location
    West Yorkshire
    Posts
    156

    Re: Focus stacking question

    Well John, I suppose I could sell the second car and buy a tilt/shift lens, but my favourite chick would be walking to work.

    If this link works, you'll see how it came out, and now that I understand what's happening I can do this again more sucessfully.


    Focus stacking question

    Many thanks to everybody who contributed, that makes this a good place to learn things.

    Quick edit to this:-
    I've tried resizing the images (equally in both directions) and get a good fit as seen by using "difference" blend mode in PS. Now all I need to do is figure out the cleanest/best resizing method to do this for real.
    Last edited by Colin Southern; 6th May 2009 at 07:29 PM. Reason: Addition

  15. #15

    Join Date
    Apr 2009
    Location
    Central Texas, USA
    Posts
    50

    Re: Focus stacking question

    Johnathan, looks like a very good last effort. An article in Popular Photography magazine ( found here: http://www.popphoto.com/Reviews/Acce...p-CS4-Hands-On ) has the following in its review of Photoshop CS4: "The depth-of-field extender is part of the improved panorama stitcher, which can composite an image in three-dimensional space. So if you're using a macro or a wide aperture and can't get enough depth of field, shoot multiple images with different points of focus, then blend them into one deeply sharp photo."

    I'm a PS Elements 7 user myself.

    Joe

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •