Author Topic: Focus Stacking and 3D Effect  (Read 16771 times)

alm865

  • New to the forum
  • *
  • Posts: 6
Focus Stacking and 3D Effect
« on: May 16, 2014, 05:24:24 AM »
Hi All,

After using Picolay (http://www.picolay.de/) and CombineZP for focus stacking and creating a 3D effect from a stack I couldn't help but think that it could be done better (especially the 3D effect part since Hugin already does a fantastic job of the focus stacking part :) ).

So I went and created this MATLAB script to create a 3D effect from a focus stack:

https://www.dropbox.com/s/hcf4b3n98yvxeo5/AM%20Focus%20Stacking.7z

There are sample images, if you have MATLAB simply open the script up and run it!

There is plenty of room for improvement but the initial results are promising. There is potential to create a 3D model from the stack too and the ability for the user to modify and fix the stack in an external paint program (i.e. write 'StackClip' to a .bmp, modify and read it back into the script)

A sample animation from my script is here:



I'm sure people can see many flaws in my script but for a first pass it works rather well.

Over the next few months I'll write a C++ program with a GUI to perform the same operations and make it more user friendly. I'll share the source code once I'm done!

alm865

  • New to the forum
  • *
  • Posts: 6
Re: Focus Stacking and 3D Effect
« Reply #1 on: May 16, 2014, 05:29:22 AM »
If you don't have easy access to MATLAB you can always do a google search:

https://www.google.com.au/search?q=%3FIndex.of%3F+(ISO)+Matlab

I don't think Mathworks lets you download a trial version of Matlab these days unfortunately...

ItsMeLenny

  • Hero Member
  • *****
  • Posts: 926
  • 550D
Re: Focus Stacking and 3D Effect
« Reply #2 on: June 20, 2014, 11:48:15 AM »
This is very impressive and nicely done.
I think I read this post previously but didn't quite understand what was done,
now I think I have a better understanding of the situation.
How many photos did you take for this particular focus stack?
And was there any progress on a C++ program?

Betelgeuza

  • Freshman
  • **
  • Posts: 66
Re: Focus Stacking and 3D Effect
« Reply #3 on: September 19, 2014, 09:47:57 PM »
im wonder how it will looks in real 3d :)

i mean taking series of photos all around object and later use ``some`` software to turn it to avi

rpt

  • Freshman
  • **
  • Posts: 83
  • 5DIII, 24-105, 40 2.8, 100-400, 600EX
Re: Focus Stacking and 3D Effect
« Reply #4 on: October 14, 2014, 02:06:25 PM »
Two below are focus stacked using CombineZP. I took the pictures with the Focus Stacking feature of Magic Lantern. It was so simple. Select the point of focus; enter the number of images to be taken in front of that point; enter the number of images to be taken behind; Enter the focus steps (I left it at 1) and GO!

Here they are:


New-Out99996-Do Weighted Average[1,0,1]-2 by Rustom, on Flickr


New-Out99996-Do Weighted Average[1,0,1] by Rustom, on Flickr