Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Focus stacking module implementation #1859

Open
waridrox opened this issue Mar 25, 2021 · 1 comment
Open

Focus stacking module implementation #1859

waridrox opened this issue Mar 25, 2021 · 1 comment

Comments

@waridrox
Copy link
Member

waridrox commented Mar 25, 2021

The idea

Focus stacking (also known as focal plane merging and z-stacking or focus blending) is a digital image processing technique which combines multiple images taken at different focus distances to give a resulting image with a greater depth of field (DOF) than any of the individual source images.Focus stacking can be used in any situation where individual images have a very shallow depth of field; macro photography and optical microscopy are two typical examples. Focus stacking can also be useful in landscape photography. Source wiki

Sample 1
Screenshot 2021-03-26 at 12 52 06 AM

Sample 2
Focus Stacking

Possible way of implementation

CC: @jywarren

I guess, one way to think about is:
a module which analyzes the sharpness of each pixel and replaces any
"blurry" pixel with an alpha transparent pixel.
we could then repeatedly import images (i.e. import-image module followed
by "overlay-sharpest" module, or something like that) and they'd "knock
out" blurry areas with higher contrast or higher sharpness data. The order
of operations might need tweaking.

I could imagine other ways to do this too, but that seems like a relatively
simple one.

Another idea would be a module which imports a video clip and makes each
frame available to requests from later modules. That would be a little wild
as a module, and maybe would be a separate project.

@waridrox waridrox changed the title Focus stacking module addition Focus stacking module implementation Mar 25, 2021
@jywarren
Copy link
Member

jywarren commented Mar 25, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants