public class BinaryImage extends MonoImage
Modifier and Type | Method and Description |
---|---|
BinaryImage |
convexHull(boolean connectivity8) |
int |
getNumberParticles()
Returns the number of particles.
|
ParticleAnalysisReport[] |
getOrderedParticleAnalysisReports()
Gets all the particle analysis reports ordered from largest area to smallest.
|
ParticleAnalysisReport[] |
getOrderedParticleAnalysisReports(int size)
Gets all the particle analysis reports ordered from largest area to smallest.
|
ParticleAnalysisReport |
getParticleAnalysisReport(int index)
Get a particle analysis report for the particle at the given index.
|
BinaryImage |
particleFilter(NIVision.ParticleFilterCriteria2[] criteria) |
BinaryImage |
removeLargeObjects(boolean connectivity8,
int erosions)
removeLargeObjects filters particles based on their size.
|
BinaryImage |
removeSmallObjects(boolean connectivity8,
int erosions)
removeSmallObjects filters particles based on their size.
|
void |
write(java.lang.String fileName)
Write the image to a file.
|
detectEllipses, detectEllipses
public int getNumberParticles() throws NIVisionException
NIVisionException
public ParticleAnalysisReport getParticleAnalysisReport(int index) throws NIVisionException
index
- The index of the particle to report on.NIVisionException
public ParticleAnalysisReport[] getOrderedParticleAnalysisReports(int size) throws NIVisionException
size
- The number of particles to returnNIVisionException
public ParticleAnalysisReport[] getOrderedParticleAnalysisReports() throws NIVisionException
NIVisionException
public void write(java.lang.String fileName) throws NIVisionException
ImageBase
write
in class ImageBase
fileName
- The path to write the image to.NIVisionException
public BinaryImage removeSmallObjects(boolean connectivity8, int erosions) throws NIVisionException
connectivity8
- true to use connectivity-8 or false for connectivity-4 to determine
whether particles are touching. For more information about connectivity, see Chapter 9,
Binary Morphology, in the NI Vision Concepts manual.erosions
- the number of erosions to performNIVisionException
public BinaryImage removeLargeObjects(boolean connectivity8, int erosions) throws NIVisionException
connectivity8
- true to use connectivity-8 or false for connectivity-4 to determine
whether particles are touching. For more information about connectivity, see Chapter 9,
Binary Morphology, in the NI Vision Concepts manual.erosions
- the number of erosions to performNIVisionException
public BinaryImage convexHull(boolean connectivity8) throws NIVisionException
NIVisionException
public BinaryImage particleFilter(NIVision.ParticleFilterCriteria2[] criteria) throws NIVisionException
NIVisionException