Codota Logo
BinaryImageOps.labelToBinary
Code IndexAdd Codota to your IDE (free)

How to use
labelToBinary
method
in
boofcv.alg.filter.binary.BinaryImageOps

Best Java code snippets using boofcv.alg.filter.binary.BinaryImageOps.labelToBinary (Showing top 1 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: org.boofcv/boofcv-ip

/**
 * Only converts the specified blobs over into the binary image.  Easier to use version of
 * {@link #labelToBinary(GrayS32, GrayU8, boolean[])}.
 *
 * @param labelImage Input image. Not modified.
 * @param binaryImage Output image. If null a new one will be declared. Modified.
 * @param numLabels Number of labels in the image.  This is the number of found clusters + 1.
 * @param selected The index of labels which will be marked as 1 in the output binary image.
 * @return The binary image.
 */
public static GrayU8 labelToBinary(GrayS32 labelImage , GrayU8 binaryImage ,
                  int numLabels, int ...selected )
{
  boolean selectedBlobs[] = new boolean[numLabels];
  for (int i = 0; i < selected.length; i++) {
    selectedBlobs[selected[i]] = true;
  }
  return labelToBinary(labelImage,binaryImage,selectedBlobs);
}
boofcv.alg.filter.binaryBinaryImageOpslabelToBinary

Javadoc

Converts a labeled image into a binary image by setting any non-zero value to one.

Popular methods of BinaryImageOps

  • erode8
  • contour
  • dilate8
  • selectRandomColors
    Several blob rending functions take in an array of colors so that the random blobs can be drawn with
  • convertContours
  • relabel
  • dilate4
    Dilates an image according to a 4-neighborhood. If a pixel is connected to any other pixel then its
  • edge4
    Binary operation which is designed to remove all pixels but ones which are on the edge of an object
  • edge8
    Binary operation which is designed to remove all pixels but ones which are on the edge of an object
  • erode4
    Erodes an image according to a 4-neighborhood. Unless a pixel is connected to all its neighbors its
  • invert
    Inverts each pixel from true to false and vis-versa.
  • removePointNoise
    Binary operation which is designed to remove small bits of spurious noise. An 8-neighborhood is used
  • invert,
  • removePointNoise,
  • thin

Popular in Java

  • Making http post requests using okhttp
  • setContentView (Activity)
  • getApplicationContext (Context)
  • getExternalFilesDir (Context)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Join (org.hibernate.mapping)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now