Class GPixelMath

java.lang.Object
boofcv.alg.misc.GPixelMath

@Generated("boofcv.alg.misc.GenerateGPixelMath") public class GPixelMath extends Object
Generalized version of PixelMath. Type checking is performed at runtime instead of at compile type.

DO NOT MODIFY. Automatically generated code created by GenerateGPixelMath

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T extends ImageBase<T>>
    void
    abs(T input, T output)
    Sets each pixel in the output image to be the absolute value of the input image.
    static <T extends ImageBase<T>, O extends ImageBase>
    void
    add(T inputA, T inputB, O output)
    Performs pixel-wise addition
    d(x,y) = inputA(x,y) + inputB(x,y)
    static <T extends ImageBase<T>>
    void
    boundImage(T input, double min, double max)
    Bounds image pixels to be between these two values.
    static <T extends ImageBase<T>>
    void
    diffAbs(T inputA, T inputB, T output)
    Computes the absolute value of the difference between each pixel in the two images.
    d(x,y) = |img1(x,y) - img2(x,y)|
    static <N extends ImageBase, D extends ImageBase<D>>
    void
    divide(N imgA, D imgB, N output)
    Performs pixel-wise division
    output(x,y) = imgA(x,y) / imgB(x,y)
    static <T extends ImageBase<T>, O extends ImageBase<O>>
    void
    divide(T input, double denominator, double lower, double upper, O output)
    Divide each element by a scalar value.
    static <T extends ImageBase<T>, O extends ImageBase<O>>
    void
    divide(T input, double denominator, O output)
    Divide each element by a scalar value.
    static <T extends ImageBase<T>, O extends ImageBase<O>>
    void
    log(T input, double value, O output)
    Sets each pixel in the output image to log( val + input(x,y)) of the input image.
    static <T extends ImageBase<T>, O extends ImageBase<O>>
    void
    logSign(T input, double value, O output)
    Sets each pixel in the output image to sgn*log( val + sgn*input(x,y)) of the input image.
    static <T extends ImageBase<T>>
    void
    minus(double value, T input, double lower, double upper, T output)
    Subtracts the value of each element from a scalar value.
    static <T extends ImageBase<T>>
    void
    minus(double value, T input, T output)
    Subtracts the value of each element from a scalar value.
    static <T extends ImageBase<T>, O extends ImageBase<O>>
    void
    minus(T input, double value, double lower, double upper, O output)
    Subtracts a scalar value from each element.
    static <T extends ImageBase<T>, O extends ImageBase<O>>
    void
    minus(T input, double value, O output)
    Subtracts a scalar value from each element.
    static <N extends ImageBase, D extends ImageBase<D>>
    void
    multiply(N imgA, D imgB, N output)
    Performs pixel-wise multiplication
    output(x,y) = imgA(x,y) * imgB(x,y)
    static <T extends ImageBase<T>, O extends ImageBase<O>>
    void
    multiply(T input, double value, double lower, double upper, O output)
    Multiply each element by a scalar value.
    static <T extends ImageBase<T>, O extends ImageBase<O>>
    void
    multiply(T input, double value, O output)
    Multiply each element by a scalar value.
    static <T extends ImageBase<T>>
    void
    negative(T input, T output)
    Changes the sign of every pixel in the image: output[x,y] = -input[x,y]
    static <T extends ImageBase<T>>
    void
    operator1(T input, PixelMathLambdas.Function1 function, T output)
    Applies the lambda operation to each element in the input image.
    static <T extends ImageBase<T>>
    void
    operator2(T imgA, PixelMathLambdas.Function2 function, T imgB, T output)
    Applies the lambda operation to each element in the two input images.
    static <T extends ImageBase<T>, O extends ImageBase<O>>
    void
    plus(T input, double value, double lower, double upper, O output)
    Each element has the specified number added to it.
    static <T extends ImageBase<T>, O extends ImageBase<O>>
    void
    plus(T input, double value, O output)
    Each element has the specified number added to it.
    static <A extends ImageBase<A>, B extends ImageBase<B>>
    void
    pow2(A input, B output)
    Raises each pixel in the input image to the power of two.
    static <T extends ImageBase<T>>
    void
    sqrt(T input, T output)
    Computes the square root of each pixel in the input image.
    static <T extends ImageBase<T>, B extends ImageBase<B>>
    void
    stdev(T mean, B pow2, T stdev)
    Computes the standard deviation of each pixel in a local region.
    static <T extends ImageBase<T>, O extends ImageBase>
    void
    subtract(T inputA, T inputB, O output)
    Performs pixel-wise subtraction, but ensures the result is between two bounds.
    d(x,y) = imgA(x,y) - imgB(x,y)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GPixelMath

      public GPixelMath()
  • Method Details

    • operator1

      public static <T extends ImageBase<T>> void operator1(T input, PixelMathLambdas.Function1 function, T output)
      Applies the lambda operation to each element in the input image. output[i] = function(input[i]) Both the input and output image can be the same instance.
    • operator2

      public static <T extends ImageBase<T>> void operator2(T imgA, PixelMathLambdas.Function2 function, T imgB, T output)
      Applies the lambda operation to each element in the two input images. output[i] = function(imA[i],imgB[i]) Both the imgA, imgB, and output images can be the same instance.
    • abs

      public static <T extends ImageBase<T>> void abs(T input, T output)
      Sets each pixel in the output image to be the absolute value of the input image. Both the input and output image can be the same instance.
      Parameters:
      input - The input image. Not modified.
      output - Where the inverted image is written to. Modified.
    • negative

      public static <T extends ImageBase<T>> void negative(T input, T output)
      Changes the sign of every pixel in the image: output[x,y] = -input[x,y]
      Parameters:
      input - The input image. Not modified.
      output - Where the inverted image is written to. Modified.
    • divide

      public static <T extends ImageBase<T>, O extends ImageBase<O>> void divide(T input, double denominator, O output)
      Divide each element by a scalar value. Both input and output images can be the same instance.
      Parameters:
      input - The input image. Not modified.
      denominator - What each element is divided by.
      output - The output image. Modified.
    • divide

      public static <T extends ImageBase<T>, O extends ImageBase<O>> void divide(T input, double denominator, double lower, double upper, O output)
      Divide each element by a scalar value. Both input and output images can be the same instance.
      Parameters:
      input - The input image. Not modified.
      denominator - What each element is divided by.
      lower - Lower bound on output. Inclusive.
      upper - Upper bound on output. Inclusive.
      output - The output image. Modified.
    • multiply

      public static <T extends ImageBase<T>, O extends ImageBase<O>> void multiply(T input, double value, O output)
      Multiply each element by a scalar value. Both input and output images can be the same instance.
      Parameters:
      input - The input image. Not modified.
      value - What each element is multiplied by.
      output - The output image. Modified.
    • multiply

      public static <T extends ImageBase<T>, O extends ImageBase<O>> void multiply(T input, double value, double lower, double upper, O output)
      Multiply each element by a scalar value. Both input and output images can be the same instance.
      Parameters:
      input - The input image. Not modified.
      value - What each element is multiplied by.
      lower - Lower bound on output. Inclusive.
      upper - Upper bound on output. Inclusive.
      output - The output image. Modified.
    • plus

      public static <T extends ImageBase<T>, O extends ImageBase<O>> void plus(T input, double value, O output)
      Each element has the specified number added to it. Both input and output images can be the same.
      Parameters:
      input - The input image. Not modified.
      value - What is added to each element.
      output - The output image. Modified.
    • plus

      public static <T extends ImageBase<T>, O extends ImageBase<O>> void plus(T input, double value, double lower, double upper, O output)
      Each element has the specified number added to it. Both input and output images can be the same.
      Parameters:
      input - The input image. Not modified.
      value - What is added to each element.
      lower - Lower bound on output. Inclusive.
      upper - Upper bound on output. Inclusive.
      output - The output image. Modified.
    • minus

      public static <T extends ImageBase<T>, O extends ImageBase<O>> void minus(T input, double value, O output)
      Subtracts a scalar value from each element. Both input and output images can be the same instance.
      Parameters:
      input - The input image. Not modified.
      value - What is subtracted from each element in input.
      output - The output image. Modified.
    • minus

      public static <T extends ImageBase<T>, O extends ImageBase<O>> void minus(T input, double value, double lower, double upper, O output)
      Subtracts a scalar value from each element. Both input and output images can be the same instance.
      Parameters:
      input - The input image. Not modified.
      value - What is subtracted from each element in input.
      lower - Lower bound on output. Inclusive.
      upper - Upper bound on output. Inclusive.
      output - The output image. Modified.
    • minus

      public static <T extends ImageBase<T>> void minus(double value, T input, T output)
      Subtracts the value of each element from a scalar value. Both input and output images can be the same instance. output = value - input
      Parameters:
      value - Left side of equation.
      input - The input image. Not modified.
      output - The output image. Modified.
    • minus

      public static <T extends ImageBase<T>> void minus(double value, T input, double lower, double upper, T output)
      Subtracts the value of each element from a scalar value. Both input and output images can be the same instance. output = value - input
      Parameters:
      value - Left side of equation.
      input - The input image. Not modified.
      lower - Lower bound on output. Inclusive.
      upper - Upper bound on output. Inclusive.
      output - The output image. Modified.
    • log

      public static <T extends ImageBase<T>, O extends ImageBase<O>> void log(T input, double value, O output)
      Sets each pixel in the output image to log( val + input(x,y)) of the input image. Both the input and output image can be the same instance.
      Parameters:
      input - The input image. Not modified.
      value - log( value + input[x,y])
      output - The output image. Modified.
    • logSign

      public static <T extends ImageBase<T>, O extends ImageBase<O>> void logSign(T input, double value, O output)
      Sets each pixel in the output image to sgn*log( val + sgn*input(x,y)) of the input image. where sng is the sign of input(x,y).
      Parameters:
      input - The input image. Not modified.
      value - sgn*log( value + sgn*input[x,y])
      output - The output image. Modified.
    • sqrt

      public static <T extends ImageBase<T>> void sqrt(T input, T output)
      Computes the square root of each pixel in the input image. Both the input and output image can be the same instance.
      Parameters:
      input - The input image. Not modified.
      output - Where the inverted image is written to. Modified.
    • divide

      public static <N extends ImageBase, D extends ImageBase<D>> void divide(N imgA, D imgB, N output)

      Performs pixel-wise division
      output(x,y) = imgA(x,y) / imgB(x,y)

      Only floating point images are supported. If the numerator has multiple bands and the denominator is a single band then the denominator will divide each band.
      Parameters:
      imgA - Input image. Not modified.
      imgB - Input image. Not modified.
      output - Output image. Modified.
    • multiply

      public static <N extends ImageBase, D extends ImageBase<D>> void multiply(N imgA, D imgB, N output)

      Performs pixel-wise multiplication
      output(x,y) = imgA(x,y) * imgB(x,y)

      Only floating point images are supported. If one image has multiple bands and the other is gray then the gray image will be multiplied by each band in the multiple band image.
      Parameters:
      imgA - Input image. Not modified.
      imgB - Input image. Not modified.
      output - Output image. Modified.
    • pow2

      public static <A extends ImageBase<A>, B extends ImageBase<B>> void pow2(A input, B output)
      Raises each pixel in the input image to the power of two. Both the input and output image can be the same instance.
      Parameters:
      input - The input image. Not modified.
      output - Where the pow2 image is written to. Modified.
    • add

      public static <T extends ImageBase<T>, O extends ImageBase> void add(T inputA, T inputB, O output)

      Performs pixel-wise addition
      d(x,y) = inputA(x,y) + inputB(x,y)

      Parameters:
      inputA - Input image. Not modified.
      inputB - Input image. Not modified.
      output - Output image. Modified.
    • boundImage

      public static <T extends ImageBase<T>> void boundImage(T input, double min, double max)
      Bounds image pixels to be between these two values.
      Parameters:
      input - Input image.
      min - minimum value. Inclusive.
      max - maximum value. Inclusive.
    • diffAbs

      public static <T extends ImageBase<T>> void diffAbs(T inputA, T inputB, T output)

      Computes the absolute value of the difference between each pixel in the two images.
      d(x,y) = |img1(x,y) - img2(x,y)|

      Parameters:
      inputA - Input image. Not modified.
      inputB - Input image. Not modified.
      output - Absolute value of difference image. Modified.
    • stdev

      public static <T extends ImageBase<T>, B extends ImageBase<B>> void stdev(T mean, B pow2, T stdev)
      Computes the standard deviation of each pixel in a local region.
      Parameters:
      mean - (Input) Image with local mean
      pow2 - (Input) Image with local mean pixel-wise power of 2
      stdev - (Output) standard deviation of each pixel. Can be same instance as either input.
    • subtract

      public static <T extends ImageBase<T>, O extends ImageBase> void subtract(T inputA, T inputB, O output)

      Performs pixel-wise subtraction, but ensures the result is between two bounds.
      d(x,y) = imgA(x,y) - imgB(x,y)

      Parameters:
      inputA - Input image. Not modified.
      inputB - Input image. Not modified.
      output - Output image. Modified.