|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wpi.first.wpilibj.image.Image
edu.wpi.first.wpilibj.image.MonoImage
edu.wpi.first.wpilibj.image.BinaryImage
public class BinaryImage
An image where each pixel is treated as either on or off.
Field Summary |
---|
Fields inherited from class edu.wpi.first.wpilibj.image.Image |
---|
image |
Method Summary | |
---|---|
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(CriteriaCollection 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(String fileName)
Write the image to a file. |
Methods inherited from class edu.wpi.first.wpilibj.image.MonoImage |
---|
detectEllipses, detectEllipses |
Methods inherited from class edu.wpi.first.wpilibj.image.Image |
---|
free, getHeight, getWidth |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
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 return
NIVisionException
public ParticleAnalysisReport[] getOrderedParticleAnalysisReports() throws NIVisionException
NIVisionException
public void write(String fileName) throws NIVisionException
Image
write
in class Image
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 perform
NIVisionException
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 perform
NIVisionException
public BinaryImage convexHull(boolean connectivity8) throws NIVisionException
NIVisionException
public BinaryImage particleFilter(CriteriaCollection criteria) throws NIVisionException
NIVisionException
|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |