IVALab Python Libraries
Collection of code for computer vision and robotics with specific API.
Public Member Functions | Public Attributes | List of all members
Base Class Reference
Inheritance diagram for Base:
Inheritance graph
[legend]
Collaboration diagram for Base:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, theDetector, theTracker, trackFilter, Params params)
 
def det_mask (self)
 
def draw_layer (self, img=None, raw_detect=False, ax=None)
 
def get_mask (self)
 
def get_state (self)
 
def measure (self, I)
 
def update_params (self, name, val)
 

Public Attributes

 layer_mask
 
 layer_mask_det
 
 layer_state
 
 params
 

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  theDetector,
  theTracker,
  trackFilter,
Params  params 
)
Base class for the layer segmentation approach

Build upon the the simple detector -> tracker -> trackfilter pipeline

Now building a base classs of the following process pipeline:
preprocess -> detect -> postprocess -> track -> trackfilter

where:
- preprocess: the preprocess of the input image
- Postprocess: post process of the detected layer mask
- params: need to has the field of the Params class 

Member Function Documentation

◆ det_mask()

def det_mask (   self)
Make the default getting the foregound mask

To be overwritten for any specific detector type

Reimplemented in Puzzle_Residual, robot_inRange, Human_ColorSG, Base_bg, and Base_fg.

◆ draw_layer()

def draw_layer (   self,
  img = None,
  raw_detect = False,
  ax = None 
)
Visualize the layer result

@ param[in] img             The input image. Default is None. If not None, then will crop the layer mask area and show.
                    If None, then will only plot the binary mask
@ param[in] raw_detect      bool. Default is False. If set to true, will draw the raw detected mask without postprocessing, 
                    and will not display the trackerstate

◆ get_mask()

def get_mask (   self)

◆ get_state()

def get_state (   self)

◆ measure()

def measure (   self,
  I 
)
Set a common processing pipeline?

But different detector or tracker will generate different result name. 
e.g. the layer mask should be obtained from fg_detector.getForeGround() and bg_detector.getBackground() separetely
similar for the trackers 

Might be better off defining the pipeline separately for different subclass of segmentor? Or just make up some default?

TODO: here requires the tracker instance to have the process & getstate API.
might be better to also limit the input to some base tracker class with those APIs?

Reimplemented in Human_ColorSG_HeightInRange.

◆ update_params()

def update_params (   self,
  name,
  val 
)
Update a parameter

Member Data Documentation

◆ layer_mask

layer_mask

◆ layer_mask_det

layer_mask_det

◆ layer_state

layer_state

◆ params

params

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