Package boofcv.gui.feature
Class VisualizeRegions
java.lang.Object
boofcv.gui.feature.VisualizeRegions
Code for visualizing regions and superpixels
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic BufferedImage
regionBorders
(GrayS32 pixelToRegion, int borderColor, @Nullable BufferedImage output) Draws border pixels of each region using the specified color.static BufferedImage
regions
(GrayS32 pixelToRegion, int numRegions, @Nullable BufferedImage output) Draws each region with a random colorstatic BufferedImage
regionsColor
(GrayS32 pixelToRegion, DogArray<float[]> segmentColor, @Nullable BufferedImage output) Draws each region using the provided colorstatic BufferedImage
watersheds
(GrayS32 segments, @Nullable BufferedImage output, int radius) Sets the pixels of each watershed as red in the output image.
-
Constructor Details
-
VisualizeRegions
public VisualizeRegions()
-
-
Method Details
-
watersheds
public static BufferedImage watersheds(GrayS32 segments, @Nullable @Nullable BufferedImage output, int radius) Sets the pixels of each watershed as red in the output image. Watersheds have a value of 0- Parameters:
segments
- Conversion from pixel to regionoutput
- Storage for output image. Can be null.radius
- Thickness of watershed. 0 is 1 pixel wide. 1 is 3 pixels wide.- Returns:
- Output image.
-
regions
public static BufferedImage regions(GrayS32 pixelToRegion, int numRegions, @Nullable @Nullable BufferedImage output) Draws each region with a random color- Parameters:
pixelToRegion
- Conversion from pixel to regionnumRegions
- Total number of regions.output
- Storage for output image. Can be null.- Returns:
- Output image.
-
regionsColor
public static BufferedImage regionsColor(GrayS32 pixelToRegion, DogArray<float[]> segmentColor, @Nullable @Nullable BufferedImage output) Draws each region using the provided color- Parameters:
pixelToRegion
- Conversion from pixel to regionsegmentColor
- Color of each regionoutput
- Storage for output image. Can be null.- Returns:
- Output image.
-
regionBorders
public static BufferedImage regionBorders(GrayS32 pixelToRegion, int borderColor, @Nullable @Nullable BufferedImage output) Draws border pixels of each region using the specified color.- Parameters:
pixelToRegion
- Conversion from pixel to regionborderColor
- RGB value of border pixeloutput
- Storage for output image. Can be null.- Returns:
- Output image.
-