YOUR ACCOUNT

Login or Register to post new topics or replies
Ramlyn
Ramlyn

Posts: 2930
Filters: 691
I don't know if this has to be a request for FF4 or a suggestion for FF in general.
Anyway..
Let's suppose we have a picture to work on. Just a normal picture, with people and a landscape. The face of the people is nearer. The landscape is not on the same distance as the face of the people. How to apply the same effect to the whole photo keeping the different feeling depending on the distance?
We could use Photoshop. Divide it in layers and after using FF on every layer, but the result would be so so.
Any other idea?
Could a new FF4 work on different layers as they were very far ? How to say.... If we have a person as main subject of the photo, and a background as something very far... Can FF works on them and set a unique effect? I tried the effects of FF3, but, even helping with Photoshop, the result is not satisfying.
Yes, doing a lot of job with Photoshop, we can clearly get a better result, but that's not my idea. I just wonder if the new FF could do a smart work on the distances ( for example, selecting two layers, one as main and a second as far layer )
  Details E-Mail
Ramlyn
Ramlyn

Posts: 2930
Filters: 691
I'm sorry if I cannot explain very well. I hope everybody got an idea of the meaning.

For example, let's think about creative filters. If we could simply choose two areas, one for the front and another for the background. Then choosing the distance between them. This would allow the filter to set the effect. Depending on the distance, the filter could set the perspective lines in different way
  Details E-Mail
Ramlyn
Ramlyn

Posts: 2930
Filters: 691
Using FF as Photoshop plug-in, it could be surely done, but I don't know if it is possible as stand alone program.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Interesting question. I wonder if there is a way to create a script that can use a z-depth channel to vary the amount of effect. Similar to a variable blur (lens blur in Photoshop) but which can be plugged in as a component to any existing filter...

My thought, although it will probably not work as I expect, would be to have a script that, from the viewpoint of the FF rendered, enlarges the image more the further away it is (the deeper it is in z-depth map) and thus creates an effect with a smaller radius for further-away objects. Don't know if that can actually be done.
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
I've been thinking about something similar for years, i.e. how to "detect" the depth of field in a natural photo - with relative post processing in mind of course.

So I'd say the first problem here is how to determine the depth - I thought about somehow using correlation of frequency changes in different color spaces. This is not easy, and my attempts so far did not produce anything useful (too much noise/errors).
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
Here's something interesting that was at NAB a while back. http://www.yuvsoft.com/stereo-3d-tech...h-effects/

They also seem to have figured a method extracting depth from focus, which is really nice.

I did some compositing work in the past and I ran into frequent issues manually dealing with depth maps. During some research that came up. I don't have that plugin myself, nor do I really know how it works, but it's definitely what's being discussed. Quite difficult I'd say!
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
Skybase - that is exactly what I meant, i.e. frequency ranges change over depth due to focal change. Lets get a challenge going smile:-D
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
That certainly seems error-prone. For instance, how do you tell the difference between something that is out of focus versus something that is rounded with a similar radius? Even image noise can affect the result.

I would imagine it would be "easier" fr om a stereo pair of images where you can compare the locations rather than the focus.

As a first step I would try addressing a situation wh ere you already have a z-depth map in existence. Would there be a way to create a script that used that to affect the amount of effect from a filter? Ideally you could plug it in as the last component before Result (or first after External Image?) in any existing filter tree.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
No, hold on a second: Does it even matter whether the area is out of focus or just lacking sharp edges?

If the effect is dependent on how sharp the image area is, it might not matter whether the area is out of focus or just without much high-contrast detail, in many cases the results would likely be visually similar.

Which makes me think that some High-pass-related solution might be adequate. In other words, where the image result run through the High-pass component is close to mid gray the effect would have a larger radius, and the further from mid gray the High-pass result the smaller the radius.

Sounds simple enough.

Sort of like unsharp mask or smart blur.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Well, it didn't take long to figure out the first problem with that simple approach: You wouldn't be able to scale the filter output that way. Thus patterns would appear the same size no matter where they were in the image.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Okay, so here's another thought:

Most images have a certain type of perspective, the most common being a ground plane with a sky (or back wall). In this scene there can be individual objects.

You could have a few simple inputs for the basic layout, such as horizon height and back wall distance, perhaps focal distance. This is the background set.

And then, wherever there are areas that have sharper details than a given threshold (different enough from expected background focal values) you assume there to objects. All the rest is background.

