• Parallel Fourier Gradient

    From Douglas Goncz A.A.S. M.E.T. 1990@21:1/5 to All on Sat Apr 15 23:35:36 2023
    Let us say we want the gradient of a Time series. For finite time series we will be losing one data point at each end using most most methods. We
    subtract each data point from its adjacent data point the one to either so
    I'd let's say it's going to be the right side consistency consistently.
    This gives us the time series which is the gradient of that original signal.

    Let us say we want the gradient of a two-dimensional spatial series
    otherwise known as an image. Buying analogous process I'm subtracting and getting something like the gradient.

    Symbolically the gradient is the partial derivative in each direction for
    any number of dimensions.

    Well I have been playing with the two dimensional spatial series data or
    image format in mathcad and found a function called cfft which computes the complex fast fourier transform of data in 2 dimensions. The icfft function reverses that result to restore an image. Lowpass and high-pass filtering
    are easy but not spectacularly easy in the cfft domain. They are
    spectacular easy in the one-dimensional case.

    Pixel data in two dimensions in space in grayscale our conventionally a
    number of bits say 8 bits for 256 levels of Gray. And are analogous in
    color spaces. Edge detection produces a result similar to an artist's
    pencil drawing.

    Well I collect pencil drawings and also pencil drawing software.

    And I use mathcad.

    I usually use the variable name capital m for matrix containing two
    dimensional grayscale image data in mathcad. I compute the gradient several different ways in method.

    I have a new way to compute the gradient in mathcad and symbolically.

    icfft (i * cfft (M))= grad(M).

    Discussion?

    Douglas

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rock Brentwood@21:1/5 to All on Sun Apr 30 12:46:47 2023
    On Sunday, April 16, 2023 at 1:35:42=E2=80=AFAM UTC-5, Douglas Goncz
    A.A.S. M.E.T. 1990 wrote:
    Let us say we want the gradient of a Time series.
    [...]
    Let us say we want the gradient of a two-dimensional spatial series
    otherwise known as an image.

    Well-known problems for scientific and numeric programming for
    Physics and other fields.

    The usual way to approach this is:
    (1) model the point cloud as a function (that's interpolation),
    (2) take the relevant derivatives of that function.

    In ALGLIB, the "interpolation" module has the
    "spline1d", "spline2d" and "spline3d" packages.

    The spline 2D includes routines to initialize splines from point clouds
    (both point grids, and with more recent revisions, unordered point clouds).

    spline2dbuild*()

    and to configure the splines

    spline2dset*()

    to calculuate interpolated values off the spline (singly or in batch)

    spline2dcalc*()

    to do affine transformations on both the input and output spaces
    (including resampling)

    spline2dlintrans*(), spline2dresample*()

    and (tada!) to differentiate

    spline2ddiff*().

    The RBF module is closer to AI-level modelling and the original
    ALGLIB developer has been harping on it, from day one, as a better
    method for interpolation; but I can't say too much about it.

    A curated version of the C++ free edition of ALGLIB (and a work in
    progress) can be found on GitHub, currently under

    https://github.com/LydiaMarieWilliamson/ALGLIB_cpp

    which may be later integrated with, and into, curated versions Mesa
    (translated into C++), OpenCV (and other image 2D to 3D and 3D modelling software) as well as serving, for AI application, as an engine for
    revised versions of LLaMA or GPT.

    [[Mod. note -- Other good sources of free interpolation code include
    https://www.netlib.org
    https://www.gnu.org/software/gsl/doc/html/interp.html
    -- jt]]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)