Tabnine Logo
BinaryImageOps.relabel
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: us.ihmc/DarpaRoboticsChallenge

/**
* Set the value of any blob which does not touches the top or bottom image border to zero.  Then
* relabel the binary image.
*/
private int filterBlobsNotTouchingEdges(ImageSInt32 labeled, int numLabels)
{
 int value[] = new int[numLabels + 1];
 for (int i = 0; i < value.length; i++)
 {
   value[i] = 0;
 }
 for (int x = 0; x < labeled.width; x++)
 {
   int top = labeled.startIndex + x;
   int bottom = labeled.startIndex + labeled.stride * (labeled.height - 1) + x;
   value[labeled.data[top]] = labeled.data[top];
   value[labeled.data[bottom]] = labeled.data[bottom];
 }
 int count = 1;
 for (int i = 0; i < value.length; i++)
 {
   if (value[i] != 0)
   {
    value[i] = count++;
   }
 }
 // relabel the image to remove blobs with holes inside
 BinaryImageOps.relabel(labeled, value);
 return count - 1;
}
origin: org.boofcv/feature

/**
 * Merges regions together and updates the provided data structures for said changes.
 *
 * @param pixelToRegion (Input/Output) Image used to convert pixel location in region ID.  Modified.
 * @param regionMemberCount (Input/Output) List containing how many pixels belong to each region.  Modified.
 */
public void performMerge( GrayS32 pixelToRegion ,
             GrowQueue_I32 regionMemberCount ) {
  // update member counts
  flowIntoRootNode(regionMemberCount);
  // re-assign the number of the root node and trim excessive nodes from the lists
  setToRootNodeNewID(regionMemberCount);
  // change the labels in the pixelToRegion image
  BinaryImageOps.relabel(pixelToRegion, mergeList.data);
}
boofcv.alg.filter.binaryBinaryImageOpsrelabel

Javadoc

Used to change the labels in a labeled binary image.

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
  • 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.
  • labelToBinary
    Only converts the specified blobs over into the binary image
  • removePointNoise
    Binary operation which is designed to remove small bits of spurious noise. An 8-neighborhood is used
  • labelToBinary,
  • removePointNoise,
  • thin

Popular in Java

  • Updating database using SQL prepared statement
  • getExternalFilesDir (Context)
  • getContentResolver (Context)
  • getResourceAsStream (ClassLoader)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now