# Focus Stacking



## Silver Hawk (Dec 2, 2003)

The trouble with any macro photography is the lack of depth of field, so having played around with my new Raynox DCR-250 Macro filter, I thought I'd have a go with focus stacking software. The theory is quite straight forward: take a series of photographs and in each one, focus on a different area. Then use software to combine all the in-focus parts of each photo to produce one new photo with everything in focus.

Here's the problem. In the first photo, the battery compartment is in focus, but foreground is not. In the second photo,the reverse is true.



















Helicon Focus is the s/w that's been around the longest but it is not free. Some photo editing s/w like Adobe Photoshop has the functionality build in. But I used the freeware CombineZP. I took a total of 9 photos of the above movement, all focused on different areas, and then used the basic "Do Stack" (they have several different algorythms) option in CombineZP.

Very pleased with the result (below):


----------



## PC-Magician (Apr 29, 2013)

Clever stuff like that very much.

Nice movement as well. :thumbsup:


----------



## Faze (Mar 1, 2013)

That's a good result from free software, I'm going to have to have a go at this :thumbsup:


----------



## Guest (Mar 12, 2016)

brilliant, how long does the process take, i assume its quite processor hungry?


----------



## Silver Hawk (Dec 2, 2003)

Bruce said:


> brilliant, how long does the process take, i assume its quite processor hungry?


 Pretty quick really. My 9 photos were all 6000 x 4000 pixels (9 megs) each and it took about 60 seconds to do the std. stack.

There is an option to let the s/w try all its algorithms (6) and produce a photo from each....that took about 4 minutes.


----------



## Guest (Mar 12, 2016)

Silver Hawk said:


> Pretty quick really. My 9 photos were all 6000 x 4000 pixels (9 megs) each and it took about 60 seconds to do the std. stack.
> 
> There is an option to let the s/w try all its algorithms (6) and produce a photo from each....that took about 4 minutes.


 i must try this too :thumbsup:


----------



## hughlle (Aug 23, 2015)

Do you have to use a fancy camera that can output RAW etc, or could this even be attempted with a POS phone?


----------



## Silver Hawk (Dec 2, 2003)

hughlle said:


> Do you have to use a fancy camera that can output RAW etc, or could this even be attempted with a POS phone?


 RAW is no good for this....so, yes, you can use any camera that produce JPEGs. But each image should be the same ... apart from focus. The s/w does try to align each photo but best if they were all shot from same position on a tripod etc.


----------



## Guest (Mar 12, 2016)

Silver Hawk said:


> RAW is no good for this....so, yes, you can use any camera that produce JPEGs. But each image should be the same ... apart from focus. The s/w does try to align each photo but best if they were all shot from same position on a tripod etc.


 can this be used for say a portrait or landscape then?

i read about a method that used multiple jpegs taken with different settings then stacked, would this work the same?


----------



## Silver Hawk (Dec 2, 2003)

Bruce said:


> can this be used for say a portrait or landscape then?
> 
> i read about a method that used multiple jpegs taken with different settings then stacked, would this work the same?


 You wouldn't normally need focus stacking for portrait or landscape. It really is only used in macro photography. i.e. all those photos of flies with huge compound eyes that are in perfect focus with the rest of their body.

On portrait photography, you usually want minimium depth of focus to throw the background out of focus so as not to distract from the subject. While landscape is usually all in focus. Both of these are achieved with correct lenses and correct aperture settings....not via software.


----------



## Guest (Mar 12, 2016)

Silver Hawk said:


> You wouldn't normally need focus stacking for portrait or landscape. It really is only used in macro photography. i.e. all those photos of flies with huge compound eyes that are in perfect focus with the rest of their body.
> 
> On portrait photography, you usually want minimium depth of focus to throw the background out of focus so as not to distract from the subject. While landscape is usually all in focus. Both of these are achieved with correct lenses and correct aperture settings....not via software.


 the method i was meaning made a sort of surreal image made up of multiple images taken with different settings, i forget the name, but will give it a go :thumbsup:


----------



## wotsch (Jan 5, 2011)

Bruce said:


> the method i was meaning made a sort of surreal image made up of multiple images taken with different settings, i forget the name


 Do you mean HDR? The same shot is taken at different exposures and the results combined to give a photos with a higher dynamic range - i.e. shadows visible at the same time as a bright sky being correctly exposed.

