Page 3 of 3 FirstFirst 123
Results 21 to 24 of 24

Thread: image processing basics

  1. #21

    Default

    ! dang..

    i learned interpolation beyond linear from julius o. smith's documents (stanford dsp professor), which has made image processing very interesting. what is generally called 'bicubic' interpolation in audio is a 1d process involving four samples.. discretely different from the terminology in graphics where 'bicubic' refers to 2d interpolation, and, if i understand it, 'cubic' indicates this 2nd order method. my method of course requires 64 samples in 3d space... no wonder it's bloody slow!

    float tricint(float td, float t0, float t1, float t2, float t3){
    float f0, f1, f2;
    f0 = (t3 - t2) - (t0 - t1);
    f1 = (t0 - t1) - f0;
    f2 = t2 - t0;
    return ((f0 * td + f1) * td + f2) * td + t1;
    }

    illustrated in a fairly useless app here.. (unfortunately this screenshot doesn't strongly illustrate how this method produces samples outside the sample range).


    some of the articles i've found mention the interpolation method generating samples outside of the [0,1] range so i thought i was up to speed. (some readers may benefit from noting that i have labeled this 'tricubic' attempting to correlate nomenclature between the two fields, which may indeed be incorrect).

    will have a think.. may rip it out as i didn't try 3d linear.. may stick with it as i like the output. if this was audio, soon i'd be advertising 2048^3 sinc interpolation and have an army of fake profiles wiping the floor with anyone who didn't feel this was a necessity

  2. #22
    Administrator waldronate's Avatar
    Join Date
    Mar 2007
    Location
    The High Desert
    Posts
    3,604

    Default

    I realize that you're going at this from a clean room approach, but there is a lot to be learned from looking at some of the reference implementations of Perlin noise ( http://mrl.nyu.edu/~perlin/noise/ is his 2002 noise function implemented in Java; a few minutes shopping on the Perlin Noise Wikipedia page will also pay off handsomely ).

    Also, when summing octaves of perlin noise, I strongly recommend not having an exact integer distance between octaves because any discontinuities that show at lattice points will be amplified. This sort of thing is usually only an issue for smoothing functions that aren't second-derivative continuous like the original Perlin noise (improved Perlin noise uses a quintic function that's smooth in its first and second derivatives).

    On the interpolation subject, linear is 1D, order 1; bilinear is 2D, order 1; quadratic is 1D, order 2; biquadratic is 2D, order 2; cubic is 1D, order 3, bicubic is 2D, order 3; so on and so on. You'll need order + 1 points for each dimension of the interpolation (1D linear needs 2, quadratic needs 3, cubic needs 4, quartic needs 5, etc.; 2D linear needs 4, quadratic needs 9, cubic needs 16, etc.)

  3. #23

    Default

    one of the first things learned when one starts to do things is that the precedent history of humans doing things is often somewhat disparate

    ! quite right about lacunarity. i only recently added lacunarity and persistence and exploring the subtleties (eg. <2 = smoother coastlines). imperfection/glitch is valid and desirable in audio, which is partially why i document the 'failures'.

    i've been playing with wilbur (haven't installed fantasy carto) at points and observing.. (this kind of analysis more or less decimated my 'enjoyment' of music hehe). you've packed a lot of options into wilbur.. (it's not often one finds an export mode for povray ime).

    the app is moving forwards again! rendering is now practically fast enough to animate here using a 4x4 block.

  4. #24
    Administrator waldronate's Avatar
    Join Date
    Mar 2007
    Location
    The High Desert
    Posts
    3,604

    Default

    In case of emergency, there's always techniques based on the inverse FFT. If you fill a 2D image with white noise and then run an inverse FFT on it, you get the basic fBm fractal. If you shape that noise, you get other sorts of effects. Such surfaces also have the nice property that they tile. A good IFFT implementation can be a fair amount faster than some of the noise-based spectral synthesis techniques.

    http://people.cs.kuleuven.be/~ares.l...ELPZ10SPNF.pdf is also a fun and useful read.

Page 3 of 3 FirstFirst 123

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •