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
fgHSV Class Reference

Detector for getting the foreground object by checking HSV transformed image for certain color ranges. More...

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

Public Member Functions

def __init__ (self, fgCfg=None, processor=None)
 Constructor for single Gaussian model background detector. More...
 
def adapt (self)
 @breif Adapt the HSV based detection model parameters. More...
 
def correct (self)
 Generate a correction to the model. More...
 
def detect (self, I, M=None)
 Given a new measurement, apply the detection pipeline. More...
 
def emptyDebug (self)
 Return empty debug state information. More...
 
def emptyState (self)
 Return empty state. More...
 
def getDebug (self)
 Return current/latest debug state information. More...
 
def getState (self)
 Return current/latest state. More...
 
def measure (self, I, M=None)
 Takes image and generates the detection result. More...
 
def predict (self)
 Predictive model of measurement. More...
 
def process (self, I)
 Given a new measurement, apply entire FG modeling pipeline. More...
 
def saveConfig (self, outFile)
 Save current instance to a configuration file. More...
 
def saveTo (self, fPtr)
 Empty method for saving internal information to HDF5 file. More...
 
- Public Member Functions inherited from fgImage
def __init__ (self, processor=None)
 
- Public Member Functions inherited from inImage
def info (self)
 Provide information about the current class implementation. More...
 
def measure (self, I)
 Generate detection measurements from image input. More...
 
- Public Member Functions inherited from Base
def __init__ (self)
 Instantiate a detector Base activity class object. More...
 
def detect (self, signal)
 Run detection only processing pipeline (no adaptation). More...
 
def save (self, fileName)
 Outer method for saving to a file given as a string. More...
 

Static Public Member Functions

def buildFromCfg (theConfig, processor=None)
 Instantiate from stored configuration file (YAML). More...
 
def load (fileName)
 Load Gaussian instance specification from HDF5 file. More...
 
def loadFrom (fPtr)
 Specialzed load function to parse HDF5 data from file pointer. More...
 
def loadFromYAML (fileName)
 Instantiate from stored configuration file (YAML). More...
 
- 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
 
 fgI
 
 improcessor
 
 imsize
 
 lower
 
 upper
 
- Public Attributes inherited from inImage
 Ip
 
 processor
 
- Public Attributes inherited from Base
 x
 Detection state. More...
 

Detailed Description

Detector for getting the foreground object by checking HSV transformed image for certain color ranges.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  fgCfg = None,
  processor = None 
)

Constructor for single Gaussian model background detector.

Member Function Documentation

◆ adapt()

def adapt (   self)

@breif Adapt the HSV based detection model parameters.

Reimplemented from Base.

◆ buildFromCfg()

def buildFromCfg (   theConfig,
  processor = None 
)
static

Instantiate from stored configuration file (YAML).

◆ correct()

def correct (   self)

Generate a correction to the model.

In standard schemes, there are no corrections to the estimates. The classification result is presumed to be correct. Corrections would imply some sort of temporal regularization. Spatial regularization is usually done through image-based mid-processing.

Reimplemented from Base.

◆ detect()

def detect (   self,
  I,
  M = None 
)

Given a new measurement, apply the detection pipeline.

This only goes so far as to process the image and generate the detection, with correction. There is no adaptation. It should be run separately if desired.

◆ emptyDebug()

def emptyDebug (   self)

Return empty debug state information.

Useful if contents needed beforehand.

Reimplemented from Base.

◆ emptyState()

def emptyState (   self)

Return empty state.

Useful if contents needed beforehand.

Reimplemented from Base.

◆ 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.

◆ getState()

def getState (   self)

Return current/latest state.

Reimplemented from Base.

◆ load()

def load (   fileName)
static

Load Gaussian instance specification from HDF5 file.

◆ loadFrom()

def loadFrom (   fPtr)
static

Specialzed load function to parse HDF5 data from file pointer.

Reimplemented from Base.

◆ loadFromYAML()

def loadFromYAML (   fileName)
static

Instantiate from stored configuration file (YAML).

◆ measure()

def measure (   self,
  I,
  M = None 
)

Takes image and generates the detection result.

Parameters
[in]IImage to process.

◆ predict()

def predict (   self)

Predictive model of measurement.

In standard schemes, the expectation is that the background model is static (a constant state model). Thus, the default prediction is no update.

Reimplemented from Base.

◆ process()

def process (   self,
  I 
)

Given a new measurement, apply entire FG modeling pipeline.

Parameters
[in]INew image measurement.

Reimplemented from Base.

◆ saveConfig()

def saveConfig (   self,
  outFile 
)

Save current instance to a configuration file.

◆ saveTo()

def saveTo (   self,
  fPtr 
)

Empty method for saving internal information to HDF5 file.

Save data to given HDF5 pointer. Puts in root.

Reimplemented from Base.

Member Data Documentation

◆ config

config

◆ fgI

fgI

◆ improcessor

improcessor

◆ imsize

imsize

◆ lower

lower

◆ upper

upper

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