Iris Blur Bokeh Effect?


#1

I’m looking at this tutorial now, and I’m wondering how is this possible on FOSS?


Note that the blur often have some sort of shapes to them, and this len blur actually look good.


(darix) #2

maybe something for gmic?


#3

There’s nothing like this on G’MIC. Bokeh Effect under G’MIC is totally random, and blur option doesn’t seem to give the option of adding into Bokeh Effect. I went into GIMP, nothing there. Krita has len blurs with shape option, but it requires several workarounds to get close to something like that with the flaw that you can’t address large white areas, and it is far more limited in capability than Photoshop Iris Blur.


#4

I am not able to implement, at least not fast, because GIMPs arbitrary convolution is limited to small kernels, but maybe somebody more skilled could try:

What about

  1. Duplicate the layer
  2. On the upper layer, black out all pixels below a particular brightness. Leave only the brightest pixels.
  3. Convolve with a huge kernel, which has the form of the bokeh, for different brightness steps within the remaining picture, but alter the kernel size on the brightness and/or distance from the center.
  4. Same as step 2, starting with the original layer, but this time leave only the darker areas.
  5. Blur this layer with a regular blur.
  6. Combine the two new layers (don’t know which mode may be the best).

An alternative could be to replace step 3 by a dilation loop which is controlled by the brightness and using a regular blur.

Could be totally nonsense, not sure …


#5

That’s the exact technique I tried for Krita except with non-destructive filters and clone layers, but it seems to ignore color information, and big white areas can’t be ignored. So, there has to be some sort of way to replicate the effect. Also, while shapes are seen in Krita, it just looks ugly around the edge.


#6

Do you have an example picture with white areas to show what you mean, I did not get this. And do you have example pictures to play with, best with the original picture and what you expect (not for me, at least not now, already bed time, but it could help to find a solution).


#7

Yes, before and after examples would be appreciated. I don’t quite know what an iris blur is but it piques my interest :slight_smile:.


#8

Hmm, I just realized that Bokeh seem to take into account of edges, which would mean I need to see if a technique with edges will work. Pics will come, but not soon.


#9

@Reptorian Is this the tutorial that you were following? After reading it I have a better picture of what you are talking about. Looks like there are a few things going on. The uniformly blurred area, the untouched area and the transitional area in between; and then there is the bokeh. I think they could be addressed separately.


(Morgan Hardwood) #10

There was a very excellent script for GIMP which rendered a realistic bokeh and allowed for a realistic graduated blur using a depth map. Unfortunately the GIMP scripts website is broken, I can’t even switch to any page other than the first of each glossary letter: http://registry.gimp.org/glossary/a
If you manage to search it, look for “bokeh” and for “graduated blur” or “depth blur”.


(Morgan Hardwood) #11

I think it was this one, Focus Blur:
http://registry.gimp.org/node/1444
http://registry.gimp.org/files/