Documentation of 'boofcv.core.image.GConvertImage' Java class
GConvertImage
boofcv.core.image

Class GConvertImage



  • public class GConvertImage
    extends java.lang.Object

    Generalized functions for converting between different image types. Numerical values do not change or are closely approximated in these functions. If an output image is not specified then a new instance is declared and returned.

    • Constructor Summary

      Constructors 
      Constructor and Description
      GConvertImage() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static <T extends ImageGray>
      T
      average(ImageInterleaved input, T output)
      Converts a Planar into a ImageGray by computing the average value of each pixel across all the bands.
      static <T extends ImageGray>
      T
      average(Planar<T> input, T output)
      Converts a Planar into a ImageGray by computing the average value of each pixel across all the bands.
      static void convert(ImageBase input, ImageBase output)
      Converts one type of between two types of images using a default method.
      static GrayU8 convert(ImageGray input, double min, double max, int numValues, GrayU8 output)
      Converts pixel values in the input image into an integer values from 0 to numValues.
      • Methods inherited from class java.lang.Object

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

      • GConvertImage

        public GConvertImage()
    • Method Detail

      • convert

        public static void convert(ImageBase input,
                                   ImageBase output)

        Converts one type of between two types of images using a default method. Both are the same image type then a simple type cast if performed at the pixel level. If the input is multi-band and the output is single band then it will average the bands. If input is single band and output is multi-band then the single band is copied into each of the other bands.

        In some cases a temporary image will be created to store intermediate results. If this is an issue you will need to create a specialized conversion algorithm.

        Parameters:
        input - Input image which is being converted. Not modified.
        output - (Optional) The output image. If null a new image is created. Modified.
      • average

        public static <T extends ImageGray> T average(Planar<T> input,
                                                      T output)
        Converts a Planar into a ImageGray by computing the average value of each pixel across all the bands.
        Parameters:
        input - Input Planar image that is being converted. Not modified.
        output - (Optional) The single band output image. If null a new image is created. Modified.
        Returns:
        Converted image.
      • average

        public static <T extends ImageGray> T average(ImageInterleaved input,
                                                      T output)
        Converts a Planar into a ImageGray by computing the average value of each pixel across all the bands.
        Parameters:
        input - Input Planar image that is being converted. Not modified.
        output - (Optional) The single band output image. If null a new image is created. Modified.
        Returns:
        Converted image.
      • convert

        public static GrayU8 convert(ImageGray input,
                                     double min,
                                     double max,
                                     int numValues,
                                     GrayU8 output)
        Converts pixel values in the input image into an integer values from 0 to numValues.
        Parameters:
        input - Input image
        min - minimum input pixel value, inclusive
        max - maximum input pixel value, inclusive
        numValues - Number of possible pixel values in output image
        output - (Optional) Storage for the output image. Can be null.
        Returns:
        The converted output image.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.