Bokeh Effect

  1. 5 years ago

    Dave S

    20 Mar 2014 San Diego, California USA

    anyone have a non-plugin (declare ok) version of an algorithm to apply this affect to a "picture"?

  2. Brad H

    20 Mar 2014 Down here on the farm.

    If I were to recommend that you familiarize yourself with the ImageMagick library, would that fall in or out of bounds of your request? The way you have limited things makes that very unclear.

  3. Dave S

    20 Mar 2014 San Diego, California USA

    Not sure why unclear.

    a) Xojo Code - acceptable
    b) Declares (Cocoa) acceptable
    c) 3rd party plug-in NOT acceptable

  4. Brad H

    20 Mar 2014 Down here on the farm.

    So where do you slot ImageMagick in your taxonomy?

  5. Karen A

    20 Mar 2014 Pre-Release Testers

    @Dave S Not sure why unclear.

    a) Xojo Code - acceptable
    b) Declares (Cocoa) acceptable
    c) 3rd party plug-in NOT acceptable

    ImageMagik is an open source project you might be able to declare into without a plugin. Alternately you might be able to just translate an algorithm from it's source code to Xojo (I assume it's in C).

    Brad said it the way he did because MBS does wrap it... But even without the plugin it is a place that you might find what you need.

  6. Brad H

    20 Mar 2014 Down here on the farm.

    @Karen A Brad said it the way he did because MBS does wrap it... But even without the plugin it is a place that you might find what you need.

    If he were not restricting the discussion, we could have gotten there a lot quicker. But to be respectful to the OP, I think we need to establish whether this angle that he doesn't seem to have considered is an acceptable line of discussion. Lest anyone decides a contribution is offensive and wants them banned... And of course, this will be a wonderfully useful discussion for the next person who searches for "Bokeh" on the forum.

  7. Dave S

    20 Mar 2014 San Diego, California USA

    @Brad H So where do you slot ImageMagick in your taxonomy?

    Based on what I see... no where... MBS fails my criteria for reasons I have stated more times than I care to count.

    It is NOT Xojo Code
    It is not a Cocoa Declare
    It doesn't seem to be a plugin

    It seems to be a "C" program or series of "C" modules...... Plus there is no Bokeh algorithm that I could find referenced anywhere in the code.

    So thanks for the attempt.......

  8. Brad H

    20 Mar 2014 Down here on the farm.

    I'll start another thread on this sometime. It's an interesting topic if you don't artificially limit your options. And you don't need to "buy" anything to make this work.

  9. Brad H

    20 Mar 2014 Down here on the farm.

    P.S. The extension to your taxonomy that should make sense from your perspective is to allow free / OS libraries that you can declare into and ship in binary form with your app. Just an FYI...

  10. Brian O

    20 Mar 2014 Pre-Release Testers, Xojo Pro Calgary, AB

    May I ask a question?
    Do you want the blur to be global or only on unfocused areas?

  11. Dave S

    20 Mar 2014 San Diego, California USA

    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"

  12. Brad H

    20 Mar 2014 Down here on the farm.

    @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.

  13. Jeff T

    20 Mar 2014 Midlands of England, Europe

    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.

  14. Brian O

    20 Mar 2014 Pre-Release Testers, Xojo Pro Calgary, AB

    I have done this.. but well i guess it doesn't matter.

  15. Brad H

    20 Mar 2014 Down here on the farm.

    Jeff, see the 4th and 5th panels of effects in Apple's PhotoBooth. Background detection and effects are very possible in software.

  16. Alexander v

    20 Mar 2014 Europe (Houten, The Netherland...

    Take a look at this older Always Busy Corner blog. I'm not quite sure it is BOKEH but the technique looks like you can tweak it to get the desired effect

  17. Sam R

    20 Mar 2014 Pre-Release Testers, Xojo Pro Hengchun, Pingtung, Taiwan

    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.

  18. Alexander v

    21 Mar 2014 Europe (Houten, The Netherland...

    The 'tilt-shift' effect uses a gradient blur to create pictures like this:
    -image-

    Pure Xojo code.

  19. 4 years ago

    Sam R

    21 Mar 2014 Pre-Release Testers, Xojo Pro Hengchun, Pingtung, Taiwan

    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).

  20. Jeff T

    22 Mar 2014 Midlands of England, Europe

    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'

  21. Newer ›

or Sign Up to reply!