Focus Stacking and 3D Effect

Started by alm865, May 16, 2014, 05:24:24 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

alm865

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

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

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

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

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