Class VisualizeImageData

java.lang.Object
boofcv.gui.image.VisualizeImageData

public class VisualizeImageData
extends Object
Renders different primitive image types into a BufferedImage for visualization purposes.
  • Constructor Details

    • VisualizeImageData

      public VisualizeImageData()
  • Method Details

    • standard

      public static BufferedImage standard​(ImageGray<?> src, BufferedImage dst)
    • colorizeSign

      public static BufferedImage colorizeSign​(ImageGray src, @Nullable @Nullable 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 BufferedImage grayUnsigned​(GrayI src, BufferedImage dst, int normalize)
    • grayMagnitude

      public static BufferedImage grayMagnitude​(ImageGray src, @Nullable @Nullable 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​(ImageGray src, 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 BufferedImage disparity​(ImageGray disparity, @Nullable @Nullable 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 BufferedImage graySign​(GrayF32 src, @Nullable @Nullable BufferedImage dst, float maxAbsValue)
    • colorizeGradient

      public static BufferedImage colorizeGradient​(ImageGray derivX, ImageGray derivY, double maxAbsValue, 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.
      Returns:
      visualized gradient
    • colorizeGradient

      public static BufferedImage colorizeGradient​(GrayS16 derivX, GrayS16 derivY, int maxAbsValue, @Nullable @Nullable 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.
      Returns:
      visualized gradient
    • colorizeGradient

      public static BufferedImage colorizeGradient​(GrayF32 derivX, GrayF32 derivY, float maxAbsValue, @Nullable @Nullable 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.
      Returns:
      visualized gradient