Perhaps this method could be used to construct a basic depth channel with just a couple of inputs?
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
I did some quick tests on this idea. I seem to get a "focal map" rather than a depth map as a result. One problem is that the objects in focus are not necessarily the closest objects in the scene. When they are in the middle ground of depth with out-of-focus objects in the front and in the back, there is no way to distinguish between foreground and background. An initial mask for foreground vs background, even rough, would help the matter considerably.

I only now realized to check out the YUVsoft link. Very nice results. They also (can) use a rough mask and improve upon it.
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
This thread has become ThreeDee talking to himself thread. D:

YUVsoft seems to just basically put all what's being discussed here into a package. I really want to try their products since it really adds to what I do. smile:( But they probably cost a few thousand bucks.
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
Well, I'm reading smile;-)

I got the experiments going too, but so far I've not been able to produce anything useful (though some quite interesting outputs were produced). What I'm trying to do is this: For each sample, look at the relative difference fr om different low pass steps. The idea is to find the lowest acceptable (by some threshold) frequency relation.

Frequency variations in image data is clearly highly related to the actual objects and patterns etc., but the changes in focus is to be considered as a frequency sweeping low pass filter, where the given low pass frequency is given by the distance of the objects in the scene - lets call this focal point F.

Now all the variations in the actual scene will at any point be restricted to 0.. F in possible frequency. This fact is what I'm trying to make use of..

Of course there will be issues when the focal point is far away from the lens, but even so the output is useful, and the problem of correcting that error seem simpler than the current.

Edit: Here is a page with some general depth of field introduction:
http://www.cambridgeincolour.com/tuto...-field.htm
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
Here is one of the strange bi products of the experimentation. The input image is the Ladybug image smile:-D

  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
Here is the best variant so far - it pretty much uses the approach described above, only it searches for the lowest acceptable low pass frequency within each sample.

  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
Ooohhhh ho hoho..... these results are look seriously promising. So I've been wondering... how long does it take to process the image?
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Sphinx,

That is certainly more scientific an approach than mine. For my first tests I used a down-and dirty approach of edge detection plus percentile to smooth out the results.

Here is what I get with the kingfisher image:

  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
With less smoothing.

  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
Found a bug in my algorithm.. here is the new raw result - it could probably use a median filtering or something. The processing time is about 30 secs, but it depends on settings (number of low pass searches).

  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
ThreeDee - that looks good! We both seem to have a problem with the "fill" though. Here is the same algo and image with some other settings.

  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Sphinx,

I suggest we include a optional mask input. The purpose of the mask is to distinquish between foreground and background objects (White for foreground and black for background). As objects in the background as well as objects in the foreground can be out of focus, there needs to be a way to separate them out from each other.

I believe this will greatly improve the resulting depth channel output, and can likely also be used in estimating whether a fill is needed at some location.

For instance, if we used a mask for foreground vs. background on the kingfisher image, you could easily determine by sampling the mask that there is a fill needed in the missing areas of the bird, as that area is all foreground.

It is a pity that you can't access the masks of the built-in preview images, for that would work here.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
You could then force the z-channel for foreground objects to be lighter than (for instance) 50% and background objects darker than 50% gray value. The actual value could be adjusted based on focal depth.
  Details E-Mail
CFandM
ForgeSmith

Posts: 4769
Filters: 266
You could always do this for masks....It the way I had to do for some filters..
Or is this what you are thinking smile:?:

fasdfasd.ffxml
Stupid things happen to computers for stupid reasons at stupid times!
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Quote
CFandM said: You could always do this for masks....It the way I had to do for some filters..


I'll be darned. Exactly that -- thanks! Didn't think to try that method. External selection never worked, so I had given up on it.

It was that well-hidden "Use transparency" option that I missed smile:)
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
I guess you could consider it cheatin', but adding the mask gives me this:

  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Faking it even further by blending some of the brightness channel information and blurring the mask for additional roundness:

  Details E-Mail
CFandM
ForgeSmith

Posts: 4769
Filters: 266
Quote
ThreeDee Wrote:
I'll be darned. Exactly that -- thanks! Didn't think to try that method. External selection never worked, so I had given up on it.

It was that well-hidden "Use transparency" option that I missed smile:)


Glad I could help in some fashion with this one.. smile;)
Yep that option in hidden well... smile:D
Stupid things happen to computers for stupid reasons at stupid times!
  Details E-Mail

Join Our Community!

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

33,719 Registered Users
+8 new in 7 days!

153,545 Posts
+5 new last day!

15,348 Topics
+71 new in year!

Create an Account

Online Users Last minute:

25 unregistered users.