Documentation of 'boofcv.examples.segmentation.ExampleSegmentColor' Java class
ExampleSegmentColor
boofcv.examples.segmentation

Class ExampleSegmentColor



  • public class ExampleSegmentColor
    extends java.lang.Object
    Example which demonstrates how color can be used to segment an image. The color space is converted from RGB into HSV. HSV separates intensity from color and allows you to search for a specific color based on two values independent of lighting conditions. Other color spaces are supported, such as YUV, XYZ, and LAB.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static void main(java.lang.String[] args) 
      static void printClickedColor(java.awt.image.BufferedImage image)
      Shows a color image and allows the user to select a pixel, convert it to HSV, print the HSV values, and calls the function below to display similar pixels.
      static void showSelectedColor(java.lang.String name, java.awt.image.BufferedImage image, float hue, float saturation)
      Selectively displays only pixels which have a similar hue and saturation values to what is provided.
      • Methods inherited from class java.lang.Object

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

      • ExampleSegmentColor

        public ExampleSegmentColor()
    • Method Detail

      • printClickedColor

        public static void printClickedColor(java.awt.image.BufferedImage image)
        Shows a color image and allows the user to select a pixel, convert it to HSV, print the HSV values, and calls the function below to display similar pixels.
      • showSelectedColor

        public static void showSelectedColor(java.lang.String name,
                                             java.awt.image.BufferedImage image,
                                             float hue,
                                             float saturation)
        Selectively displays only pixels which have a similar hue and saturation values to what is provided. This is intended to be a simple example of color based segmentation. Color based segmentation can be done in RGB color, but is more problematic due to it not being intensity invariant. More robust techniques can use Gaussian models instead of a uniform distribution, as is done below.
      • main

        public static void main(java.lang.String[] args)

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.