Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

YES ! it 's called "focus stacking".

the algorithm, quoting from here goes like this:

  1. Align the images. Changing the focus on a lens, even if the camera remains fixed, causes a mild zooming on the images. We need to correct the images so they line up perfectly on top of each other.
  2. Perform a gaussian blur on all images
  3. Compute the laplacian on the blurred image to generate a gradient map
  4. Create a blank output image with the same size as the original input images
  5. For each pixel [x,y] in the output image, copy the pixel [x,y] from the input image which has the largest gradient [x,y]

YES ! it 's called "focus stacking".

the algorithm, quoting straight from here goes like this:

  1. Align the images. Changing the focus on a lens, even if the camera remains fixed, causes a mild zooming on the images. We need to correct the images so they line up perfectly on top of each other.
  2. Perform a gaussian blur on all images
  3. Compute the laplacian on the blurred image to generate a gradient map
  4. Create a blank output image with the same size as the original input images
  5. For each pixel [x,y] in the output image, copy the pixel [x,y] from the input image which has the largest gradient [x,y]