Documentation of 'boofcv.alg.misc.GPixelMath' Java class
GPixelMath
boofcv.alg.misc

Class GPixelMath



  • public class GPixelMath
    extends java.lang.Object
    Generalized version of PixelMath. Type checking is performed at runtime instead of at compile type.
    • Constructor Summary

      Constructors 
      Constructor and Description
      GPixelMath() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static <T extends ImageBase>
      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 ImageGray,O extends ImageGray>
      void
      add(T inputA, T inputB, O output)
      Performs pixel-wise addition
      d(x,y) = inputA(x,y) + inputB(x,y)
      static <T extends ImageGray>
      void
      averageBand(Planar<T> input, T output)
      Computes the average for each pixel across all bands in the Planar image.
      static <T extends ImageGray>
      void
      boundImage(T input, double min, double max)
      Bounds image pixels to be between these two values.
      static <T extends ImageGray>
      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 <T extends ImageBase>
      void
      divide(T input, double denominator, double lower, double upper, T output)
      Divide each element by a scalar value and bounds the result.
      static <T extends ImageBase>
      void
      divide(T input, double denominator, T output)
      Divide each element by a scalar value.
      static <T extends ImageGray>
      void
      divide(T imgA, T imgB, T output)
      Performs pixel-wise division
      output(x,y) = imgA(x,y) / imgB(x,y)
      static <T extends ImageBase>
      void
      invert(T input, T output)
      Changes the sign of every pixel in the image: output[x,y] = -input[x,y] Can only be used on signed images.
      static <T extends ImageGray>
      void
      log(T input, T output)
      Sets each pixel in the output image to log( 1 + input(x,y)) of the input image.
      static <T extends ImageBase>
      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>
      void
      minus(double value, T input, T output)
      Subtracts the value of each element from a scalar value.
      static <T extends ImageBase>
      void
      minus(T input, double value, double lower, double upper, T output)
      Subtracts a scalar value from each element.
      static <T extends ImageBase>
      void
      minus(T input, double value, T output)
      Subtracts a scalar value from each element.
      static <T extends ImageBase>
      void
      multiply(T input, double value, double lower, double upper, T output)
      Multiply each element by a scalar value and bounds the result.
      static <T extends ImageBase>
      void
      multiply(T input, double value, T output)
      Multiply each element by a scalar value.
      static <T extends ImageGray>
      void
      multiply(T imgA, T imgB, T output)
      Performs pixel-wise multiplication
      output(x,y) = imgA(x,y) * imgB(x,y)
      static <T extends ImageBase>
      void
      plus(T input, double value, double lower, double upper, T output)
      Add a scalar value to each element and bounds the result.
      static <T extends ImageBase>
      void
      plus(T input, double value, T output)
      Each element has the specified number added to it.
      static <T extends ImageGray>
      void
      pow2(T input, T output)
      Raises each pixel in the input image to the power of two.
      static <T extends ImageGray>
      void
      sqrt(T input, T output)
      Computes the square root of each pixel in the input image.
      static <T extends ImageBase,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

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GPixelMath

        public GPixelMath()
    • Method Detail

      • abs

        public static <T extends ImageBase> 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 absolute value image is written to. Modified.
      • invert

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

        public static <T extends ImageBase> void divide(T input,
                                                        double denominator,
                                                        T 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> void divide(T input,
                                                        double denominator,
                                                        double lower,
                                                        double upper,
                                                        T output)
        Divide each element by a scalar value and bounds the result. 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.
      • divide

        public static <T extends ImageGray> void divide(T imgA,
                                                        T imgB,
                                                        T output)

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

        Only floating point images are supported.
        Parameters:
        imgA - Input image. Not modified.
        imgB - Input image. Not modified.
        output - Output image. Modified.
      • multiply

        public static <T extends ImageBase> void multiply(T input,
                                                          double value,
                                                          T 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> void multiply(T input,
                                                          double value,
                                                          double lower,
                                                          double upper,
                                                          T output)
        Multiply each element by a scalar value and bounds the result. 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.
      • multiply

        public static <T extends ImageGray> void multiply(T imgA,
                                                          T imgB,
                                                          T output)

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

        Only floating point images are supported.
        Parameters:
        imgA - Input image. Not modified.
        imgB - Input image. Not modified.
        output - Output image. Modified.
      • log

        public static <T extends ImageGray> void log(T input,
                                                     T output)
        Sets each pixel in the output image to log( 1 + 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.
        output - Where the log image is written to. Modified.
      • pow2

        public static <T extends ImageGray> void pow2(T input,
                                                      T 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.
      • sqrt

        public static <T extends ImageGray> 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 sqrt() image is written to. Modified.
      • plus

        public static <T extends ImageBase> void plus(T input,
                                                      double value,
                                                      T 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> void plus(T input,
                                                      double value,
                                                      double lower,
                                                      double upper,
                                                      T output)
        Add a scalar value to each element and bounds the result. Both input and output images can be the same instance.
        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> void minus(T input,
                                                       double value,
                                                       T output)

        Subtracts a scalar value from each element. Both input and output images can be the same instance.

        output = input - value

        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> 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 - Value on left side of equation.
        input - The input image, elements subtracted from value. Not modified.
        output - The output image. Modified.
      • minus

        public static <T extends ImageBase> void minus(T input,
                                                       double value,
                                                       double lower,
                                                       double upper,
                                                       T output)

        Subtracts a scalar value from each element. Both input and output images can be the same instance.

        output = input - value

        Parameters:
        input - The input image. Not modified.
        value - What is subtracted from 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> 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.
      • add

        public static <T extends ImageGray,O extends ImageGray> 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.
      • subtract

        public static <T extends ImageBase,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.
      • boundImage

        public static <T extends ImageGray> 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 ImageGray> 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.
      • averageBand

        public static <T extends ImageGray> void averageBand(Planar<T> input,
                                                             T output)
        Computes the average for each pixel across all bands in the Planar image.
        Parameters:
        input - Planar image
        output - Gray scale image containing average pixel values

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.