IVALab Python Libraries
Collection of code for computer vision and robotics with specific API.
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
GloveByColor Class Reference

Glove detector by color only. More...

Inheritance diagram for GloveByColor:
Inheritance graph
[legend]
Collaboration diagram for GloveByColor:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, detCfg=None, detInst=None, processors=None)
 Constructor for layered puzzle scene detector. More...
 
def adapt (self)
 Adapt the layer detection models. More...
 
def correct (self)
 Apply correction process to the individual detectors. More...
 
def detect (self, I)
 Apply predict, measure, correct process to source image. More...
 
def emptyDebug (self)
 Return empty debug state information. More...
 
def emptyState (self)
 Get and empty state to recover its basic structure. More...
 
def getDebug (self)
 Return current/latest debug state information. More...
 
def getState (self)
 Get the complete detector state, which involves the states of the individual layer detectors. More...
 
def info (self)
 Provide information about the current class implementation. More...
 
def load (inFile)
 
def loadFrom (fPtr)
 Empty method for loading internal information from HDF5 file. More...
 
def measure (self, I)
 Apply detection to the source image pass. More...
 
def predict (self)
 Generate prediction of expected measurement. More...
 
def process (self, I)
 Apply entire predict to adapt process to source image. More...
 
def saveTo (self, fPtr)
 Save the instantiated Detector to given HDF5 file. More...
 
- Public Member Functions inherited from fgImage
def __init__ (self, processor=None)
 
- Public Member Functions inherited from Base
def __init__ (self)
 Instantiate a detector Base activity class object. More...
 
def save (self, fileName)
 Outer method for saving to a file given as a string. More...
 

Static Public Member Functions

def buildFromCfg (theConfig)
 Instantiate from stored configuration file (YAML). More...
 
def calibrate2config (theStream, outFile, initModel=None)
 
- Static Public Member Functions inherited from Base
def load (fileName, relpath=None)
 Outer method for loading file given as a string (with path). More...
 

Public Attributes

 config
 
 glove
 
 imGlove
 
 mask
 
- Public Attributes inherited from inImage
 Ip
 
 processor
 
- Public Attributes inherited from Base
 x
 Detection state. More...
 

Detailed Description

Glove detector by color only.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  detCfg = None,
  detInst = None,
  processors = None 
)

Constructor for layered puzzle scene detector.

Parameters
[in]detCfgDetector configuration.
[in]detInstDetection instances for the different layers.
[in]processorsImage processors for the different layers.

Reimplemented in CalibGloveByColor.

Member Function Documentation

◆ adapt()

def adapt (   self)

Adapt the layer detection models.

This part is tricky as there may be dependencies across the layers in terms of what should be updated and what should not be. Applying simple filtering to establish what pixels should adapt and which ones shouldn't.

Reimplemented from Base.

Reimplemented in CalibGloveByColor.

◆ buildFromCfg()

def buildFromCfg (   theConfig)
static

Instantiate from stored configuration file (YAML).

◆ calibrate2config()

def calibrate2config (   theStream,
  outFile,
  initModel = None 
)
static

◆ correct()

def correct (   self)

Apply correction process to the individual detectors.

Apply naive correction on a per detector basis. As a layered system, there might be interdependencies that would impact the correction step. Ignoring that for now since it does not immediately come to mind what needs to be done.

Reimplemented from Base.

Reimplemented in CalibGloveByColor.

◆ detect()

def detect (   self,
  I 
)

Apply predict, measure, correct process to source image.

Running detect alone elects not to adapt or update the underlying models. The static model is presumed to be sufficient and applied to the RGBD stream.

Parameters
[in]ISource RGB-D image (structure/dataclass).

Reimplemented from Base.

Reimplemented in CalibGloveByColor.

◆ emptyDebug()

def emptyDebug (   self)

Return empty debug state information.

Useful if contents needed beforehand.

Reimplemented from Base.

Reimplemented in CalibGloveByColor.

◆ emptyState()

def emptyState (   self)

Get and empty state to recover its basic structure.

Parameters
[out]estateThe empty state.

Reimplemented from Base.

Reimplemented in CalibGloveByColor.

◆ getDebug()

def getDebug (   self)

Return current/latest debug state information.

Usually the debug state consists of internally computed information that is useful for debugging purposes and can help to isolate problems within the implemented class or with downstream processing that may rely on assumptions built into this implemented class.

Reimplemented from Base.

Reimplemented in CalibGloveByColor.

◆ getState()

def getState (   self)

Get the complete detector state, which involves the states of the individual layer detectors.

Parameters
[out]stateThe detector state for each layer, by layer.

Reimplemented from Base.

Reimplemented in CalibGloveByColor.

◆ info()

def info (   self)

Provide information about the current class implementation.

Exists for reproducibility purposes. Usually stores the factory information used to build the current class instance.

Reimplemented from inImage.

Reimplemented in CalibGloveByColor.

◆ load()

def load (   inFile)

◆ loadFrom()

def loadFrom (   fPtr)

Empty method for loading internal information from HDF5 file.

Load data from given HDF5 pointer. Assumes in root from current file pointer location.

Reimplemented from Base.

◆ measure()

def measure (   self,
  I 
)

Apply detection to the source image pass.

Parameters
[in]IAn RGB-D image (structure/dataclass).

Reimplemented from inImage.

Reimplemented in CalibGloveByColor.

◆ predict()

def predict (   self)

Generate prediction of expected measurement.

The detectors are mostly going to be static models, which means that prediction does nothing. Just in case though, the prediction methods are called for them.

Reimplemented from Base.

Reimplemented in CalibGloveByColor.

◆ process()

def process (   self,
  I 
)

Apply entire predict to adapt process to source image.

Parameters
[in]ISource RGB-D image (structure/dataclass).

Reimplemented from Base.

Reimplemented in CalibGloveByColor.

◆ saveTo()

def saveTo (   self,
  fPtr 
)

Save the instantiated Detector to given HDF5 file.

The save to function writes the necessary information to re-instantiate a Detectors class object to the passed HDF5 file pointer/instance.

Parameters
[in]fPtrAn HDF5 file point.

Reimplemented from Base.

Reimplemented in CalibGloveByColor.

Member Data Documentation

◆ config

config

◆ glove

glove

◆ imGlove

imGlove

◆ mask

mask

The documentation for this class was generated from the following file: