YOUR ACCOUNT

Login or Register to post new topics or replies
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
My friend (DaliGiger on FilterForge) has been interested in making a "Focus stacking" filter. It takes multiple photographs with narrow focus ranges and detects areas that are the sharpest. It then attempts to stitch the sharpest area, thereby creating a fully focused image. With FilterForge 3 we have the ability to input multiple images, which is where this whole challenge came out of.

So here's a community question. Are there super efficient ways to find blurry areas and sharp areas using FilterForge? I attempted this challenge myself, I thought I'd throw the method which I came up with here. And I am very sure there are better ways to do this.

The current method I tried uses a very simplistic approach. The image goes through a simple edge detection where the logic goes: if the image is sharp, then there will be loads of edges. If the image is blurry, there will be less edges. Hence: sharp areas will be denser than blurry areas.

So the blur component that comes after the edge detection is specifically for finding that "density." The darker areas mean that the area is probably sharp. The lighter areas would mean that the area is probably blurry. And the rest is just creating a mask with feathering on it for compositing two images.

Though this method doesn't work 100%, and its slow. And I thought maybe the forum has a better solution for this issue. smile;) Just wanted to hear thoughts.

  Details E-Mail
CorvusCroax
CorvusCroax

Posts: 1227
Filters: 18
Hey Skybase.

1) I think you don't need all those blurs. You might try constructing the Highpass node yourself - it gives you lots more control than the standard node. If you roll your own you can add in curves etc. that can tweak the process and get more interesting results in fewer steps.
Here's how to make your own high pass: (By Sphinx) http://www.filterforge.com/wiki/index..._Blur_Lore


2) Percentage pass: I did some experiments replacing the blur part with percentage. It gives some interesting effects because it pulls out all the small details and has cool rounding effect when set at 50%. For what you are doing, you could hit it with percentage, and hit it with a simple posterized effect, then compare the two.

3) On some of my filters, I've found it helpful to run high pass on the individual RGB or HSL channels. I'll do it twice (say one on R and one on S) and then combine the results for nicer, crisper edges. Check out http://www.filterforge.com/filters/9503.html

btw: what do you want to do this for anyway?
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
This is a problem I've been trying to solve several times.

The main problem is that you can't really use a fixed radius approach. You need access to variable frequency information (a blur only gives you fixed information on a specific frequency). A variable solution requires a transform into frequency domain, which is not currently possible to create in FF (maybe if we get bitmap based scripting it can be done).

But it could probably be faked to suffice with high passes - do you have a sample focus image set?
  Details E-Mail

Join Our Community!

Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!

33,712 Registered Users
+19 new in 30 days!

153,534 Posts
+31 new in 30 days!

15,348 Topics
+72 new in year!

Create an Account

Online Users Last minute:

70 unregistered users.