public class ImageSegmentationOps
extends java.lang.Object
| Constructor and Description |
|---|
ImageSegmentationOps() |
| Modifier and Type | Method and Description |
|---|---|
static int |
countRegionPixels(boofcv.struct.image.GrayS32 labeled,
int which)
Counts the number of instances of 'which' inside the labeled image.
|
static void |
countRegionPixels(boofcv.struct.image.GrayS32 labeled,
int totalRegions,
int[] counts)
Counts the number of pixels in all regions.
|
static void |
markRegionBorders(boofcv.struct.image.GrayS32 labeled,
boofcv.struct.image.GrayU8 output)
Indicates border pixels between two regions.
|
static void |
regionPixelId_to_Compact(boofcv.struct.image.GrayS32 graph,
org.ddogleg.struct.GrowQueue_I32 segmentId,
boofcv.struct.image.GrayS32 output)
Compacts the region labels such that they are consecutive numbers starting from 0.
|
public static int countRegionPixels(boofcv.struct.image.GrayS32 labeled,
int which)
labeled - Image which has been labeledwhich - The label being searched forpublic static void countRegionPixels(boofcv.struct.image.GrayS32 labeled,
int totalRegions,
int[] counts)
labeled - (Input) labeled imagetotalRegions - Total number of regionscounts - Storage for pixel countspublic static void regionPixelId_to_Compact(boofcv.struct.image.GrayS32 graph,
org.ddogleg.struct.GrowQueue_I32 segmentId,
boofcv.struct.image.GrayS32 output)
graph - Input segmented image where the ID's are not compactedsegmentId - List of segment ID's. See comment above about what ID's are acceptable.output - The new image after it has been compactedpublic static void markRegionBorders(boofcv.struct.image.GrayS32 labeled,
boofcv.struct.image.GrayU8 output)
labeled - Input segmented image.output - Output binary image. 1 for border pixels.