See here: https://en.wikipedia.org/wiki/High-dynamic-range_imaging

Cheers,
-wotsch


----------



## Guest (Mar 12, 2016)

wotsch said:


> Do you mean HDR? The same shot is taken at different exposures and the results combined to give a photos with a higher dynamic range - i.e. shadows visible at the same time as a bright sky being correctly exposed.
> 
> See here: https://en.wikipedia.org/wiki/High-dynamic-range_imaging
> 
> ...


 thats the one, so would it work with CombineZP ? or am i way off the mark?


----------



## Silver Hawk (Dec 2, 2003)

wotsch said:


> Do you mean HDR? The same shot is taken at different exposures and the results combined to give a photos with a higher dynamic range - i.e. shadows visible at the same time as a bright sky being correctly exposed.
> 
> See here: https://en.wikipedia.org/wiki/High-dynamic-range_imaging
> 
> ...


 We should start another topic on HDR. :yes:

I've been reading a lot of the merits of RAW and in-camera HDR. Sony's HDR seems so good, I cannot see a need to shoot in RAW ... and their RAW + JPEG option doesn't support HDR.



Bruce said:


> thats the one, so would it work with CombineZP ? or am i way off the mark?


 Not related Bruce. HDR is all about exposure extremes (bright whites, deep blacks) while CombineZP is about focus.


----------



## Guest (Mar 12, 2016)

Silver Hawk said:


> We should start another topic on HDR. :yes:
> 
> I've been reading a lot of the merits of RAW and in-camera HDR. Sony's HDR seems so good, I cannot see a need to shoot in RAW ... and their RAW + JPEG option doesn't support HDR.
> 
> Not related Bruce. HDR is all about exposure extremes (bright whites, deep blacks) while CombineZP is about focus.


 you can tell i know nothing :biggrin:


----------



## wotsch (Jan 5, 2011)

Silver Hawk said:


> We should start another topic on HDR. :yes:


 Yes, we should.



Silver Hawk said:


> I've been reading a lot of the merits of RAW and in-camera HDR. Sony's HDR seems so good, I cannot see a need to shoot in RAW ... and their RAW + JPEG option doesn't support HDR.


 This part would go in a new thread...

I find that the dynamic range on my RX100m3 is so good in RAW, that the results I get with a bit of post-processing mean I don't need to worry about keeping the camera still for the multiple shots needed for HDR. I set the exposure (often under-exposing) so that the bright parts aren't overexposed and then lighten the shadows on my PC in RAW processing.

The following is an example of that. On the camera display and in the JPG from the camera, the foreground and the trees were pretty much black, but pushing the lowlights up brought out the detail that was "hidden" in the RAW file. Could probably have got this effect with HDR, but I didn't have a tripod to keep the camera still over multiple shots.


Hamilton Island by wotsch2, on Flickr

Cheers,
-wotsch


----------



## William_Wilson (May 21, 2007)

Silver Hawk said:


> The trouble with any macro photography is the lack of depth of field, so having played around with my new Raynox DCR-250 Macro filter, I thought I'd have a go with focus stacking software. The theory is quite straight forward: take a series of photographs and in each one, focus on a different area. Then use software to combine all the in-focus parts of each photo to produce one new photo with everything in focus.
> 
> Here's the problem. In the first photo, the battery compartment is in focus, but foreground is not. In the second photo,the reverse is true.
> 
> ...


 That's great! I looked at the properties of the photos and see that you were using a focal length of 50mm. Was this with the macro attachment fitted, and if that was the case - what distance was the lens from the subject? I tried doing this last year with my full frame camera with a 50mm macro lens and failed. Due to the macro lens' proximity to the subject, the front element's movements rendered the slices unsuitable for alignment.

After seeing this I might try with my 32mm Zeiss lens. 

Later,
William


----------



## Silver Hawk (Dec 2, 2003)

William, yes, this was the 16-50mm lens fitted with the Raynox DCR-250 macro filter. Minimium working distance with this setup is 65mm which is close to what I was using...without the macro filter, it is 200mm.


----------



## Silver Hawk (Dec 2, 2003)

wotsch said:


> Yes, we should.
> 
> This part would go in a new thread...
> 
> ...


 Very nice...looks like I need to explore RAW on the Sony. Although HDR is very good, I'm not keen on the delay in processing the 3 images...

What s/w are you using to process the RAW? Will you be starting an HDR topic? :thumbsup:


----------



## Krispy (Nov 7, 2010)

Silver Hawk said:


> Very nice...looks like I need to explore RAW on the Sony. Although HDR is very good, I'm not keen on the delay in processing the 3 images...
> 
> What s/w are you using to process the RAW? Will you be starting an HDR topic? :thumbsup:


 William recommended Capture One to me and I have to say I'm glad he did. I'm not familiar with other processing software so can't really compare but, at a discounted rate of €50 it was an absolute bargain.

Very powerful and lots of very good tutorials on youtube and their own site. Try the 30 day trial - not sure if it's still discounted for Sony users though?

https://www.phaseone.com/en/Download-Sony.aspx

Edit - seems it is still available for €50 https://www.phaseone.com/en/Online-Store/Sony-upgrades.aspx


----------



## William_Wilson (May 21, 2007)

Silver Hawk said:


> William, yes, this was the 16-50mm lens fitted with the Raynox DCR-250 macro filter. Minimium working distance with this setup is 65mm which is close to what I was using...without the macro filter, it is 200mm.


 Ah, 65mm is great... plenty of distance so you don't get perspective errors, as you do working at 10-20mm.



Krispy said:


> William recommended Capture One to me and I have to say I'm glad he did. I'm not familiar with other processing software so can't really compare but, at a discounted rate of €50 it was an absolute bargain.
> 
> Very powerful and lots of very good tutorials on youtube and their own site. Try the 30 day trial - not sure if it's still discounted for Sony users though?
> 
> ...


 Capture One Pro allows you to basically recreate and fine tune any of the camera's onboard features as well as do various other specialised graphical editing functions. I perhaps know 10% of what Capture One does but it is a wonder with Sony RAW images. :yes:

Later,
William


----------



## wotsch (Jan 5, 2011)

Silver Hawk said:


> What s/w are you using to process the RAW?


 Photoshop Elements. Does the job as I don't need the really advanced stuff.


----------



## William_Wilson (May 21, 2007)

I installed CombineZP on Windows 10 (after creating a restore point), unfortunately it was a random crash monster. Oh well, better luck next time. :wink:

Later,
William


----------



## Silver Hawk (Dec 2, 2003)

William_Wilson said:


> I installed CombineZP on Windows 10 (after creating a restore point), unfortunately it was a random crash monster. Oh well, better luck next time. :wink:
> 
> Later,
> William


 Strange, I'm running it on Windows 10 with no problems.


----------



## vinn (Jun 14, 2015)

wow, very good photo research. this depth of field problem is nothing new. adding a computer to process photos is. I have found that emailing photos works better with 10 mega pixel than 20. a 20 M.P. pix can be "blown up" ,but takes longer to load up (on a slower computer). keep up the good work. vinn


----------



## William_Wilson (May 21, 2007)

Silver Hawk said:


> Strange, I'm running it on Windows 10 with no problems.


 I don't know what the reason is, I'm using an i7, 32gb, and SSDs. Sometimes it worked and other times I received a "This program has stopped working etc." message.

Later,
William


----------



## dobra (Aug 20, 2009)

Here is a shot of a box of AAA batteries (from Toolstation) to demonstrate the limited depth of field. How many shots should I take in order to put the lot in focus?

Thanks

Mike


----------



## Silver Hawk (Dec 2, 2003)

dobra said:


> Here is a shot of a box of AAA batteries (from Toolstation) to demonstrate the limited depth of field. How many shots should I take in order to put the lot in focus?
> 
> Thanks
> 
> Mike


 7 or 8 should do it.


----------



## tixntox (Jul 17, 2009)

dobra said:


> Here is a shot of a box of AAA batteries (from Toolstation) to demonstrate the limited depth of field. How many shots should I take in order to put the lot in focus?
> 
> Thanks
> 
> Mike


 A battery of batteries!

Mike


----------



## dobra (Aug 20, 2009)

Nearly right Mike - a battery of cells?

Mike


----------

