Class VisualizeBinaryData


  • public class VisualizeBinaryData
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int[] checkColors​(int[] colors, int size)  
      static void render​(java.util.List<boofcv.alg.filter.binary.Contour> contours, int[] colors, java.awt.image.BufferedImage out)
      Renders only the external contours.
      static void render​(java.util.List<boofcv.alg.filter.binary.Contour> contours, java.awt.Color internal, java.awt.Color external, double stroke, double scale, java.awt.Graphics2D g2)  
      static java.awt.image.BufferedImage render​(java.util.List<boofcv.alg.filter.binary.Contour> contours, java.awt.Color color, java.awt.image.BufferedImage out)  
      static void render​(java.util.List<java.util.List<georegression.struct.point.Point2D_I32>> contours, boolean loops, java.awt.Color color, double stroke, double scale, java.awt.Graphics2D g2)  
      static java.awt.image.BufferedImage renderBinary​(boofcv.struct.image.GrayU8 binaryImage, boolean invert, java.awt.image.BufferedImage out)
      Renders a binary image.
      static java.awt.image.BufferedImage renderContours​(java.util.List<boofcv.alg.feature.detect.edge.EdgeContour> edges, int[] colors, int width, int height, java.awt.image.BufferedImage out)  
      static java.awt.image.BufferedImage renderContours​(java.util.List<boofcv.alg.filter.binary.Contour> contours, int[] colorExternal, int colorInternal, int width, int height, java.awt.image.BufferedImage out)
      Draws contours.
      static java.awt.image.BufferedImage renderContours​(java.util.List<boofcv.alg.filter.binary.Contour> contours, int colorExternal, int colorInternal, int width, int height, java.awt.image.BufferedImage out)
      Draws contours.
      static java.awt.image.BufferedImage renderLabeled​(boofcv.struct.image.GrayS32 labelImage, int[] colors, java.awt.image.BufferedImage out)  
      static java.awt.image.BufferedImage renderLabeled​(boofcv.struct.image.GrayS32 labelImage, int numRegions, java.awt.image.BufferedImage out)
      Renders a labeled where each region is assigned a random color.
      static java.awt.image.BufferedImage renderLabeledBG​(boofcv.struct.image.GrayS32 labelImage, int numRegions, java.awt.image.BufferedImage out)
      Renders a labeled image where label=0 is assumed to be the background and is always set to black.
      • Methods inherited from class java.lang.Object

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

      • VisualizeBinaryData

        public VisualizeBinaryData()
    • Method Detail

      • renderContours

        public static java.awt.image.BufferedImage renderContours​(java.util.List<boofcv.alg.feature.detect.edge.EdgeContour> edges,
                                                                  int[] colors,
                                                                  int width,
                                                                  int height,
                                                                  java.awt.image.BufferedImage out)
      • renderContours

        public static java.awt.image.BufferedImage renderContours​(java.util.List<boofcv.alg.filter.binary.Contour> contours,
                                                                  int colorExternal,
                                                                  int colorInternal,
                                                                  int width,
                                                                  int height,
                                                                  java.awt.image.BufferedImage out)
        Draws contours. Internal and external contours are different user specified colors.
        Parameters:
        contours - List of contours
        colorExternal - RGB color
        colorInternal - RGB color
        width - Image width
        height - Image height
        out - (Optional) storage for output image
        Returns:
        Rendered contours
      • renderContours

        public static java.awt.image.BufferedImage renderContours​(java.util.List<boofcv.alg.filter.binary.Contour> contours,
                                                                  int[] colorExternal,
                                                                  int colorInternal,
                                                                  int width,
                                                                  int height,
                                                                  java.awt.image.BufferedImage out)
        Draws contours. Internal and external contours are different user specified colors.
        Parameters:
        contours - List of contours
        colorExternal - (Optional) Array of RGB colors for each external contour
        colorInternal - RGB color
        width - Image width
        height - Image height
        out - (Optional) storage for output image
        Returns:
        Rendered contours
      • render

        public static void render​(java.util.List<boofcv.alg.filter.binary.Contour> contours,
                                  int[] colors,
                                  java.awt.image.BufferedImage out)
        Renders only the external contours. Each contour is individually colored as specified by 'colors'
        Parameters:
        contours - List of contours
        colors - List of RGB colors for each element in contours. If null then random colors will be used.
        out - (Optional) Storage for output
      • checkColors

        public static int[] checkColors​(int[] colors,
                                        int size)
      • render

        public static java.awt.image.BufferedImage render​(java.util.List<boofcv.alg.filter.binary.Contour> contours,
                                                          java.awt.Color color,
                                                          java.awt.image.BufferedImage out)
      • render

        public static void render​(java.util.List<java.util.List<georegression.struct.point.Point2D_I32>> contours,
                                  boolean loops,
                                  java.awt.Color color,
                                  double stroke,
                                  double scale,
                                  java.awt.Graphics2D g2)
      • render

        public static void render​(java.util.List<boofcv.alg.filter.binary.Contour> contours,
                                  java.awt.Color internal,
                                  java.awt.Color external,
                                  double stroke,
                                  double scale,
                                  java.awt.Graphics2D g2)
      • renderLabeled

        public static java.awt.image.BufferedImage renderLabeled​(boofcv.struct.image.GrayS32 labelImage,
                                                                 int[] colors,
                                                                 java.awt.image.BufferedImage out)
      • renderLabeledBG

        public static java.awt.image.BufferedImage renderLabeledBG​(boofcv.struct.image.GrayS32 labelImage,
                                                                   int numRegions,
                                                                   java.awt.image.BufferedImage out)
        Renders a labeled image where label=0 is assumed to be the background and is always set to black. All other labels are assigned a random color.
        Parameters:
        labelImage - Labeled image with background having a value of 0
        numRegions - Number of labeled in the image, excluding the background.
        out - Output image. If null a new image is declared
        Returns:
        Colorized labeled image
      • renderLabeled

        public static java.awt.image.BufferedImage renderLabeled​(boofcv.struct.image.GrayS32 labelImage,
                                                                 int numRegions,
                                                                 java.awt.image.BufferedImage out)
        Renders a labeled where each region is assigned a random color.
        Parameters:
        labelImage - Labeled image with labels from 0 to numRegions-1
        numRegions - Number of labeled in the image
        out - Output image. If null a new image is declared
        Returns:
        Colorized labeled image
      • renderBinary

        public static java.awt.image.BufferedImage renderBinary​(boofcv.struct.image.GrayU8 binaryImage,
                                                                boolean invert,
                                                                java.awt.image.BufferedImage out)
        Renders a binary image. 0 = black and 1 = white.
        Parameters:
        binaryImage - (Input) Input binary image.
        invert - (Input) if true it will invert the image on output
        out - (Output) optional storage for output image
        Returns:
        Output rendered binary image