Class VisualizeImageData


  • public class VisualizeImageData
    extends java.lang.Object
    Renders different primitive image types into a BufferedImage for visualization purposes.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.awt.image.BufferedImage colorizeGradient​(boofcv.struct.image.GrayF32 derivX, boofcv.struct.image.GrayF32 derivY, float maxAbsValue, java.awt.image.BufferedImage output)
      Renders two gradients on the same image using two sets of colors, on for each input image.
      static java.awt.image.BufferedImage colorizeGradient​(boofcv.struct.image.GrayS16 derivX, boofcv.struct.image.GrayS16 derivY, int maxAbsValue, java.awt.image.BufferedImage output)
      Renders two gradients on the same image using two sets of colors, on for each input image.
      static java.awt.image.BufferedImage colorizeGradient​(boofcv.struct.image.ImageGray derivX, boofcv.struct.image.ImageGray derivY, double maxAbsValue, java.awt.image.BufferedImage output)
      Renders two gradients on the same image using two sets of colors, on for each input image.
      static java.awt.image.BufferedImage colorizeSign​(boofcv.struct.image.ImageGray src, java.awt.image.BufferedImage dst, double normalize)
      Renders a colored image where the color indicates the sign and intensity its magnitude.
      static java.awt.image.BufferedImage disparity​(boofcv.struct.image.ImageGray disparity, java.awt.image.BufferedImage dst, int disparityRange, int invalidColor)
      Renders a gray scale image using color values from cold to hot.
      static java.awt.image.BufferedImage grayMagnitude​(boofcv.struct.image.ImageGray src, java.awt.image.BufferedImage dst, double normalize)
      Renders a gray scale image of the input image's intensity.

      dst(i,j) = 255*abs(src(i,j))/normalize
      static void grayMagnitudeTemp​(boofcv.struct.image.ImageGray src, java.awt.image.BufferedImage dst, double normalize)
      Renders a gray scale image using color values from cold to hot.
      static java.awt.image.BufferedImage graySign​(boofcv.struct.image.GrayF32 src, java.awt.image.BufferedImage dst, float maxAbsValue)  
      static java.awt.image.BufferedImage grayUnsigned​(boofcv.struct.image.GrayI src, java.awt.image.BufferedImage dst, int normalize)  
      static java.awt.image.BufferedImage standard​(boofcv.struct.image.ImageGray<?> src, java.awt.image.BufferedImage dst)  
      • Methods inherited from class java.lang.Object

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

      • VisualizeImageData

        public VisualizeImageData()
    • Method Detail

      • standard

        public static java.awt.image.BufferedImage standard​(boofcv.struct.image.ImageGray<?> src,
                                                            java.awt.image.BufferedImage dst)
      • colorizeSign

        public static java.awt.image.BufferedImage colorizeSign​(boofcv.struct.image.ImageGray src,
                                                                java.awt.image.BufferedImage dst,
                                                                double normalize)

        Renders a colored image where the color indicates the sign and intensity its magnitude. The input is divided by normalize to render it in the appropriate scale.

        Parameters:
        src - Input single band image.
        dst - Where the image is rendered into. If null a new BufferedImage will be created and return.
        normalize - Used to normalize the input image. If ≤ 0 then the max value will be used
        Returns:
        Rendered image.
      • grayUnsigned

        public static java.awt.image.BufferedImage grayUnsigned​(boofcv.struct.image.GrayI src,
                                                                java.awt.image.BufferedImage dst,
                                                                int normalize)
      • grayMagnitude

        public static java.awt.image.BufferedImage grayMagnitude​(boofcv.struct.image.ImageGray src,
                                                                 java.awt.image.BufferedImage dst,
                                                                 double normalize)

        Renders a gray scale image of the input image's intensity.

        dst(i,j) = 255*abs(src(i,j))/normalize

        Parameters:
        src - Input single band image.
        dst - Where the image is rendered into. If null a new BufferedImage will be created and return.
        normalize - Used to normalize the input image. If < 0 then this value is automatically computed.
        Returns:
        Rendered image.
      • grayMagnitudeTemp

        public static void grayMagnitudeTemp​(boofcv.struct.image.ImageGray src,
                                             java.awt.image.BufferedImage dst,
                                             double normalize)

        Renders a gray scale image using color values from cold to hot.

        Parameters:
        src - Input single band image.
        dst - Where the image is rendered into. If null a new BufferedImage will be created and return.
        normalize - Used to normalize the input image.
      • disparity

        public static java.awt.image.BufferedImage disparity​(boofcv.struct.image.ImageGray disparity,
                                                             java.awt.image.BufferedImage dst,
                                                             int disparityRange,
                                                             int invalidColor)

        Renders a gray scale image using color values from cold to hot.

        Parameters:
        disparity - Input disparity image
        dst - Where the image is rendered into. If null a new BufferedImage will be created and return.
        disparityRange - Number of possible disparity values
        invalidColor - RGB value for invalid pixels. Try 0xFF << 8 for green
        Returns:
        Rendered image.
      • graySign

        public static java.awt.image.BufferedImage graySign​(boofcv.struct.image.GrayF32 src,
                                                            java.awt.image.BufferedImage dst,
                                                            float maxAbsValue)
      • colorizeGradient

        public static java.awt.image.BufferedImage colorizeGradient​(boofcv.struct.image.ImageGray derivX,
                                                                    boofcv.struct.image.ImageGray derivY,
                                                                    double maxAbsValue,
                                                                    java.awt.image.BufferedImage output)
        Renders two gradients on the same image using two sets of colors, on for each input image.
        Parameters:
        derivX - (Input) Image with positive and negative values.
        derivY - (Input) Image with positive and negative values.
        maxAbsValue - The largest absolute value of any pixel in the image. Set to < 0 if not known.
        output -
        Returns:
        visualized gradient
      • colorizeGradient

        public static java.awt.image.BufferedImage colorizeGradient​(boofcv.struct.image.GrayS16 derivX,
                                                                    boofcv.struct.image.GrayS16 derivY,
                                                                    int maxAbsValue,
                                                                    java.awt.image.BufferedImage output)
        Renders two gradients on the same image using two sets of colors, on for each input image.
        Parameters:
        derivX - (Input) Image with positive and negative values.
        derivY - (Input) Image with positive and negative values.
        maxAbsValue - The largest absolute value of any pixel in the image. Set to < 0 if not known.
        output -
        Returns:
        visualized gradient
      • colorizeGradient

        public static java.awt.image.BufferedImage colorizeGradient​(boofcv.struct.image.GrayF32 derivX,
                                                                    boofcv.struct.image.GrayF32 derivY,
                                                                    float maxAbsValue,
                                                                    java.awt.image.BufferedImage output)
        Renders two gradients on the same image using two sets of colors, on for each input image.
        Parameters:
        derivX - (Input) Image with positive and negative values.
        derivY - (Input) Image with positive and negative values.
        maxAbsValue - The largest absolute value of any pixel in the image. Set to < 0 if not known.
        output -
        Returns:
        visualized gradient