public class CvPipeline
extends java.lang.Object
implements java.lang.AutoCloseable
Modifier and Type | Class and Description |
---|---|
class |
CvPipeline.PipelineShot |
Constructor and Description |
---|
CvPipeline() |
CvPipeline(java.lang.String xmlPipeline) |
Modifier and Type | Method and Description |
---|---|
void |
add(CvStage stage)
Add the given CvStage to the end of the pipeline.
|
void |
add(java.lang.String name,
CvStage stage)
Add the given CvStage to the end of the pipeline using the given name.
|
void |
addProperties(java.util.Map<java.lang.String,java.lang.Object> pipelineParameterAssignments) |
CvPipeline |
clone() |
void |
close() |
boolean |
equals(java.lang.Object other) |
protected void |
finalize() |
void |
fromXmlString(java.lang.String s)
Parse the pipeline in the given String and replace the current pipeline with the results.
|
CvPipeline.PipelineShot |
getCurrentPipelineShot() |
CvStage.Result |
getExpectedResult(java.lang.String name)
Get the Result returned by the CvStage with the given name, expected to be defined in the pipeline
and to return a non-null model.
|
java.awt.image.BufferedImage |
getLastCapturedImage() |
java.util.List<CvAbstractParameterStage> |
getParameterStages() |
CvPipeline.PipelineShot |
getPipelineShot(int i) |
java.util.List<CvPipeline.PipelineShot> |
getPipelineShots() |
int |
getPipelineShotsCount() |
java.lang.Object |
getProperty(java.lang.String name) |
CvStage.Result |
getResult(CvStage stage)
Get the Result returned by give CvStage.
|
CvStage.Result |
getResult(java.lang.String name)
Get the Result returned by the CvStage with the given name.
|
CvStage |
getStage(java.lang.String name) |
java.util.List<CvStage> |
getStages() |
long |
getTotalProcessingTimeNs() |
FluentCv.ColorSpace |
getWorkingColorSpace() |
Mat |
getWorkingImage()
Get the current working image.
|
java.lang.Object |
getWorkingModel() |
void |
insert(CvStage stage,
int index) |
void |
insert(java.lang.String name,
CvStage stage,
int index) |
void |
process() |
void |
release()
Release any temporary resources associated with the processing of the pipeline.
|
void |
remove(CvStage stage) |
void |
remove(java.lang.String name) |
void |
resetReusedPipeline() |
void |
resetToDefaults()
Reset all the modified parameters to default values
(we do not want the parameters to permanently modify the pipeline).
|
void |
setLastCapturedImage(java.awt.image.BufferedImage lastCapturedImage) |
void |
setProperty(java.lang.String name,
java.lang.Object value) |
void |
setTotalProcessingTimeNs(long totalProcessingTimeNs) |
void |
setWorkingColorSpace(FluentCv.ColorSpace colorSpace) |
void |
stepToNextPipelineShot() |
java.lang.String |
toXmlString()
Convert the pipeline to an XML string that can be read back in with #fromXmlString.
|
public CvPipeline()
public CvPipeline(java.lang.String xmlPipeline)
public void add(java.lang.String name, CvStage stage)
name
- stage
- public void add(CvStage stage)
stage
- public void insert(java.lang.String name, CvStage stage, int index)
public void insert(CvStage stage, int index)
public void remove(java.lang.String name)
public void remove(CvStage stage)
public java.util.List<CvStage> getStages()
public CvStage getStage(java.lang.String name)
public java.util.List<CvAbstractParameterStage> getParameterStages()
public CvStage.Result getResult(java.lang.String name)
name
- public CvStage.Result getExpectedResult(java.lang.String name) throws java.lang.Exception
name
- java.lang.Exception
- when the stage name is undefined or the stage is missing in the pipeline.public CvStage.Result getResult(CvStage stage)
stage
- public Mat getWorkingImage()
public java.lang.Object getWorkingModel()
public FluentCv.ColorSpace getWorkingColorSpace()
public void setWorkingColorSpace(FluentCv.ColorSpace colorSpace)
public long getTotalProcessingTimeNs()
public void setTotalProcessingTimeNs(long totalProcessingTimeNs)
public void process() throws java.lang.Exception
java.lang.Exception
public void resetToDefaults()
public void release()
public void close() throws java.io.IOException
close
in interface java.lang.AutoCloseable
java.io.IOException
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public java.lang.String toXmlString() throws java.lang.Exception
java.lang.Exception
public void fromXmlString(java.lang.String s) throws java.lang.Exception
s
- java.lang.Exception
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public CvPipeline clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public java.lang.Object getProperty(java.lang.String name)
public void setProperty(java.lang.String name, java.lang.Object value)
public void addProperties(java.util.Map<java.lang.String,java.lang.Object> pipelineParameterAssignments)
public void resetReusedPipeline()
public java.awt.image.BufferedImage getLastCapturedImage()
public void setLastCapturedImage(java.awt.image.BufferedImage lastCapturedImage)
public java.util.List<CvPipeline.PipelineShot> getPipelineShots()
public CvPipeline.PipelineShot getCurrentPipelineShot()
public CvPipeline.PipelineShot getPipelineShot(int i)
public int getPipelineShotsCount()
public void stepToNextPipelineShot() throws java.lang.Exception
java.lang.Exception