May I ask a question?
Do you want the blur to be global or only on unfocused areas?
Nothing "artificial" about my restrictiions...... this is how *I* do business.....
I asked a specific question about a specific topic, with a set of criteria to allow answers that were acceptable to me....
So based on this drawn out topic..... it ends with a simple "No, I am sorry there does not seem to be a solution that fits you requirements"
@Dave S I asked a specific question about a specific topic, with a set of criteria to allow answers that were acceptable to me....
Right. And by doing so you cut off lines of inquiry that might (well, would, as I know a little more than I'm letting on here) circuitously lead to a solution acceptable to you. Additionally, you created a discussion that will have zero value to anyone else. Bummer.
That must be hard to do in software.
As I understand it, its a physical effect caused by a long lens/short depth of field
Creating lens flare/ blur of light sources behind a sharp object
Blur/soft focus/ flare are all possible, but usually at the expense of the nice sharp edges of the subject matter.
If you could select the subject cleanly, you could apply blur to the image then paste the subject back on it.
Hard to see how it could be done as a digital effect, but I'd be happy to be proved wrong.
Look up the CoreImage filter CIDiscBlur, this will do a bokeh effect for you.
To avoid MBS, there will need to be a bucket load of declares written, but it's more than possible.
I once tried to write a disc blur effect in Xojo, my lack of knowledge prevented me from getting anything useful (far too slow and far too crappy). The long and the short of it, you need to blur by using circles and forcing brighter colours forwards, while darker colors to go backwards.
I like why you've done, very effective for the examples you posted. However generating bokeh, ain't gonna cut. image interpolation can reproduce effects similar to blurring (done it before to gain speed), but it's not doing a disc blur (which is what simulates bokeh).
Jeff, see the 4th and 5th panels of effects in Apple's PhotoBooth. Background detection and effects are very possible in software.
I was intrigued.
I see that Photo Booth 'cheats' on this one, as it doesn't actually 'detect' the background from a standing start. (and doesn't do Bokeh either, at least on my copy)
Instead ,it asks you to step out of shot so that it can see what background IS, then put yourself back in the shot.
Now it has a clear idea what is background and what is not, so effects can be applied. Its working from 2 images, not one.
Bokeh effect on one image would need to guess which bits of the image are face (but remember it also needs to select hair accurately), or leaves, or a statue, as common subject examples
Then leaving that alone, blur the background only with a flare effect around highlight colours.
Alex van der Linden's example above isn't Bokeh, its a nice effect all the same, and more commonly used to make an image look like it was a 'miniature'
It's not mine actually... I got it from Always Busy Corner. Link in my previous post. The how-to is very good documented.
When you want to apply a real bokeh effect you have to guess which pixels belong to the subject following some color values and blur the rest.
@Jeff T I see that Photo Booth 'cheats' on this one, as it doesn't actually 'detect' the background from a standing start. (and doesn't do Bokeh either, at least on my copy)
Many interesting and profitable things are done by cheating :-). The point here is that if you can mask out the area you want in focus, you can apply whatever filter you want to the rest. Focus on that first part.
I do not know who revived this old thread. However, I think (with respect for Xojo) that creating a "bokeh" effect is outside the reach with what is possible to Xojo.
If I need a bokeh effect, then I use a long distance setting together with the great diafragma (2.8 or 4) to get a blurred background. Also focussing a little bit more in front of the subject can help getting that extra touch.
There are enough applications which let you add the bokeh effect. However, the flickering problem on Windows alone, make Xojo completely useless for this kind of application.
I am glad this old thread is revived because it is a very interesting subject in my opinion.
It should be possible on a picture to apply a blur more intense outside of a shape, mimicking somewhat the bokeh effect. But in fact, it is probably extremely complex to have an actual equivalent of a bokeh lens, because it emphasizes lights in a way that would require more than a simple gaussian blur.
@Brad H . . . if you can mask out the area you want in focus, you can apply whatever filter you want to the rest. Focus on that first part.
That may be so, but I can assure you that NO PhotoShop or the like filter can EVER replicate what a polarizing filter can do attached to the lens :)
True but a polarizer filter is not used to blur things. A polarizer is used to remove glare from a surface, get nice blue skies and even see through the water surface. When used properly it also removes reflections. I use it for having more vivid colors in my photographs.
If I want to blur the surrounding background, I use a teleobjective together with a wide diafragma. I am still convinced that the true bokeh effect can only be accomplished with a lens, not with Photoshop, Affinity Photo or any other application. I only use the complete manual mode on my camera.
Some things are done better by a creative person than even the most powerfull computers.
In the good old times, Bokeh effect was obtained with special lenses with enough astigmatism out of focus that made it very recognizable. Still today, I frankly doubt emulating that by software can quite produce such an awesome effect.
But, yet, there seems to be many filtersfor Photoshop :