public abstract class CvStage
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
class |
CvStage.CvStageBeanInfo |
static class |
CvStage.Result |
| Constructor and Description |
|---|
CvStage() |
| Modifier and Type | Method and Description |
|---|---|
void |
customizePropertySheet(PipelinePropertySheetTable table,
CvPipeline pipeline)
Stages can override to register customized PropertyEditors.
|
java.beans.BeanInfo |
getBeanInfo() |
java.lang.String |
getCategory() |
java.lang.String |
getDescription() |
java.lang.String |
getDescription(java.lang.String propertyName) |
LengthUnit |
getLengthUnit() |
java.lang.String |
getName() |
<T> T |
getPossiblePipelinePropertyOverride(T parameter,
CvPipeline pipeline,
java.lang.String pipelinePropertyName,
java.lang.Class<?>... acceptablePropertyTypes)
Calls
getPossiblePipelinePropertyOverride(Object, String, CvPipeline, String, Class...) with the
stagePropertyName deducted from the pipelinePropertyName. |
<T> T |
getPossiblePipelinePropertyOverride(T parameter,
java.lang.String stagePropertyName,
CvPipeline pipeline,
java.lang.String pipelinePropertyName,
java.lang.Class<?>... acceptablePropertyTypes)
Attempts to override a generic parameter value using a property from the pipeline.
|
boolean |
isEnabled() |
abstract CvStage.Result |
process(CvPipeline pipeline)
Perform an operation in a pipeline.
|
void |
recordPropertyOverride(java.lang.String stagePropertyName,
java.lang.Object stageProperty)
Record the override of a stage property.
|
void |
setEnabled(boolean enabled) |
void |
setName(java.lang.String name) |
public abstract CvStage.Result process(CvPipeline pipeline) throws java.lang.Exception
pipeline - java.lang.Exceptionpublic java.lang.String getName()
public void setName(java.lang.String name)
public boolean isEnabled()
public void setEnabled(boolean enabled)
public java.lang.String getCategory()
public java.lang.String getDescription()
public java.lang.String getDescription(java.lang.String propertyName)
propertyName - public LengthUnit getLengthUnit()
public java.beans.BeanInfo getBeanInfo()
public void customizePropertySheet(PipelinePropertySheetTable table, CvPipeline pipeline)
table - pipeline - public <T> T getPossiblePipelinePropertyOverride(T parameter,
java.lang.String stagePropertyName,
CvPipeline pipeline,
java.lang.String pipelinePropertyName,
java.lang.Class<?>... acceptablePropertyTypes)
throws java.lang.Exception
Parameter Type(s) Acceptable Pipeline Property Type(s) ----------------------- -------------------------------------------------------- boolean, Boolean <- Boolean double, Double <- Double, Integer, Long, Area, Length int, Integer <- Double, Integer, Long, Area, Length long, Long <- Double, Integer, Long, Area, Length String <- String org.opencv.core.Point <- org.opencv.core.Point, org.openpnp.model.Point, Location org.openpnp.model.Point <- org.opencv.core.Point, org.openpnp.model.Point, Location Area <- Area Length <- Length Location <- Location T <- T (no conversion)Note: Doubles are rounded before assignment to integer types; Java's standard narrowing conversions are applied where necessary; Area, Length, and Location are converted to pixels via the camera's units per pixel scaling; and Locations are taken as offsets from the image center
parameter - - the generic parameter value to be possibly overriddenpipeline - - the pipeline with the overriding propertypipelinePropertyName - - the name of the overriding pipeline propertyacceptablePropertyTypes - - Zero or more acceptable types for the overriding property,
if none are specified, the only acceptable type is the same type as the input parameterjava.lang.Exception - If a property is defined on the pipeline with the expected name but it
could not be converted to the type of the input parameterpublic void recordPropertyOverride(java.lang.String stagePropertyName,
java.lang.Object stageProperty)
stagePropertyName - stageProperty - public <T> T getPossiblePipelinePropertyOverride(T parameter,
CvPipeline pipeline,
java.lang.String pipelinePropertyName,
java.lang.Class<?>... acceptablePropertyTypes)
throws java.lang.Exception
getPossiblePipelinePropertyOverride(Object, String, CvPipeline, String, Class...) with the
stagePropertyName deducted from the pipelinePropertyName.T - parameter - pipeline - pipelinePropertyName - acceptablePropertyTypes - java.lang.Exception